[RPI3] Black and blank screen upon X start

This forum is for discussion about general software issues.

[RPI3] Black and blank screen upon X start

Postby jyno » Wed Mar 02, 2022 1:52 pm

TOPIC HAS CHANGED
Old: Unable to startx Cannot open /dev/tty0 (Permission denie
New: Black and blank screen upon X start

See viewtopic.php?p=69191#p69191

---

I'm attempting to start fluxbox or openbox on RPI3 using Xorg.

I'm following the ArchLinux documentation[0] and I've failed to start both of the above.

I've seen a similar issue[1], but I don't know if the solution is appropriate.

[0]: https://wiki.archlinux.org/title/Xinit#xinitrc
[1]: https://bbs.archlinux.org/viewtopic.php?id=265715

Here's the log:
$this->bbcode_second_pass_code('', '
[ 72.214]
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
[ 72.214] Current Operating System: Linux alarmpi 5.10.27-3-ARCH #1 SMP Mon Apr 12 18:48:03 UTC 2021 armv7l
[ 72.214] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 root=/dev/mmcblk0p2 rw rootwait console=ttyS0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyS0,115200
[ 72.215]
[ 72.215] Current version of pixman: 0.40.0
[ 72.215] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 72.216] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 72.216] (==) Log file: "/home/alarm/.local/share/xorg/Xorg.1.log", Time: Wed Mar 2 13:35:11 2022
[ 72.231] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 72.234] (==) No Layout section. Using the first Screen section.
[ 72.234] (==) No screen section available. Using defaults.
[ 72.234] (**) |-->Screen "Default Screen Section" (0)
[ 72.234] (**) | |-->Monitor "<default monitor>"
[ 72.236] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 72.236] (==) Automatically adding devices
[ 72.236] (==) Automatically enabling devices
[ 72.236] (==) Automatically adding GPU devices
[ 72.236] (==) Automatically binding GPU devices
[ 72.236] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 72.243] (WW) The directory "/usr/share/fonts/misc" does not exist.
[ 72.243] Entry deleted from font path.
[ 72.243] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[ 72.243] Entry deleted from font path.
[ 72.243] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[ 72.243] Entry deleted from font path.
[ 72.243] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 72.243] Entry deleted from font path.
[ 72.258] (==) FontPath set to:
/usr/share/fonts/100dpi,
/usr/share/fonts/75dpi
[ 72.258] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 72.258] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 72.258] (II) Module ABI versions:
[ 72.258] X.Org ANSI C Emulation: 0.4
[ 72.258] X.Org Video Driver: 25.2
[ 72.258] X.Org XInput driver : 24.4
[ 72.258] X.Org Server Extension : 10.0
[ 72.268] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 72.272] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 72.272] (II) Platform probe for /sys/devices/platform/soc/soc:gpu/drm/card0
[ 72.275] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[ 72.276] (II) no primary bus or device found
[ 72.276] falling back to /sys/devices/platform/soc/soc:gpu/drm/card0
[ 72.276] (II) LoadModule: "glx"
[ 72.279] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 72.343] (II) Module glx: vendor="X.Org Foundation"
[ 72.344] compiled for 1.21.1.3, module version = 1.0.0
[ 72.344] ABI class: X.Org Server Extension, version 10.0
[ 72.344] (==) Matched modesetting as autoconfigured driver 0
[ 72.344] (==) Matched fbdev as autoconfigured driver 1
[ 72.344] (==) Assigned the driver to the xf86ConfigLayout
[ 72.344] (II) LoadModule: "modesetting"
[ 72.344] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 72.420] (II) Module modesetting: vendor="X.Org Foundation"
[ 72.420] compiled for 1.21.1.3, module version = 1.21.1
[ 72.420] Module class: X.Org Video Driver
[ 72.420] ABI class: X.Org Video Driver, version 25.2
[ 72.421] (II) LoadModule: "fbdev"
[ 72.423] (WW) Warning, couldn't open module fbdev
[ 72.423] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 72.423] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 72.423] (EE)
Fatal server error:
[ 72.423] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 72.423] (EE)
[ 72.423] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 72.423] (EE) Please also check the log file at "/home/alarm/.local/share/xorg/Xorg.1.log" for additional information.
[ 72.423] (EE)
[ 72.424] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 72.424] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 72.484] (EE) Server terminated with error (1). Closing log file.
')

