Raspberry Pi 5: Xorg issues - Chromium Autostart (Cannot run in framebuffer mode)

Creating a bug report/issue

Loaded up an SD card and configured dietpi.txt for automated setup experience & Chromium autostart. The pi booted and did its thing. Chromium launched the URL fine but in 1080P instead of 4K. That was expected since I didn’t mess with resolution settings at all. After adding hdmi_enable_4kp60=1 to config.txt and changing Chrome’s resolution in dietpi.txt, X says display not found. Disabled 4k, changed Chrome res back…still the same.

I have searched the existing open and closed issues

Required Information

  • DietPi version | cat /boot/dietpi/.version
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=3
    G_DIETPI_VERSION_RC=0
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'`
    
  • Distro version | bookworm 0
  • Kernel version | Linux DietPi 6.6.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 5 Model B (aarch64)
  • Power supply used | Official
  • SD card used | Samsung EVO

Steps to reproduce

  1. Load DietPi on to SD
  2. Configure automated setup to install chromium, tigervnc, lightDM. Set local. Set password. Configure URL for chromium autostart (launch as dietpi).
  3. Boot pi and chrome opens URL after initial auto configuration completes
  4. Close chrome and go to terminal
  5. Enable 4k in config.txt, change chrome res in dietpi.txt
  6. Reboot.

Expected behaviour

Chrome displays URL in 4K

Actual behaviour

X says the display is not found.

Extra details

cat /home/dietpi/.local/share/xorg/Xorg.0.log
[    15.223]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[    15.223] Current Operating System: Linux DietPi 6.6.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64
[    15.223] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=2C:CF:67:04:33:00 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  root=PARTUUID=6bca6526-02 rootfstype=ext4 rootwait net.ifnames=0 logo.nologo console=ttyAMA10,115200 console=tty1
[    15.223] xorg-server 2:21.1.7-3+rpt2+deb12u5 (https://www.debian.org/support)
[    15.223] Current version of pixman: 0.42.2
[    15.223]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    15.223] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    15.223] (==) Log file: "/home/dietpi/.local/share/xorg/Xorg.0.log", Time: Mon Apr 22 16:09:42 2024
[    15.226] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    15.226] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    15.230] (==) No Layout section.  Using the first Screen section.
[    15.230] (==) No screen section available. Using defaults.
[    15.230] (**) |-->Screen "Default Screen Section" (0)
[    15.230] (**) |   |-->Monitor "<default monitor>"
[    15.230] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    15.230] (**) Option "BlankTime" "0"
[    15.230] (==) Automatically adding devices
[    15.230] (==) Automatically enabling devices
[    15.230] (==) Automatically adding GPU devices
[    15.230] (==) Automatically binding GPU devices
[    15.230] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    15.230] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    15.230]    Entry deleted from font path.
[    15.230] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    15.230]    Entry deleted from font path.
[    15.230] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    15.230]    Entry deleted from font path.
[    15.230] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    15.230]    Entry deleted from font path.
[    15.230] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    15.230]    Entry deleted from font path.
[    15.230] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        built-ins
[    15.230] (==) ModulePath set to "/usr/lib/xorg/modules"
[    15.230] (**) Extension "DPMS" is disabled
[    15.230] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    15.230] (II) Loader magic: 0x5555fb4f0ef0
[    15.230] (II) Module ABI versions:
[    15.230]    X.Org ANSI C Emulation: 0.4
[    15.230]    X.Org Video Driver: 25.2
[    15.230]    X.Org XInput driver : 24.4
[    15.230]    X.Org Server Extension : 10.0
[    15.231] (++) using VT number 1

