You are not logged in.

#1 2018-10-13 22:27:48

pepemopap
Member
Registered: 2015-09-30
Posts: 49

tty exit causes X crash

Hi! I dont like graphical login and prefer boot in multi-user.target mode and do a startx when login. Howerver i have the same issue in all my computers using or not lightdm:

TEST 1
  * Login in tty1 and run startx. X start normally.
  * Go to tty2 and login. When exec exit in tty2 then X window in tty1 crashes.

TEST 2
  * Login in tty2 and run startx. X start normally.
  * Go to tty1 and login. When exec exit in tty1 then X window in tty2 crashes.

TEST 3
  * Login in tty2 and run startx. X start normally.
  * Go to tty3 and login. When exec exit in tty3 X window in tty2 run normally and no crash.


Only when login in tty1 for run startx or for run exit when X is running in other tty have the same issue.
Any ideas? Thanks

This is the ouput:

X.Org X Server 1.19.2
Release Date: 2017-03-02
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.9.0-4-amd64 x86_64 Debian
Current Operating System: Linux nar-laptop 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u5 (2018-09-30) x86_64
Kernel command line: \\boot\vmlinuz-4.9.0-8-amd64 ro root=UUID=8e9e56a9-3442-4e0c-b0db-2a587e48a445 initrd=boot\initrd.img-4.9.0-8-amd64
Build Date: 16 October 2017  08:19:45AM
xorg-server 2:1.19.2-1+deb9u2 (https://www.debian.org/support) 
Current version of pixman: 0.34.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/nar/.local/share/xorg/Xorg.0.log", Time: Sun Oct 14 00:28:27 2018
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) 
Fatal server error:
(EE) EnterVT failed for screen 0
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/home/nar/.local/share/xorg/Xorg.0.log" for additional information.
(EE) 
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) Server terminated with error (1). Closing log file.
xinit: connection to X server lost

waiting for X server to shut down 

The error "xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)" is showed always, not only when X crash.

Last edited by pepemopap (2018-10-13 22:35:32)

Offline

#2 2018-10-14 01:47:12

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,668
Website

Re: tty exit causes X crash

Confirmed on my machine too.

TEST 4
  * Login to tty1 but do not startx.
  * Login in tty3 and run startx. X starts normally.
  * Go to tty1 and exit. X window in tty3 runs normally and no crash.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#3 2018-10-14 02:08:36

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,668
Website

Re: tty exit causes X crash

There might be a hint in one of the Xorg log files in ~/.local/share/xorg/
Comparing the files after a successful xorg start with one that crashed out, the crashed-out session had this at the end (edited):

