I get logged out immediately after login to an X session (QXL Xorg driver on kernel 5.4)

Bug #1864644 reported by Chris Ward
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd
Unknown
Unknown
systemd (Ubuntu)
Fix Released
High
Balint Reczey
Focal
Fix Released
High
Balint Reczey
xserver-xorg-video-qxl (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Invalid
Undecided
Unassigned

Bug Description

I just installed ubuntu 20.04 in a virtual machine and did 'apt-get update;apt-get upgrade' to get current (using Ctl-Alt-F2 to get a non-X session). After that, I tried logging in to a gnome session, and got logged out during login processing. This happened a few times; then I installed xfce4, rebooted, and got the same behaviour (logout during login processing) while trying to log in to an xfce session.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xorg 1:7.7+19ubuntu14
ProcVersionSignature: Ubuntu 5.4.0-14.17-generic 5.4.18
Uname: Linux 5.4.0-14-generic x86_64
ApportVersion: 2.20.11-0ubuntu18
Architecture: amd64
Date: Tue Feb 25 12:06:47 2020
DistUpgraded: Fresh install
DistroCodename: focal
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes
GraphicsCard:
 Red Hat, Inc. QXL paravirtual graphic card [1b36:0100] (rev 04) (prog-if 00 [VGA controller])
   Subsystem: Red Hat, Inc. QEMU Virtual Machine [1af4:1100]
InstallationDate: Installed on 2020-02-25 (0 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200124)
Lsusb:
 Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Lsusb-t:
 /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
 /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
 /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
 /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
     |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=linux
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-14-generic root=UUID=14c5cf63-466a-44d5-add6-bd5fc486c067 ro quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.12.0-1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-eoan
dmi.modalias: dmi:bvnSeaBIOS:bvr1.12.0-1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-eoan:cvnQEMU:ct1:cvrpc-i440fx-eoan:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-eoan
dmi.sys.vendor: QEMU
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.100-4
version.libgl1-mesa-dri: libgl1-mesa-dri 20.0.0-1ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.20.7-2ubuntu1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20190815-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1

Revision history for this message
Chris Ward (tjcw) wrote :
Revision history for this message
Chris Ward (tjcw) wrote :

Here is the output from 'journalctl'. I think it shows X11 taking a SIGABRT (signal 6) but I cannot find any X11 log files in /var/log . My next tack will be to try installing a new version of ubuntu 20.04 .

Revision history for this message
Chris Ward (tjcw) wrote :

I just downloaded today's build of Focal Fossa (25 Feb 2020, sha256sum 7cdae20c68d9fb1854024ee5e77cee00dfb6e27b9502be6bc15ff5a050b0d259 ) and got the same problem. This is probably specific to running in a virtual machine; I am using the virt-manager in Ubuntu 19.10 up-to-date as of 25 Feb 2020; since if it happened on real hardware then everyone trying Focal Fossa would run into the problem.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There's a lot of information in that log. One possible reason for this bug I can see is:

Feb 25 11:06:55 tjcw-Standard-PC-i440FX-PIIX-1996 /usr/lib/gdm3/gdm-x-session[882]: (WW) qxl(0): drmSetMaster failed: Permission denied
...
Feb 25 11:06:55 tjcw-Standard-PC-i440FX-PIIX-1996 /usr/lib/gdm3/gdm-x-session[882]: (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
Feb 25 11:06:55 tjcw-Standard-PC-i440FX-PIIX-1996 /usr/lib/gdm3/gdm-x-session[882]: (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

This means there's some kind of incompatibility between the qxl Xorg driver and the kernel. Indeed that would only be a problem for virtual machines.

affects: xorg (Ubuntu) → xserver-xorg-video-qxl (Ubuntu)
summary: - I get logged out immediately after login to an X session
+ I get logged out immediately after login to an X session (QXL Xorg
+ driver on kernel 5.4)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Does logging into "Ubuntu on Wayland" (choose that on the login screen) avoid the problem?

tags: added: champagne
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Ward (tjcw) wrote :

The login screen doesn't offer a "Ubuntu on Wayland" option; the options offered are
GNOME on Xorg
GNOME + Remmina Kiosk
Ubuntu
Xfce Session

All 4 options log me out immediately after login

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I suggest as a workaround to try and reconfigure the VM itself to use a different virtual GPU type which then doesn't require the guest OS to use the qxl driver.

tags: added: rls-ff-incoming
Revision history for this message
Chris Ward (tjcw) wrote :

How do I reconfigure the VM to do this ?

affects: linux (Ubuntu) → systemd (Ubuntu)
Revision history for this message
Iain Lane (laney) wrote :

The messages Daniel found in comment #4 indicate a systemd issue that I fixed upstream a few months ago. I'm sorry, I thought we already had the fix in Ubuntu but it seems we don't - it's in v245.

We need the commits

625077264ba01a108386eeea733ee244e6b7ff14
867af7282b2eccab53727714172b1081532ca8de (actually this is optional)
d5016c21d7bb60f38aa461887cd843fabbc986ca
3a827125e70aa2cabbb97334f75576229efd6868 (also optional but we should take it)

to fix this issue.

You can read the upstream issue: https://github.com/systemd/systemd/issues/14322 for more information.

Changed in xserver-xorg-video-qxl (Ubuntu):
status: New → Invalid
Revision history for this message
Iain Lane (laney) wrote :

Rationale for high: if you hit this bug, you cannot log in to a desktop system, since logind can't access the DRM device nodes

Changed in systemd (Ubuntu):
importance: Undecided → High
Steve Langasek (vorlon)
Changed in systemd (Ubuntu):
status: Confirmed → Triaged
tags: removed: champagne rls-ff-incoming
tags: added: id-5e6a5656faaf574535da3ea6
Revision history for this message
Balint Reczey (rbalint) wrote :

Fixed by landing 245 to Focal.

Changed in systemd (Ubuntu Focal):
assignee: nobody → Balint Reczey (rbalint)
status: Triaged → Fix Released
Revision history for this message
Chris Ward (tjcw) wrote :

Yes, this is fixed in today's build of Focal Fossa. The bug can be closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.