I’m still having an issue with the following configuration on pi5:
Sometimes the Xorg server starts perfectly fine, and other times it fails with failed in waitforX and doesn't start, but if i started it manually then it starts.
How can I make sure X always starts reliably after booting?
/etc/X11/xorg.conf:
Section "Device"
Identifier "RPi5 VC4"
Driver "modesetting"
Option "kmsdev" "/dev/dri/card1"
EndSection
Section "Device"
Identifier "RPi5 VC4"
Driver "modesetting"
Option "kmsdev" "/dev/dri/card0"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "RPi5 VC4"
EndSection
ls -al /dev/dri/:
total 0
drwxr-xr-x 3 root root 0 Jan 1 02:01 ./
drwxrwxr-x 16 root root 0 Jan 1 02:01 ../
drwxr-xr-x 2 root root 0 Jan 1 02:01 by-path/
crw-rw---- 1 root staff 226, 0 Jan 1 02:01 card0
crw-rw---- 1 root staff 226, 1 Jan 1 02:01 card1
crw-rw---- 1 root staff 226, 128 Jan 1 02:01 renderD128
ls -al /dev/dri/by-path/:
total 0
drwxr-xr-x 2 root root 0 Jan 1 02:01 ./
drwxr-xr-x 3 root root 0 Jan 1 02:01 ../
lrwxrwxrwx 1 root root 8 Jan 1 02:01 platform-display-controller-card -> ../card1
cat /var/log/Xorg.0.log:
[ 9.128]
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[ 9.128] Current Operating System: Linux PiPy-88A29E30ADA1 6.12.25-piCore-v8 #5 SMP PREEMPT Sat Apr 26 13:42:06 EDT 2025 aarch64
[ 9.128] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe cgroup_disable=memory numa_policy=interleave numa=fake=8 system_heap.max_order=0 smsc95xx.macaddr=88:A2:9E:30:AD:A1 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 dwc_otg.fiq_fsm_mask=0xF dwc_otg.lpm_enable=0 console=/dev/null root=/dev/ram0 rootwait quiet nortc loglevel=3 noembed lang=de_DE.UTF-8 kmap=de tz=utc-2 waitusb=5 logo.nologo=1 vga=795
[ 9.128]
[ 9.128] Current version of pixman: 0.42.2
[ 9.128] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 9.128] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 9.128] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jan 1 01:21:01 1970
[ 9.128] (==) Using config file: "/etc/X11/xorg.conf"
[ 9.128] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 9.128] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[ 9.129] (==) No Layout section. Using the first Screen section.
[ 9.129] (**) |-->Screen "Default Screen" (0)
[ 9.129] (**) | |-->Monitor "<default monitor>"
[ 9.129] (**) | |-->Device "RPi5 VC4"
[ 9.129] (**) | |-->GPUDevice "RPi5 VC4"
[ 9.129] (==) No monitor specified for screen "Default Screen".
Using a default monitor configuration.
[ 9.129] (**) Allowing byte-swapped clients
[ 9.129] (==) Automatically adding devices
[ 9.129] (==) Automatically enabling devices
[ 9.129] (==) Automatically adding GPU devices
[ 9.129] (==) Automatically binding GPU devices
[ 9.129] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 9.129] (WW) The directory "/usr/local/lib/X11/fonts/OTF" does not exist.
[ 9.129] Entry deleted from font path.
[ 9.129] (WW) The directory "/usr/local/lib/X11/fonts/100pdi" does not exist.
[ 9.129] Entry deleted from font path.
[ 9.129] (==) FontPath set to:
/usr/local/lib/X11/fonts/misc,
/usr/local/lib/X11/fonts/TTF,
/usr/local/lib/X11/fonts/Type1,
/usr/local/lib/X11/fonts/75dpi
[ 9.129] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[ 9.129] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 9.129] (II) Module ABI versions:
[ 9.129] X.Org ANSI C Emulation: 0.4
[ 9.129] X.Org Video Driver: 25.2
[ 9.129] X.Org XInput driver : 24.4
[ 9.129] X.Org Server Extension : 10.0
[ 9.129] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 9.129] (II) Platform probe for /sys/devices/platform/axi/1002000000.v3d/drm/card0
[ 9.129] (II) no primary bus or device found
[ 9.129] falling back to /sys/devices/platform/axi/1002000000.v3d/drm/card0
[ 9.129] (II) LoadModule: "glx"
[ 9.130] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[ 9.509] (II) Module glx: vendor="X.Org Foundation"
[ 9.509] compiled for 1.21.1.13, module version = 1.0.0
[ 9.509] ABI class: X.Org Server Extension, version 10.0
[ 9.509] (II) LoadModule: "modesetting"
[ 9.509] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[ 9.510] (II) Module modesetting: vendor="X.Org Foundation"
[ 9.510] compiled for 1.21.1.13, module version = 1.21.1
[ 9.510] Module class: X.Org Video Driver
[ 9.510] ABI class: X.Org Video Driver, version 25.2
[ 9.511] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 9.511] (--) using VT number 2
[ 9.511] (WW) Falling back to old probe method for modesetting
[ 9.511] (EE) open /dev/dri/card1: No such file or directory
[ 9.511] (WW) Falling back to old probe method for modesetting
[ 9.511] (EE) open /dev/dri/card1: No such file or directory
[ 9.511] (EE) No devices detected.
[ 9.511] (EE)
Fatal server error:
[ 9.511] (EE) no screens found(EE)
[ 9.511] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 9.511] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 9.511] (EE)
[ 9.511] (EE) Server terminated with error (1). Closing log file.
and if i just use Option "kmsdev" "platform-display-controller-card"
it dosn't work also.
also i noticed if i put a sleep 5 in .profile just before startx, then X has enough time to start.
is that the only way to solve this?
cat .profile | tail -c 100
/sysconfig/Xserver ] ||
[ -f /etc/sysconfig/text ] ||
[ -e /tmp/.X11-unix/X0 ] ||
sleep 5
startx
)
)