[   158.943] (**) Option "fd" "20"
[   158.943] (**) Option "fd" "23"
[   158.944] (**) Option "fd" "24"
[   158.944] (**) Option "fd" "25"
[   158.944] (**) Option "fd" "26"
[   158.944] (**) Option "fd" "27"
[   158.944] (**) Option "fd" "25"
[   158.944] (II) AIGLX: Suspending AIGLX clients for VT switch
[   159.010] (II) systemd-logind: got pause for 13:66
...
[   163.224] (II) systemd-logind: got resume for 226:0
[   163.224] (II) AIGLX: Resuming AIGLX clients after VT switch
[   163.300] (II) modeset(0): EDID vendor "BNQ", prod id 30981
[   163.300] (II) modeset(0): Using EDID range info for horizontal sync
[   163.300] (II) modeset(0): Using EDID range info for vertical refresh
[   163.300] (II) modeset(0): Printing DDC gathered Modelines:
...
[   169.202] (II) AIGLX: Suspending AIGLX clients for VT switch
[   169.256] (II) systemd-logind: got pause for 13:66
...
...
[   174.967] (II) modeset(0): Modeline "1280x960"x0.0  108.00  1280 1376 1488 1800  960 961 964 1000 +hsync +vsync (60.0 kHz e)
...
[   174.989] (II) input device 'HP WMI hotkeys', /dev/input/event10 is a keyboard
[   174.989] (II) systemd-logind: got resume for 13:64
...
[   182.854] (II) AIGLX: Suspending AIGLX clients for VT switch
[   182.909] (II) systemd-logind: got pause for 13:66
...
[   231.568] (II) systemd-logind: got resume for 226:0
[   231.573] (II) AIGLX: Resuming AIGLX clients after VT switch
[   231.617] (II) modeset(0): Modeline "1440x900"x0.0  106.50  1440 1520 1672 1904  900 903 909 932 -hsync +vsync (55.9 kHz eP)
...
[   231.624] (II) failed to create input device '/dev/input/event4'.
[   231.626] [dix] couldn't enable device 6
[   231.627] (II) failed to create input device '/dev/input/event3'.
[   231.627] [dix] couldn't enable device 7
[   231.627] (II) failed to create input device '/dev/input/event1'.
[   231.627] [dix] couldn't enable device 9
[   231.627] (II) failed to create input device '/dev/input/event2'.
[   231.627] [dix] couldn't enable device 10
[   231.627] (II) failed to create input device '/dev/input/event10'.
[   231.627] [dix] couldn't enable device 11
[   231.627] [dix] couldn't enable device 12
[   231.628] (WW) modeset(0): flip queue failed: Permission denied
[   231.628] (WW) modeset(0): Page flip failed: Permission denied
[   231.628] (EE) modeset(0): present flip failed
[   231.628] (II) systemd-logind: got resume for 13:64
[   231.628] (II) failed to create input device '/dev/input/event0'.
[   231.628] [dix] couldn't enable device 8
[   231.628] (II) systemd-logind: got pause for 13:66
[   231.628] (II) systemd-logind: got pause for 13:68
[   231.628] (II) systemd-logind: got pause for 13:67
[   231.628] (II) systemd-logind: got pause for 13:65
[   231.628] (II) systemd-logind: got pause for 13:74
[   231.628] (II) systemd-logind: got pause for 226:0
[   231.628] (II) systemd-logind: got pause for 13:64
[   231.634] (WW) modeset(0): flip queue failed: Permission denied
[   231.634] (WW) modeset(0): Page flip failed: Permission denied
[   231.634] (EE) modeset(0): present flip failed
[   231.637] (WW) modeset(0): flip queue failed: Permission denied
[   231.637] (WW) modeset(0): Page flip failed: Permission denied
[   231.637] (EE) modeset(0): present flip failed
...
[   236.589] (WW) modeset(0): flip queue failed: Permission denied
[   236.589] (WW) modeset(0): Page flip failed: Permission denied
[   236.589] (EE) modeset(0): present flip failed
[   236.783] (II) AIGLX: Suspending AIGLX clients for VT switch
[   236.783] (II) AIGLX: Resuming AIGLX clients after VT switch
[   236.783] (EE) modeset(0): failed to set mode: Permission denied
[   236.783] (EE) 
Fatal server error:
[   236.783] (EE) EnterVT failed for screen 0
[   236.783] (EE) 
[   236.783] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[   236.783] (EE) Please also check the log file at "/home/john/.local/share/xorg/Xorg.0.log" for additional information.
[   236.783] (EE) 
[   236.783] (II) AIGLX: Suspending AIGLX clients for VT switch
[   236.896] (EE) Server terminated with error (1). Closing log file.

This Debian bug looks the same: https://bugs.debian.org/cgi-bin/bugrepo … bug=834270
Although, unlike the last commenter, I also found (as you did) that X started on tty2 will crash after a login/out on tty1.

You might try the suggested edit to ~/.bash_logout here: https://bugs.debian.org/cgi-bin/bugrepo … =834270#15 (with its privacy implications).

Last edited by johnraff (2018-10-14 02:27:45)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#4 2018-10-14 09:22:30

pepemopap
Member
Registered: 2015-09-30
Posts: 49

Re: tty exit causes X crash

johnraff wrote:

Confirmed on my machine too.

TEST 4
  * Login to tty1 but do not startx.
  * Login in tty3 and run startx. X starts normally.
  * Go to tty1 and exit. X window in tty3 runs normally and no crash.

Samet o me, X in tty3 no crash but tint2 crash and get sound popup error.

Offline

#5 2018-10-14 09:31:17

pepemopap
Member
Registered: 2015-09-30
Posts: 49

Re: tty exit causes X crash

johnraff wrote:

You might try the suggested edit to ~/.bash_logout here: https://bugs.debian.org/cgi-bin/bugrepo … =834270#15 (with its privacy implications).

Efeffectively, changing clear_console for clear or reset in .bash_logout solve the problem. Similar comments here: https://unix.stackexchange.com/question … ash-logout

Whats is the difference between clear and clear_console? And why clear tty if console is cleared when exit and new login load the issue file? Admins could read the last output using the tty file?

Last edited by pepemopap (2018-10-14 10:56:51)

Offline

#6 2018-10-14 09:39:24

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: tty exit causes X crash

iirc, some distros are setup to start X on a different tty than the one it is started from.
on my archlinux system startx starts X in the same tty.
I am pretty sure i remember that this is configurable.

look at this, esp. "This is handled by the default /etc/X11/xinit/xserverrc."
and this (opposite case, and old).

Offline

Board footer

Powered by FluxBB