[    15.232] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_32
[    15.233] (II) xfree86: Adding drm device (/dev/dri/card0)
[    15.233] (II) Platform probe for /sys/devices/platform/axi/1002000000.v3d/drm/card0
[    15.233] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 13 paused 0
[    15.234] (II) xfree86: Adding drm device (/dev/dri/card1)
[    15.234] (II) Platform probe for /sys/devices/platform/axi/axi:gpu/drm/card1
[    15.234] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 14 paused 0
[    15.235] (II) no primary bus or device found
[    15.235]    falling back to /sys/devices/platform/axi/1002000000.v3d/drm/card0
[    15.235] (II) LoadModule: "glx"
[    15.236] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    15.242] (II) Module glx: vendor="X.Org Foundation"
[    15.242]    compiled for 1.21.1.7, module version = 1.0.0
[    15.242]    ABI class: X.Org Server Extension, version 10.0
[    15.242] (==) Matched modesetting as autoconfigured driver 0
[    15.242] (==) Matched fbdev as autoconfigured driver 1
[    15.242] (==) Assigned the driver to the xf86ConfigLayout
[    15.242] (II) LoadModule: "modesetting"
[    15.242] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    15.249] (II) Module modesetting: vendor="X.Org Foundation"
[    15.249]    compiled for 1.21.1.7, module version = 1.21.1
[    15.249]    Module class: X.Org Video Driver
[    15.249]    ABI class: X.Org Video Driver, version 25.2
[    15.249] (II) LoadModule: "fbdev"
[    15.249] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[    15.250] (II) Module fbdev: vendor="X.Org Foundation"
[    15.250]    compiled for 1.21.1.3, module version = 0.5.0
[    15.250]    Module class: X.Org Video Driver
[    15.250]    ABI class: X.Org Video Driver, version 25.2
[    15.250] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    15.250] (II) FBDEV: driver for framebuffer: fbdev
[    15.250] (WW) Falling back to old probe method for modesetting
[    15.250] (WW) Falling back to old probe method for fbdev
[    15.250] (II) Loading sub module "fbdevhw"
[    15.250] (II) LoadModule: "fbdevhw"
[    15.250] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    15.251] (II) Module fbdevhw: vendor="X.Org Foundation"
[    15.251]    compiled for 1.21.1.7, module version = 0.0.2
[    15.251]    ABI class: X.Org Video Driver, version 25.2
[    15.251] (EE) open /dev/fb0: Permission denied
[    15.251] (WW) Falling back to old probe method for modesetting
[    15.251] (WW) Falling back to old probe method for fbdev
[    15.251] (II) Loading sub module "fbdevhw"
[    15.251] (II) LoadModule: "fbdevhw"
[    15.251] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    15.251] (II) Module fbdevhw: vendor="X.Org Foundation"
[    15.251]    compiled for 1.21.1.7, module version = 0.0.2
[    15.251]    ABI class: X.Org Video Driver, version 25.2
[    15.251] (EE) open /dev/fb0: Permission denied
[    15.251] (II) modeset(G0): using drv /dev/dri/card1
[    15.252] (EE) No devices detected.
[    15.252] (EE)
Fatal server error:
[    15.252] (EE) no screens found(EE)
[    15.252] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[    15.252] (EE) Please also check the log file at "/home/dietpi/.local/share/xorg/Xorg.0.log" for additional information.
[    15.252] (EE)
[    15.284] (EE) Server terminated with error (1). Closing log file.

Note: The log is pretty much the same even if I boot as root.

Did you try to set a resolution with dietpi-config?

pls can you run this as user root again and share the log afterwards. Just to exclude the permission issue.

And how does it behave if you select vc4-kms-v3d as resolution option? (reboot required)

I did. It was set to vc4-kms-v3d (1080P). There was no option for 4K after enabling it in config.txt.

