Jump to content

How do I display GUI in SPI LCD that only displays console?


Recommended Posts

Posted

I managed to get my waveshare 2.8" SPI LCD (https://www.waveshare.com/wiki/2.8inch_RPi_LCD_(A)) to display console in an orangepi zero LTS board, using the DT overlay and instructions given here:  

My dts file has changes as explained in the comments of the attached waveshare_32b_28a_opipc2.dts file in that post. Armbian version being used is as follows:  


 

uname -a 

Linux orangepizero 5.10.60-sunxi #21.08.1 SMP Wed Aug 25 18:19:32 UTC 2021 armv7l armv7l armv7l GNU/Linux

I want to display a GUI desktop on this screen but I keep getting errors. I firstly tried the instructions given here for a different orangepi board: https://diyprojects.io/armbian-tutorial-installing-xfce-desktop-server-distribution/#.YYOcrmBBy70

The instructions are basically to install "sudo apt-get -y install xorg lightdm xfce4 tango-icon-theme gnome-icon-theme" and run "startxfce4". This gave me some errors which hinted that it could not start the GUI because xfce did not detect a monitor.

 

After this I wiped the sdcard and reinstalled the OS. I then tried installing desktop and other softwares from armbian-config -> system -> Desktop, and then later on enabling desktop from armbian-config -> system -> Desktop -> Enable desktop

 

When the board boots the LCD always shows a console login prompt. If I manually try to start lightdm by issuing "sudo lightdm" in the PC serial console, the LCD screen goes black and I get this error in the serial console:  

 

** (lightdm:1980): WARNING **: 08:46:09.601: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.13" (uid=0 pid=1980 comm="lightdm ") interface="org.freedesktop.Accounts" member="ListCachedUsers" error name="(unset)" requested_reply="0" destination="org.freedesktop.Accounts" (bus)
Failed to use bus name org.freedesktop.DisplayManager, do you have appropriate permissions?

I only need a minimal desktop and don't need other softwares which seem to get installed through armbian-config. Does the light DM software expect there to be some kind of monitor output on the board? How do I redirect it to use the SPI display instead? The waveshare 2.8" SPI LCD is compatible with raspberry pi and works without any problems with the raspberry pi board. I have assumed that the 26 pin headers on the orange pi zero LTS board are compatible with the raspberry pi and connect the LCD accordingly.

 

Also, is there a way to test whether the LCD is detecting touch or not, before I find out why GUI is not working? Is there a way to test touch functions while the LCD is showing a console?  

 

Here are all the relevant information:  

 

dmesg output (full):

  Reveal hidden contents

 

dmesg | grep spi

 

  Reveal hidden contents

 

dmesg | grep fb

 

  Reveal hidden contents


 

orangepizero@orangepizero:~$ sudo systemctl status lightdm.service
[sudo] password for orangepizero:
● lightdm.service - Light Display Manager
     Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-11-04 08:15:55 UTC; 1h 3min ago
       Docs: man:lightdm(1)
    Process: 715 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=1/FAILURE)

Nov 04 08:15:55 orangepizero systemd[1]: lightdm.service: Scheduled restart job, restart counter is at 5.
Nov 04 08:15:55 orangepizero systemd[1]: Stopped Light Display Manager.
Nov 04 08:15:55 orangepizero systemd[1]: lightdm.service: Start request repeated too quickly.
Nov 04 08:15:55 orangepizero systemd[1]: lightdm.service: Failed with result 'exit-code'.
Nov 04 08:15:55 orangepizero systemd[1]: Failed to start Light Display Manager.

 

orangepizero@orangepizero:~$ cat /etc/X11/xorg.conf.d/01-armbian-defaults.conf
Section "Monitor"
        Identifier              "Monitor0"
        Option                  "DPMS" "false"
EndSection
Section "ServerFlags"
        Option                  "BlankTime" "0"
        Option                  "StandbyTime" "0"
        Option                  "SuspendTime" "0"
        Option                  "OffTime" "0"
EndSection

 

I tried logging into the console shown on the LCD, becoming root (su) and running Xorg. The screen flashed some text messages and immediately went black. I then logged into the orangepi  from PC via ssh, and used htop as root to close sessions of Xorg. After this the console came back up in the LCD. The Xorg.0.log file generated after this attached below.

 

EDIT---

If I issue "startx" command in the serial console on PC, the I get the following messages:  


 

orangepizero@orangepizero:~$ startx


X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Ubuntu
Current Operating System: Linux orangepizero 5.10.60-sunxi #21.08.1 SMP Wed Aug 25 18:19:32 UTC 2021 armv7l
Kernel command line: root=UUID=592180af-c238-474c-a04b-4a9e91c6d375 rootwait rootfstype=ext4 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 consoleblank=0 loglevel=1 ubootpart=f6fd8d58-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1
Build Date: 06 July 2021  10:17:51AM
xorg-server 2:1.20.11-1ubuntu1~20.04.2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Nov  4 10:49:59 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

The LCD then goes into a sort of graphical mode console, where I still get just a console, but now there is black text on a white background, a mouse cursor and detects touch inputs. Mouse movement is detected very accurately, touch is not accurate at all but is detected, so that's something, and I can click and drag things on the screen to highlight them. Is this a good sign? What is this indicating? If I issue lightdm command in this graphical console on the LCD I still get an error. I can't see the message fully as it seems to be cut off at random places due to the size of the LCD screen, but it looks like it is the same error message that I have posted above.

 

Xorg.0.logFetching info...

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines