You are not logged in.

#1 2021-04-14 12:53:07

lost_eth0
Member
From: USA
Registered: 2020-07-31
Posts: 30
Website

[SOLVED] X11 not loading after last full system upgrade

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

#2 2021-04-14 13:08:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: [SOLVED] X11 not loading after last full system upgrade

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

#3 2021-04-14 13:15:33

lost_eth0
Member
From: USA
Registered: 2020-07-31
Posts: 30
Website

Re: [SOLVED] X11 not loading after last full system upgrade

seth wrote:

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.
bspwm
seth wrote:

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.

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

#4 2021-04-14 13:20:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: [SOLVED] X11 not loading after last full system upgrade

"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

#5 2021-04-14 13:29:24

lost_eth0
Member
From: USA
Registered: 2020-07-31
Posts: 30
Website

Re: [SOLVED] X11 not loading after last full system upgrade

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
# awesome

I have no xserverrc, so is the solution to copy /etc/X11/xinit/xserverrc to ~/.xserverrc and append the -keeptty option?

Offline

#6 2021-04-14 13:32:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Offline

#7 2021-04-14 13:43:51

lost_eth0
Member
From: USA
Registered: 2020-07-31
Posts: 30
Website

Re: [SOLVED] X11 not loading after last full system upgrade

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

#8 2021-04-14 13:53:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: [SOLVED] X11 not loading after last full system upgrade

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

#9 2021-04-14 14:08:09

lost_eth0
Member
From: USA
Registered: 2020-07-31
Posts: 30
Website

Re: [SOLVED] X11 not loading after last full system upgrade

Just to keep consistency with the other scripts on my system i guess. The "$((1))" is overkill though.

Offline

#10 2021-04-14 15:13:39

lost_eth0
Member
From: USA
Registered: 2020-07-31
Posts: 30
Website

Re: [SOLVED] X11 not loading after last full system upgrade

Confirmed to work! Thanks so much for the help.

Offline

#11 2021-04-14 19:07:56

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [SOLVED] X11 not loading after last full system upgrade

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

#12 2021-04-15 09:52:11

pm3840
Member
Registered: 2013-12-16
Posts: 67

Re: [SOLVED] X11 not loading after last full system upgrade

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

#13 2021-04-15 13:03:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: [SOLVED] X11 not loading after last full system upgrade

Thus enable early KMS to have the graphical target ready earlier?

Offline

#14 2021-04-15 13:10:32

pm3840
Member
Registered: 2013-12-16
Posts: 67

Re: [SOLVED] X11 not loading after last full system upgrade

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

#15 2021-04-15 13:18:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: [SOLVED] X11 not loading after last full system upgrade

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

Board footer

Powered by FluxBB