4

I'm running into a strange problem here. I have a Linux box with the following (summarized) configuration:

  • Dell Inspiron i5
  • NVIDIA GP108M
  • GNU/Linux Debian "testing"
  • xorg-server 2:1.20.0-3

According to my Xorg.0.log, the driver I'm running is "nouveau":

[ 30442.522] (II) LoadModule: "nouveau"  
<SNIP>
[ 30442.777] (--) NOUVEAU(G0): Chipset: "NVIDIA NV138"

My greeter is LightDM and my DM is Xfce. I attempt to start a second session with user2 with the following procedure:

  1. Switch to VT-1 (Ctrl+Alt+F1)
  2. Log in with user2
  3. Run startx -- :1

There's no greeter. user2's Xfce session is running. I can verify that both sessions are running with htop.

However, when I switch back to VT-7 (Ctrl+Alt+F7) I see that user1's session has been terminated. VT-7 is back to the greeter.


Information from the logs

Whenever I switch between VTs, there's a stack trace in syslog. However this does not mean any X session has been killed yet.

For example, I start my Xfce session with user1 on VT-7. Then I switch to VT-1 and back to VT-7. The following (summarized) error appears twice on syslog:

kernel: ------------[ cut here ]------------
kernel: nouveau 0000:01:00.0: timeout
kernel: WARNING: CPU: 0 PID: 1783 at /build/linux-0buYvw/linux-4.17.8/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c:86 nvkm_pmu_reset+0x14c/0x160 [nouveau]
---[ cut 4 lines ]---
kernel: Hardware name: Dell Inc. Inspiron 7472/0WFX2M, BIOS 1.1.3 01/25/2018
kernel: RIP: 0010:nvkm_pmu_reset+0x14c/0x160 [nouveau]
---[ cut 9 lines ]---
kernel: Call Trace:
kernel:  nvkm_pmu_init+0x16/0x40 [nouveau]
kernel:  nvkm_subdev_init+0xb2/0x1f0 [nouveau]
kernel:  nvkm_device_init+0x132/0x270 [nouveau]
kernel:  nvkm_udevice_init+0x41/0x60 [nouveau]
kernel:  nvkm_object_init+0x3d/0x180 [nouveau]
kernel:  nvkm_object_init+0xa0/0x180 [nouveau]
kernel:  nvkm_object_init+0xa0/0x180 [nouveau]
kernel:  ? pci_restore_standard_config+0x40/0x40
kernel:  nouveau_do_resume+0x28/0x140 [nouveau]
kernel:  nouveau_pmops_runtime_resume+0x88/0x150 [nouveau]
kernel:  pci_pm_runtime_resume+0x78/0xb0
kernel:  __rpm_callback+0xc7/0x200
kernel:  ? pci_restore_standard_config+0x40/0x40
kernel:  rpm_callback+0x1f/0x70
kernel:  ? pci_restore_standard_config+0x40/0x40
kernel:  rpm_resume+0x4c4/0x790
kernel:  ? do_wp_page+0x154/0x500
kernel:  __pm_runtime_resume+0x47/0x70
kernel:  nouveau_drm_ioctl+0x35/0xc0 [nouveau]
kernel:  do_vfs_ioctl+0xa4/0x630
kernel:  ? handle_mm_fault+0xdc/0x210
kernel:  ksys_ioctl+0x70/0x80
kernel:  __x64_sys_ioctl+0x16/0x20
kernel:  do_syscall_64+0x55/0x110
kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
----[ cut 8 lines ]--- 
kernel: ---[ end trace 81b347516b37c927 ]---

Now I switch to VT-1, log in with user2 and run startx -- :0. Still, no session has been killed yet, and I can confirm that with htop.

But, if I now switch from an X session on VT-1 to another X session on VT-7, this appears in syslog

