1

I am following the guideline in multiple-desktops-on-one-linux-pc to start another X session. If I switch to VT-3, I can successfully start a new X session using

startx gnome-session -- :1

or

startx -display :1 -- :1 vt3 &

However, when I switch back to my original X session running on VT-7 by pressing Ctrl+Alt+F7, I find that the X server has crashed and it keeps crashing every time I go back to the second X-server. However, if I switch to VT-3 and back to VT-7 without starting a second x session, my original x server does not crash. And if I switch from my second xserver on tty3 to another tty like tty2 then back to my original x-server on Ctrl-Alt-F7, the xserver does not crash. The crash only happens if I switch from VT-3 to VT-7 after starting a second X session in VT-3.

Looking at Xorg.0.log I found these error messages

[ 22162.112] (II) event2  - Power Button: device removed
[ 22162.136] (II) event4  - Video Bus: device removed
[ 22162.161] (II) event1  - Sleep Button: device removed
[ 22162.193] (II) event14 - Integrated Camera: Integrated C: device removed
[ 22162.233] (II) event3  - AT Translated Set 2 keyboard: device removed
[ 22162.249] (II) event5  - SynPS/2 Synaptics TouchPad: device removed
[ 22162.281] (II) event6  - ThinkPad Extra Buttons: device removed
[ 22162.313] (II) event15 - py-evdev-uinput: device removed
[ 22162.329] (II) event15 - py-evdev-uinput: device removed
[ 22162.361] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 22175.090] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 22175.091] (EE) modeset(0): drmSetMaster failed: Invalid argument
[ 22175.091] (EE) modeset(0): failed to set mode: Permission denied
[ 22175.091] (EE) 
Fatal server error:
[ 22175.091] (EE) EnterVT failed for screen 0
[ 22175.091] (EE) 
[ 22175.091] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[ 22175.091] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 22175.091] (EE) 
[ 22175.091] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 22175.134] (EE) Server terminated with error (1). Closing log file.

I am unsure what the reason for the crash is or how to fix it. Looking up this error message, most people seem to talk about graphic or nvidia drivers, but I did not change the drivers since installing my distro and I don't have an nvidia graphic cards. A similar issue was posted in question: Switching to a second X session kills the first, but I don't think I have the driver problem as grep "nouveau" /var/log/syslog returns nothing.

Any help is much appreciated.

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
Tohiko
  • 307
  • 2
  • 9

1 Answers1

1

Unfortunately the manual you were following is too old and does not reflect the fact that modern display managers does not have to support multiple sessions started by startx. For example this is the case of LightDM. Supported way how to run a new session with LightDM is in using following command:

dm-tool switch-to-greeter

After this command the previous Xsession on VT-7 is locked and a new Xsession is opened on VT-8 so another user can log in. Switching between sessions by using CTRL-ALT-F7 and CTRL-ALT-F8 works as usual (this switching does not lock the previous Xsession).

I posted an answer in the question Switching to a second X session kills the first you mentioned because this question specifically mentions LightDM.

Another display managers have their own way (GDM probably uses gdmflexiserver) so solution for you depends on the display manager you use.

If there is a necessity to run another Xserver (besides the one already running) you could try to follow thorough answer https://askubuntu.com/a/519164/981550 (from question https://askubuntu.com/questions/518454/what-does-startx-command-do) which proposes using Xnest (a graphic server-within-a-server).

Signy
  • 21
  • 4