BBB: Problems with X server on a minimal Bullseye image

Starting from this image i’m creating an image for a BBB running a “kiosk” application.
This is a second try, as i had some strange xserver errors in my first attempt.

This is what i’ve done from the first boot (history):

1 wpa_cli
2 ifconfig wlan0
3 hostnamectl
4 sudo reboot
5 sudo nano /etc/ssh/sshd_config.d/sshd_as_root.conf
6 sudo service sshd restart
7 timedatectl
8 sudo apt update && sudo apt upgrade -y

Here, by using winSCP on a Win10 PC, i’ve changed some /boot/uEnv.txt lines, commenting out enable_uboot_cape_universal=1 and adding 3 custom dtbo.
Also edited /etc/systemd/network/wlan0.network to set a fixed IPv4 address.
Then:

9 sudo reboot
10 dmesg
11 journalctl
12 timedatectl
13 sudo apt install openbox xorg x11-xserver-utils xterm feh unclutter -y
14 sudo reboot
15 xinit

this is the console output from the last boot, showing the xserver error at the end.

Build Operating System: linux Debian
Current Operating System: Linux BeagleBone 5.10.168-ti-r61 #1bullseye SMP PREEMPT Mon May 1 18:28:10 UTC 2023 armv7l
Kernel command line: console=ttyS0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait uboot_detected_capes=BB-BONE-LCD4-01, coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
Build Date: 23 March 2023 10:25:56AM

xorg-server 2:1.20.11-1+deb11u6 (Debian -- User Support)
Current version of pixman: 0.40.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: “/home/debian/.local/share/xorg/Xorg.0.log”, Time: Fri May 12 13:11:20 2023
(==) Using config file: “/etc/X11/xorg.conf”
(==) Using system config directory “/usr/share/X11/xorg.conf.d”
(EE) Server terminated with error (1).
Closing log file.cal/xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

And here the whole $HOME/.local/share/Xorg.0.log content:

[ 56.362]
X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
[ 56.363] Build Operating System: linux Debian
[ 56.363] Current Operating System: Linux BeagleBone 5.10.168-ti-r61 #1bullseye SMP PREEMPT Mon May 1 18:28:10 UTC 2023 armv7l
[ 56.363] Kernel command line: console=ttyS0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait uboot_detected_capes=BB-BONE-LCD4-01, coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
[ 56.366] Build Date: 23 March 2023 10:25:56AM
[ 56.368] xorg-server 2:1.20.11-1+deb11u6 (Debian -- User Support)
[ 56.369] Current version of pixman: 0.40.0
[ 56.371] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 56.371] Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 56.378] (==) Log file: “/home/debian/.local/share/xorg/Xorg.0.log”, Time: Fri May 12 13:11:20 2023
[ 56.405] (==) Using config file: “/etc/X11/xorg.conf”
[ 56.407] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
[ 56.414] (==) ServerLayout “Builtin Default Layout”
[ 56.415] (**) |–>Screen “Builtin Default fbdev Screen 0” (0)
[ 56.415] (**) | |–>Monitor “Builtin Default Monitor”
[ 56.417] (**) | |–>Device “Builtin Default fbdev Device 0”
[ 56.417] (==) Automatically adding devices
[ 56.417] (==) Automatically enabling devices
[ 56.417] (==) Automatically adding GPU devices
[ 56.425] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 56.455] (WW) The directory “/usr/share/fonts/X11/cyrillic” does not exist.
[ 56.456] Entry deleted from font path.
[ 56.472] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
[ 56.472] (==) ModulePath set to “/usr/lib/xorg/modules”
[ 56.472] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 56.472] (II) Loader magic: 0x5a6f58
[ 56.472] (II) Module ABI versions:
[ 56.472] X.Org ANSI C Emulation: 0.4
[ 56.472] X.Org Video Driver: 24.1
[ 56.472] X.Org XInput driver : 24.1
[ 56.472] X.Org Server Extension : 10.0
[ 56.492] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 56.497] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 56.504] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[ 56.507] (II) no primary bus or device found
[ 56.508] falling back to /sys/devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@300000/4830e000.target-module/4830e000.lcdc/drm/card0
[ 56.508] (II) LoadModule: “glx”
[ 56.517] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 56.592] (II) Module glx: vendor=“X.Org Foundation”
[ 56.592] compiled for 1.20.11, module version = 1.0.0
[ 56.592] ABI class: X.Org Server Extension, version 10.0
[ 56.593] (II) LoadModule: “fbdev”
[ 56.595] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 56.599] (II) Module fbdev: vendor=“X.Org Foundation”
[ 56.599] compiled for 1.20.0, module version = 0.5.0
[ 56.599] Module class: X.Org Video Driver
[ 56.599] ABI class: X.Org Video Driver, version 24.0
[ 56.600] (II) FBDEV: driver for framebuffer: fbdev
[ 56.600] (EE)
Fatal server error:
[ 56.600] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 56.601] (EE)
[ 56.601] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 56.601] (EE) Please also check the log file at “/home/debian/.local/share/xorg/Xorg.0.log” for additional information.
[ 56.601] (EE)
[ 56.602] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 56.602] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 56.660] (EE) Server terminated with error (1). Closing log file.

So, seems that the problem is “Cannot open /dev/tty0 (Permission denied)”.

What have i missed to do, or done wrong?

Have you done this

$ sudo usermod -aG dialout <your username>

You will need to reboot, then check it

$ groups
1 Like

[quote=“foxsquirrel, post:2, topic:34791”]
Have you done this

$ sudo usermod -aG dialout <your username>

Nope. Done it now:

debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input netdev bluetooth cloud9ide weston-launch tisdk i2c admin gpio

But xinit still have the same error.
BUT
i tried startx and it worked (even before adding the user to the group ).
Why is it this way? Should i use startx instead of xinit?

Is tty0 enabled in the device tree and active?

MIght try reverting back to your original uEnv.txt, I believe you said it did work.
If that works, do your mods one at a time, test, do another mod until it breaks again.