.xinitrc
$this->bbcode_second_pass_code('', '
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi


if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi


if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi


if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi


# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi

#openbox-session
startfluxbox
')

.xserverrc
$this->bbcode_second_pass_code('', '
#!/bin/sh

# Recommended by https://wiki.archlinux.org/title/Xinit#xserverrc
#exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR

exec /usr/bin/X -nolisten tcp "$@"
')
Last edited by jyno on Tue Mar 22, 2022 3:06 pm, edited 2 times in total.
jyno
 
Posts: 67
Joined: Wed May 05, 2021 4:37 pm

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby jyno » Mon Mar 07, 2022 3:06 pm

BUMP. Please Help.
jyno
 
Posts: 67
Joined: Wed May 05, 2021 4:37 pm

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby solskogen » Tue Mar 08, 2022 4:29 pm

Looks to me that you're missing the xf86-video-fbdev package.
solskogen
 
Posts: 161
Joined: Mon Nov 18, 2013 10:41 am

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby jyno » Tue Mar 08, 2022 5:22 pm

I've installed the xf86-video-fbdev package after reading your post.
I'm still not able to start X.

$this->bbcode_second_pass_code('', '
[alarm@alarmpi ~]$ cat .local/share/xorg/Xorg.1.log
[ 31.523]
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
[ 31.524] Current Operating System: Linux alarmpi 5.10.27-3-ARCH #1 SMP Mon Apr 12 18:48:03 UTC 2021 armv7l
[ 31.524] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 root=/dev/mmcblk0p2 rw rootwait console=ttyS0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyS0,115200
[ 31.525]
[ 31.525] Current version of pixman: 0.40.0
[ 31.525] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 31.525] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 31.526] (==) Log file: "/home/alarm/.local/share/xorg/Xorg.1.log", Time: Tue Mar 8 17:19:01 2022
[ 31.537] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 31.540] (==) No Layout section. Using the first Screen section.
[ 31.540] (==) No screen section available. Using defaults.
[ 31.540] (**) |-->Screen "Default Screen Section" (0)
[ 31.540] (**) | |-->Monitor "<default monitor>"
[ 31.542] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 31.542] (==) Automatically adding devices
[ 31.542] (==) Automatically enabling devices
[ 31.542] (==) Automatically adding GPU devices
[ 31.542] (==) Automatically binding GPU devices
[ 31.542] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 31.549] (WW) The directory "/usr/share/fonts/misc" does not exist.
[ 31.549] Entry deleted from font path.
[ 31.549] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[ 31.549] Entry deleted from font path.
[ 31.550] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[ 31.550] Entry deleted from font path.
[ 31.550] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 31.550] Entry deleted from font path.
[ 31.566] (==) FontPath set to:
/usr/share/fonts/100dpi,
/usr/share/fonts/75dpi
[ 31.566] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 31.566] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 31.566] (II) Module ABI versions:
[ 31.566] X.Org ANSI C Emulation: 0.4
[ 31.566] X.Org Video Driver: 25.2
[ 31.566] X.Org XInput driver : 24.4
[ 31.566] X.Org Server Extension : 10.0
[ 31.576] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 31.581] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 31.581] (II) Platform probe for /sys/devices/platform/soc/soc:gpu/drm/card0
[ 31.584] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[ 31.586] (II) no primary bus or device found
[ 31.586] falling back to /sys/devices/platform/soc/soc:gpu/drm/card0
[ 31.586] (II) LoadModule: "glx"
[ 31.590] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 31.655] (II) Module glx: vendor="X.Org Foundation"
[ 31.655] compiled for 1.21.1.3, module version = 1.0.0
[ 31.655] ABI class: X.Org Server Extension, version 10.0
[ 31.655] (==) Matched modesetting as autoconfigured driver 0
[ 31.655] (==) Matched fbdev as autoconfigured driver 1
[ 31.655] (==) Assigned the driver to the xf86ConfigLayout
[ 31.655] (II) LoadModule: "modesetting"
[ 31.655] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 31.734] (II) Module modesetting: vendor="X.Org Foundation"
[ 31.734] compiled for 1.21.1.3, module version = 1.21.1
[ 31.734] Module class: X.Org Video Driver
[ 31.735] ABI class: X.Org Video Driver, version 25.2
[ 31.735] (II) LoadModule: "fbdev"
[ 31.735] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 31.738] (II) Module fbdev: vendor="X.Org Foundation"
[ 31.738] compiled for 1.21.1.1, module version = 0.5.0
[ 31.738] Module class: X.Org Video Driver
[ 31.738] ABI class: X.Org Video Driver, version 25.2
[ 31.738] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 31.738] (II) FBDEV: driver for framebuffer: fbdev
[ 31.738] (EE)
Fatal server error:
[ 31.738] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 31.738] (EE)
[ 31.738] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 31.738] (EE) Please also check the log file at "/home/alarm/.local/share/xorg/Xorg.1.log" for additional information.
[ 31.738] (EE)
[ 31.739] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 31.739] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 31.802] (EE) Server terminated with error (1). Closing log file.
')

