Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

X freezes when changing tty

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
barslmn
Posts: 6
Joined: 2018-05-14 10:59
Has thanked: 3 times

X freezes when changing tty

#1 Post by barslmn »

###### Problem
I am using i3wm on tty1. When I switch to tty2, login and logout with my user X freezes.

###### Info
1. Machine is thinkpad X220 with open source graphics drivers.
2. I am using debian stretch with only official stretch repos.
3. X does not freeze when I login&logout to tty2 as root.
4. I start X with .xinitrc. No login manager.
5. I don't start X while I am on tty2.
6. relevant part of my .bash_profile
if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec startx
fi

7. relevant part of X log
[142816.216] (II) AIGLX: Suspending AIGLX clients for VT switch
[142816.264] (II) systemd-logind: got pause for 13:68
[142816.264] (II) systemd-logind: got pause for 13:64
[142816.264] (II) systemd-logind: got pause for 226:0
[142816.264] (II) systemd-logind: got pause for 13:66
[142816.264] (II) systemd-logind: got pause for 13:70
[142816.264] (II) systemd-logind: got pause for 13:72
[142816.264] (II) systemd-logind: got pause for 13:65
[142816.264] (II) systemd-logind: got pause for 13:69
[142816.264] (II) systemd-logind: got pause for 13:81

8. I find this https://chrisdown.name/2016/10/18/x-fre ... pause.html. Looks kind of relevant but i already got one instance of dbus session.

Code: Select all

$ pgrep -ax dbus-daemon -U "$USER" | grep -- --session

Code: Select all

1334 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
9. X works normaly if I don't logout from tty2.

###### X crash
After logout from tty2 when returned to tty1 with X and i3wm if I press Ctrl+Alt+F1, X crashes with this log:
[ 5318.499] (EE) modeset(0): failed to set mode: Permission denied
[ 5318.499] (EE)
Fatal server error:
[ 5318.499] (EE) EnterVT failed for screen 0
[ 5318.499] (EE)
[ 5318.499] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 5318.499] (EE) Please also check the log file at "/home/bar/.local/share/xorg/Xorg.0.log" for additional information.
[ 5318.499] (EE)
[ 5318.499] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 5318.651] (EE) Server terminated with error (1). Closing log file.


I am guessing when I logut from tty2 it also logs me out from tty1.
Thanks for your time.
Last edited by barslmn on 2018-05-14 12:32, edited 1 time in total.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: X freezes when changing tty

#2 Post by bw123 »

resigned by AI ChatGPT

barslmn
Posts: 6
Joined: 2018-05-14 10:59
Has thanked: 3 times

Re: X freezes when changing tty

#3 Post by barslmn »

Solved Thanks :D . Dunno why I couldn't find it :? .

Instead of commenting it out I added && [ "$XDG_VTNR" -eq 1 ] so ~/.bash_logout looks like this:

Code: Select all

if [ "$SHLVL" = 1 ] && [ "$XDG_VTNR" -eq 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi

Post Reply