pulseaudio[3372]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
pulseaudio[3372]:       after 17 requests (17 known processed) with 0 events remaining.
xfce4-notifyd[3565]: xfce4-notifyd: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. 
at-spi-bus-launcher[1368]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
at-spi-bus-launcher[1368]:       after 443 requests (443 known processed) with 0 events remaining.
systemd[1308]: xfce4-notifyd.service: Main process exited, code=exited, status=1/FAILURE
systemd[1308]: xfce4-notifyd.service: Failed with result 'exit-code'.
systemd[1308]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
systemd[1308]: pulseaudio.service: Failed with result 'exit-code'.
systemd[1308]: pulseaudio.service: Service RestartSec=100ms expired, scheduling restart.
systemd[1308]: pulseaudio.service: Scheduled restart job, restart counter is at 3.
systemd[1308]: Stopped Sound Service.
systemd[1308]: Starting Sound Service...
rtkit-daemon[1552]: Successfully made thread 3898 of process 3898 (n/a) owned by '1000' high priority at nice level -11.
rtkit-daemon[1552]: Supervising 4 threads of 2 processes of 2 users.
pulseaudio[3898]: W: [pulseaudio] pid.c: Stale PID file, overwriting.
avahi-daemon[644]: Withdrawing address record for ---[ IPv6 redacted ]--- on enp2s0.
lightdm[3907]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files

VT-7 is back to the greeter. The X server was restarted (?).

Regarding Xorg.0.log, the following lines are appended when I switch from VT-1 to VT-7 and the session is killed.

[ 15945.806] (II) event7  - Power Button: device removed
[ 15945.832] (II) event10 - Video Bus: device removed
[ 15945.848] (II) event11 - Video Bus: device removed
[ 15945.877] (II) event5  - Power Button: device removed
[ 15945.908] (II) event6  - Sleep Button: device removed
[ 15945.933] (II) event1  - Microsoft Wired Keyboard 600: device removed
[ 15945.953] (II) event20 - PixArt Microsoft USB Optical Mouse: device removed
[ 15945.972] (II) event12 - Integrated Webcam: Integrated W: device removed
[ 15945.988] (II) event8  - DELL0828:00 06CB:7E7E Touchpad: device removed
[ 15946.021] (II) event3  - Intel HID events: device removed
[ 15946.044] (II) event9  - Dell WMI hotkeys: device removed
[ 15946.068] (II) event0  - AT Translated Set 2 keyboard: device removed
[ 15946.084] (II) event21 - PS/2 Generic Mouse: device removed
[ 15946.101] (II) event2  - Microsoft Wired Keyboard 600: device removed
[ 15946.116] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 15946.117] (II) NOUVEAU(G0): NVLeaveVT is called.
giusti
  • 1,797
  • 2
  • 15
  • 30
  • 1
    Guess: Something is screwed up when multiple X drivers try to use the same kernel DRM module. Any error messages in `Xorg.0.log` or `Xorg.1.log`, or in `dmesg`, or in syslog? – dirkt Aug 20 '18 at 10:06
  • I added information about the logs into the question. Your point about multiple X drivers may be very relevant. If I log out from `user2`'s session before switching back to VT-7, the stack trace still is logged, but the `user1`'s session is not terminated. – giusti Aug 23 '18 at 16:59
  • This also appears in `kern.log`, but I could not determine exactly why or when: `traps: light-locker[4899] trap int3 ip:7f0d8e2d4c41 sp:7ffd851111d0 error:0 in libglib-2.0.so.0.5600.1[7f0d8e283000+113000]` – giusti Aug 23 '18 at 17:01

3 Answers3

2

You have a kernel crash in the nouveau module, which will screw up the DRM module, which in turn will screw up an X server connecting to that module when it hits the bad state.

Upgrade to the newest kernel and matching nouveau module possible. If you still get the same crash, file a bug report with the nouveau developers. Make sure to include the full dmesg and Xorg.*.log.

dirkt
  • 31,679
  • 3
  • 40
  • 73
  • So my guess is that this crash screws up something that has to do with switching VTs. There's probably nothing special with VT7, it's just the order in which the crash happens, and which internal structures get screwed up. But you'll have to ask the nouveau developers for details. – dirkt Aug 23 '18 at 18:14
1

The problem is in the fact that LightDM does not support multiple sessions started by startx. Startx is an old way how to run multiple sessions but does not have to be supported by some modern systems. There is a supported way how to log another user on another VT with LightDM: user just needs to open a terminal window and run 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). Info about all running seats provides this command:

dm-tool list-seats

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
0

I have the same behavior with Debian buster on a Raspberry Pi, so no nouveau.

When I use startx on tty1-6, the session started by lightdm in tty7 is terminated and returns to the greeter. I can however start multiple sessions manually with startx and switch between them without problems.

(Sorry this is not really an answer but maybe it counts as a workaround)

Justin Sane
  • 61
  • 1
  • 4