New messages:
$this->bbcode_second_pass_code('', '
[ 31.735] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 31.738] (II) Module fbdev: vendor="X.Org Foundation"
[ 31.738] compiled for 1.21.1.1, module version = 0.5.0
[ 31.738] Module class: X.Org Video Driver
[ 31.738] ABI class: X.Org Video Driver, version 25.2
[ 31.738] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 31.738] (II) FBDEV: driver for framebuffer: fbdev
')
jyno
 
Posts: 67
Joined: Wed May 05, 2021 4:37 pm

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby solskogen » Wed Mar 09, 2022 7:56 am

Strange.

Could you post the output of
$this->bbcode_second_pass_code('', 'id')
solskogen
 
Posts: 161
Joined: Mon Nov 18, 2013 10:41 am

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby jyno » Wed Mar 09, 2022 4:57 pm

$this->bbcode_second_pass_code('', '
$ id
uid=1000(alarm) gid=1000(alarm) groups=1000(alarm),998(wheel)
')
jyno
 
Posts: 67
Joined: Wed May 05, 2021 4:37 pm

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby solskogen » Thu Mar 10, 2022 11:25 am

This is mine. I think you might be missing some groups.

$this->bbcode_second_pass_code('', 'uid=1000(solskogen) gid=1000(solskogen) groups=1000(solskogen),26(proc),50(games),90(network),94(floppy),96(scanner),98(power),971(libvirt),984(users),985(video),987(storage),989(render),990(optical),991(lp),992(kvm),993(input),994(disk),995(audio),998(wheel)
')
solskogen
 
Posts: 161
Joined: Mon Nov 18, 2013 10:41 am

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby jyno » Wed Mar 16, 2022 6:53 am

I guess this isn't the problem, beacuse on RPI4 the output is exactly the same and I'm able to open display.

On a 64-bit ArchLinux installation, id shows even less
$this->bbcode_second_pass_code('', 'uid=1000(mea) gid=1000(mea) groups=1000(mea)
') and I use a graphical desktop there too.

What can be the problem then?
jyno
 
Posts: 67
Joined: Wed May 05, 2021 4:37 pm

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby solskogen » Wed Mar 16, 2022 8:24 am

Can you post your /boot/config.txt?
solskogen
 
Posts: 161
Joined: Mon Nov 18, 2013 10:41 am

Re: Unable to startx Cannot open /dev/tty0 (Permission denie

Postby jyno » Wed Mar 16, 2022 2:10 pm

/boot/config.txt
$this->bbcode_second_pass_code('', '
$ cat /boot/config.txt
# See /boot/overlays/README for all available options

dtoverlay=vc4-kms-v3d
initramfs initramfs-linux.img followkernel

include kodi.config.txt
')

/boot/kodi.config.txt (posting because of "include kodi.config.txt")
$this->bbcode_second_pass_code('', '
$ cat /boot/kodi.config.txt
dtoverlay=vc4-kms-v3d,cma-512
dtoverlay=rpivid-v4l2
### leave this next entry blank as ensures dt parameters like dtparam=audio=on
### which could appear after "include kodi.config.txt" in /boot/config.txt are
### applied to the base dt instead of to the last dtoverlay loaded
dtoverlay=
disable_overscan=1
disable_fw_kms_setup=1

### RPi 4B/400 ONLY
### For 4k content @ 60 Hz refresh rate, uncomment hdmi_enable_4kp60=1
#
### If it breaks video output as detailed in the following bug, also uncomment
### force_turbo=1 see: https://github.com/raspberrypi/linux/issues/4446
#hdmi_enable_4kp60=1
#force_turbo=1

### uncomment to use the analog audio jack
### the 2nd option prevents crackling audio when HW accel decoding is active
#dtparam=audio=on
#audio_pwm_mode=1
')
jyno
 
Posts: 67
Joined: Wed May 05, 2021 4:37 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 8 guests