You are not logged in.
Hey all, I'm having major issues with X11 after running pacman -Syu last night.
I was initially greeted with this error log when I first booted up.
Since I was already late for class, I tried the first thing that came to mind, to add myself to the tty group, even though it had worked before without it. No luck, but I got a different error message.
I have no idea what is causing this. As a temporary solution so I could get to class, I used sudo chmod 777 /dev/tty2. Yes, I know how bad that is to do, but X forced my hand.
If anyone has any idea what could have changed that would result in this, I'd be immensely grateful.
Last edited by lost_eth0 (2021-04-14 15:14:14)
Offline
The first login is a permission issue, most likely because your rootless setup or xinitrc is broken.
The second log doesn't even try to maintain the tty.
https://wiki.archlinux.org/index.php/Xorg#Rootless_Xorg
Please explain how you start X11 and in doubt post your xinitrc and xserverrc.
On an unrelated sidenote, there log suggests some cruft in your /etc/X11/xorg.conf and you should™ not use a static layout to begin with.
Offline
Please explain how you start X11 and in doubt post your xinitrc and xserverrc.
I'm starting X11 after the default login screen (tty) via my .zprofile:
if systemctl -q is-active graphical.target \
&& [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
xinit &;
fi;My xinitrc isn't anything unusual, just the usual xresources stuff and this:
# XDG
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
# Set QT theme.
export QT_QPA_PLATFORMTHEME=qt5ct
# Set up X11 cursor.
export XCURSOR_THEME=Breeze_Obsidian xclock
export XCURSOR_SIZE=16
xsetroot -cursor_name left_ptr &
# Start daemons.
nohup mopidy > /dev/null &
nohup thunar --daemon > /dev/null &
nohup sxhkd > /dev/null &
# Start desktop.
nohup picom > /dev/null &
hsetroot -solid "#111111";
nohup polybar dracula-left > /dev/null &
nohup polybar dracula-right > /dev/null &
# Start window manager.
bspwmOn an unrelated sidenote, there log suggests some cruft in your /etc/X11/xorg.conf and you should™ not use a static layout to begin with.
Thats very possible. I just used the auto generated one and rolled with it, because if it ain't broke, don't fix it™.
Offline
"systemctl -q is-active graphical.target" is wrong, https://bbs.archlinux.org/viewtopic.php?id=253417 - it's meanwhile being reverted.
Also you probably want to "exec xinit" instead of forking it?
Likewise you probably want to "exec bspwm".
just the usual
Please post the actual file and also your xserverrc.
If you have no xserverrc, see the link I previously posted.
Offline
If the systemctl query is incorrect, would the best solution be to just check if $DISPLAY is unset? I think I copied that line from StackOverflow.
Heres the entire xinitrc:
#!/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
# XDG
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
# Set QT theme.
export QT_QPA_PLATFORMTHEME=qt5ct
# Set up X11 cursor.
export XCURSOR_THEME=Breeze_Obsidian xclock
export XCURSOR_SIZE=16
xsetroot -cursor_name left_ptr &
# Start daemons.
nohup mopidy > /dev/null &
nohup thunar --daemon > /dev/null &
nohup sxhkd > /dev/null &
# Start desktop.
nohup picom > /dev/null &
hsetroot -solid "#111111";
nohup polybar dracula-left > /dev/null &
nohup polybar dracula-right > /dev/null &
# Start window manager.
bspwm
# awesomeI have no xserverrc, so is the solution to copy /etc/X11/xinit/xserverrc to ~/.xserverrc and append the -keeptty option?
Offline
Offline
This is what I've come up with, although I can't test it immediately because I'm in class. Once I'm able to test, I'll mark this as solved. Thanks for your help, I really appreciate it.
.zprofile:
if [[ -z "${DISPLAY}" ]] && [[ "${XDG_VTNR}" == "$((1))" ]]; then
exec xinit;
fi;.xserverrc:
#!/bin/sh
exec /usr/bin/X -nolisten tcp "$@" "vt${XDG_VTNR}"Offline
if [[ -z "${DISPLAY}" ]]
Why the double-brackets?
[[ "${XDG_VTNR}" == "$((1))" ]]
"$((1))" is a way to say "1", bu so is "$((3**2-2**3))" …
Offline
Just to keep consistency with the other scripts on my system i guess. The "$((1))" is overkill though.
Offline
Confirmed to work! Thanks so much for the help.
Offline
I also saw this problem in an Arch guest VM (permission denied on /dev/fb0). My workaround was to add the user to the video group.
Offline
Arch guest VM issue with xdm here:
graphical.target is not available when xdm tries to start.
After graphical.target is ready xdm can be manually started.
Offline
Thus enable early KMS to have the graphical target ready earlier?
Offline
Is this problem universal to all DMs, e.g. GDM, lightdm etc?
Did anything change in the past 6months, perhaps the systemd service startup order?
How does KMS help here and what needs to be done exactly? I can test. (VirtualBox VMSVGA card)
Ty.
Last edited by pm3840 (2021-04-15 13:11:23)
Offline
Yup, suspected culprit is systemd which starts the graphical.target too early (and also because it's fun to blame lennart…)
KMS helps nothing, but getting there in the iniramfs will ensure that the graphical.target doesn't start too early.
Sorry, I just noticed that this wasn't actualy discussed in ITT, but it's the most common problem during the last months.
https://wiki.archlinux.org/index.php/Ke … _KMS_start
Offline