root@DietPi:~# cat /var/log/Xorg.0.log
[    13.062]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[    13.062] Current Operating System: Linux DietPi 6.6.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64
[    13.062] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=2C:CF:67:04:33:00 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  root=PARTUUID=6bca6526-02 rootfstype=ext4 rootwait net.ifnames=0 logo.nologo console=ttyAMA10,115200 console=tty1
[    13.062] xorg-server 2:21.1.7-3+rpt2+deb12u5 (https://www.debian.org/support)
[    13.062] Current version of pixman: 0.42.2
[    13.062]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    13.062] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    13.062] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr 23 08:41:29 2024
[    13.079] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    13.079] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    13.090] (==) No Layout section.  Using the first Screen section.
[    13.090] (==) No screen section available. Using defaults.
[    13.090] (**) |-->Screen "Default Screen Section" (0)
[    13.090] (**) |   |-->Monitor "<default monitor>"
[    13.090] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    13.090] (**) Option "BlankTime" "0"
[    13.090] (==) Automatically adding devices
[    13.090] (==) Automatically enabling devices
[    13.090] (==) Automatically adding GPU devices
[    13.090] (==) Automatically binding GPU devices
[    13.092] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    13.101] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    13.101]    Entry deleted from font path.
[    13.101] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    13.101]    Entry deleted from font path.
[    13.101] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    13.101]    Entry deleted from font path.
[    13.106] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    13.106]    Entry deleted from font path.
[    13.106] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    13.106]    Entry deleted from font path.
[    13.106] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        built-ins
[    13.106] (==) ModulePath set to "/usr/lib/xorg/modules"
[    13.106] (**) Extension "DPMS" is disabled
[    13.106] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    13.106] (II) Loader magic: 0x555600f20ef0
[    13.106] (II) Module ABI versions:
[    13.106]    X.Org ANSI C Emulation: 0.4
[    13.106]    X.Org Video Driver: 25.2
[    13.106]    X.Org XInput driver : 24.4
[    13.106]    X.Org Server Extension : 10.0
[    13.107] (--) using VT number 2

[    13.107] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    13.107] (II) xfree86: Adding drm device (/dev/dri/card0)
[    13.107] (II) Platform probe for /sys/devices/platform/axi/1002000000.v3d/drm/card0
[    13.108] (II) xfree86: Adding drm device (/dev/dri/card1)
[    13.108] (II) Platform probe for /sys/devices/platform/axi/axi:gpu/drm/card1
[    13.118] (II) no primary bus or device found
[    13.118]    falling back to /sys/devices/platform/axi/1002000000.v3d/drm/card0
[    13.118] (II) LoadModule: "glx"
[    13.127] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    13.139] (II) Module glx: vendor="X.Org Foundation"
[    13.139]    compiled for 1.21.1.7, module version = 1.0.0
[    13.139]    ABI class: X.Org Server Extension, version 10.0
[    13.139] (==) Matched modesetting as autoconfigured driver 0
[    13.139] (==) Matched fbdev as autoconfigured driver 1
[    13.139] (==) Assigned the driver to the xf86ConfigLayout
[    13.139] (II) LoadModule: "modesetting"
[    13.139] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    13.156] (II) Module modesetting: vendor="X.Org Foundation"
[    13.156]    compiled for 1.21.1.7, module version = 1.21.1
[    13.156]    Module class: X.Org Video Driver
[    13.156]    ABI class: X.Org Video Driver, version 25.2
[    13.158] (II) LoadModule: "fbdev"
[    13.158] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[    13.159] (II) Module fbdev: vendor="X.Org Foundation"
[    13.159]    compiled for 1.21.1.3, module version = 0.5.0
[    13.159]    Module class: X.Org Video Driver
[    13.159]    ABI class: X.Org Video Driver, version 25.2
[    13.159] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    13.159] (II) FBDEV: driver for framebuffer: fbdev
[    13.191] (WW) Falling back to old probe method for modesetting
[    13.191] (WW) Falling back to old probe method for fbdev
[    13.191] (II) Loading sub module "fbdevhw"
[    13.191] (II) LoadModule: "fbdevhw"
[    13.191] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    13.194] (II) Module fbdevhw: vendor="X.Org Foundation"
[    13.194]    compiled for 1.21.1.7, module version = 0.0.2
[    13.194]    ABI class: X.Org Video Driver, version 25.2
[    13.194] (II) FBDEV(0): using default device
[    13.217] (II) modeset(G0): using drv /dev/dri/card1
[    13.217] (EE)
Fatal server error:
[    13.217] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[    13.217] (EE)
[    13.217] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[    13.217] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    13.217] (EE)
[    13.357] (EE) Server terminated with error (1). Closing log file.

