【鼎革‧革鼎】︰ Raspbian Stretch 《四‧二》

為了方便觀察 X Window 啟動錯誤,且先安裝

sudo apt install xserver-xorg-legacy

,修改預設值︰

pi@raspberrypi:~ more /etc/X11/Xwrapper.config  # Xwrapper.config (Debian X Window System server wrapper configuration file) # # This file was generated by the post-installation script of the # xserver-xorg-legacy package using values from the debconf database. # # See the Xwrapper.config(5) manual page for more information. # # This file is automatically updated on upgrades of the xserver-xorg-legacy # package *only* if it has not been modified since the last upgrade of that # package. # # If you have edited this file but would like it to be automatically updated # again, run the following command as root: #   dpkg-reconfigure xserver-xorg-legacy  #allowed_users=console  needs_root_rights=yes allowed_users=anybody pi@raspberrypi:~

 

在確定 lightdm 當下組構後︰

pi@raspberrypi:~ /usr/sbin/lightdm --show-config    [Seat:*] B  greeter-session=pi-greeter B  greeter-hide-users=false A  session-wrapper=/etc/X11/Xsession B  autologin-user=pi  Sources: A  /usr/share/lightdm/lightdm.conf.d/01_debian.conf B  /etc/lightdm/lightdm.conf pi@raspberrypi:~

 

啟動 lightdm.service systemd 服務,果以失敗告終︰

pi@raspberrypi:~ sudo systemctl start lightdm.service pi@raspberrypi:~ sudo systemctl status lightdm.service
● lightdm.service - Light Display Manager
   Loaded: loaded (/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2017-10-20 17:05:45 CST; 2s ago
     Docs: man:lightdm(1)
  Process: 709 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
  Process: 705 ExecStartPre=/bin/sh -c [ "(cat /etc/X11/default-display-manager 2>/dev/null)" = "/us  Main PID: 709 (code=exited, status=1/FAILURE)  10月 20 17:05:45 raspberrypi systemd[1]: lightdm.service: Main process exited, code=exited, status=1/F 10月 20 17:05:45 raspberrypi systemd[1]: lightdm.service: Unit entered failed state. 10月 20 17:05:45 raspberrypi systemd[1]: lightdm.service: Failed with result 'exit-code'. 10月 20 17:05:45 raspberrypi systemd[1]: lightdm.service: Service hold-off time over, scheduling resta 10月 20 17:05:45 raspberrypi systemd[1]: Stopped Light Display Manager. 10月 20 17:05:45 raspberrypi systemd[1]: lightdm.service: Start request repeated too quickly. 10月 20 17:05:45 raspberrypi systemd[1]: Failed to start Light Display Manager. 10月 20 17:05:45 raspberrypi systemd[1]: lightdm.service: Unit entered failed state. 10月 20 17:05:45 raspberrypi systemd[1]: lightdm.service: Failed with result 'exit-code'. pi@raspberrypi:~

 

為明原因,因此用 xinit 直接執行 X11/Starting Sessions 也。

pi@raspberrypi:~ xinit /usr/bin/startlxde-pi   X.Org X Server 1.19.2 Release Date: 2017-03-02 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.9.41-v7+ armv7l Raspbian Current Operating System: Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=800 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=5ddd5cbb-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait Build Date: 18 October 2017  04:55:30PM xorg-server 2:1.19.2-1+rpt1+deb9u2 (https://www.debian.org/support)  Current version of pixman: 0.34.0 	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: Fri Oct 20 17:06:44 2017 (==) Using system config directory "/usr/share/X11/xorg.conf.d" modprobe: FATAL: Module g2d_23 not found in directory /lib/modules/4.9.41-v7+ xf86TslibControlProc xf86TslibControlProc /usr/lib/xorg/Xorg: symbol lookup error: /usr/lib/xorg/modules/input/tslib_drv.so: undefined symbol: AddEnabledDevice xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error pi@raspberrypi:~ 

 

再加上

python3 ~/kivy/examples/demo/pictures/main.py

,運作正常。

 

當真懸疑的很呦!

嘗聞樹莓派論壇曾經有人談起︰

Boot: ‘Failed to start Light Display Manager.’

Tue Feb 23, 2016 12:09 pm

Yesterday I started my RasPi 2 and it booted up normally, but then it shows the text ‘[FAILED] Failed to start Light Display Manager. See “systemctl status lightdm.service” for details.’ The result can be found here:
https://www.dropbox.com/s/e1kaqldzo9hz9 … 9.jpg?dl=0.
‘journalctl -u lightdm’ returns ‘No journal files were found.’.
The internet didn’t help so I hope some of you guys can help me out.

 

那時不以為意,誰知眼前就遇之矣?

竟然換個螢幕就 OK 了呦◎