While it’s on my mind . . . I’m reading through the Raspberry Pi docs and aside from adding hdmi_enable_4kp60=1 it states the following:

If you find yourself in a situation where the Raspberry Pi may not be able to determine the best mode, or you specifically wish to set a non-default resolution, you can set the resolution or rotation manually.

The docs give the steps for manually setting the resolution for Wayland, but not X11. Any thoughts?

Alright! I ended up working my way through the issue.

After running chromium autostart as root and inspecting the xorg log as @Joulinar suggested, I noticed this: (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices.

A bit of searching led me to this post which had the solution…Create 99-vc4.conf in /etc/X11/xorg.conf.d/ with the following content:

Section "OutputClass"
  Identifier "vc4"
  MatchDriver "vc4"
  Driver "modesetting"
  Option "PrimaryGPU" "true"
EndSection

After rebooting, chromium launched my URL in 4K. I have yet to try this as the dietpi user which I would prefer to do. I’ll report back on that later.


Update: No permission issues running as user dietpi.

Update 2: For future readers…a better explanation. This is a result of Debian moving away from X in favor of Wayland (I think). The kernel creates two devices, /dev/dri/card0 and /dev/dri/card1. One is for vc4 (display) and the other is for v3d (3d hardware). They are allocated randomly. X is dumb, it just uses /dev/dri/card0 which ends up working/failing half of the time. The generic Debian packages don’t know that Pi has a display driver called vc4, so you need a config file to describe that. That config exists in the full versions of RPIOS. The devs don’t care about X working in their lite versions because they are intended to be used without a desktop, so they didn’t bother to address this issue. I assume that DietPi is based on the lite images of Raspberry Pi OS, so it must have inherited the same issue.

I deserve 0 credit for that explanation btw. Most of if was copy and pasted from the Raspberry Pi forum.

1 Like

Well, we create our images for RPI with debootstrap Debian, if I’m not mistaken. Something @MichaIng could explain much better than me.

1 Like

Understood. Installing the gldriver-test package adds the configuration file that I mentioned above. The engineers over on the Raspberry Pi forums said they plan on adding it as a recommended package of x-org. Maybe the same can/should be done for DietPi?

As said in the other topic: Latest DietPi dietpi-software desktop/X11 installs add this config already. Not sure whether it is worth it to add it to our raspberrypi-sys-mods package to cover manual installs as well?

Not sure why this config file is part of gldriver-test, as the name does not indicate such. Or which purpose does this package serve exactly?

Interesting. Just checked the release notes and I do see that mentioned. I followed the link back to @denguido’s post…surprised I didn’t find this when I was troubleshooting. Anyway, since creating this post I have installed DietPi on 2 more RPi 5s and still had to manually create the config file each time. I downloaded the latest build each time. Is this config not added when doing the automated setup via dietpi.txt?

We call the file /etc/X11/xorg.conf.d/02-dietpi-rpi5.conf, and it is created as well when choosing a desktop or X11 to be installed via dietpi.txt.


That file does not exist.

dietpi@DietPi:~$ ls -a /etc/X11/xorg.conf.d
.  ..  98-dietpi-disable_dpms.conf  99-vc4.conf

99-vc4.conf is there because I created it, of course.

I found the issue, I guess

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Installing X.Org X Server: aka X11 - X Window System implementation

/boot/dietpi/dietpi-software: line 2666: /etc/X11/xorg.conf.d/02-dietpi-rpi5.conf: No such file or directory
[  OK  ] DietPi-Software | cd /tmp/DietPi-Software

Directory /etc/X11/xorg.conf.d/ did not exist and would need to be created beforhand.

PR up: DietPi-Software | X-Server by Joulinar · Pull Request #7056 · MichaIng/DietPi · GitHub

1 Like

Awesome. Thanks for getting this sorted out.