[backport] DRM devices opened by logind stay referenced indefinitely by PID 1

Bug #1777099 reported by Alex Tu on 2018-06-15
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
systemd (Ubuntu)
Alberto Milone
Alberto Milone

Bug Description


 * It should be possible to change DRM driver without rebooting.
 * It should be possible to correctly suspend & resume, whilst preserving driver state.
 * This bug is for userspace/logind fixes, required to get above working.
 * Related kernel change is https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1778658
 * https://github.com/torvalds/linux/commit/5775b843a619b3c93f946e2b55a208d9f0f48b59

[Test Case]

 * Test and verify that on machines with Nvidia discrete graphics, one can change performance/power-saving modes without rebooting.

[Regression Potential]

 * There are changes to the fd handling that are passed to logind. At worst, fd to the NVIDIA driver will still be held, and thus one would continue to not be able to switch graphics modes without rebooting.

[Other Info]

 * original bug report:

refer to https://github.com/systemd/systemd/issues/6908

we need that solution to make NVIDIA dGPU switching works.

impacted issue:

Alex Tu (alextu) on 2018-06-15
tags: added: ihv-nvidia
Changed in systemd:
status: Unknown → Fix Released
Changed in systemd (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → Triaged
Alex Tu (alextu) wrote :

the irc conversation about this patch:

Changed in systemd (Ubuntu):
status: Triaged → In Progress
Changed in systemd (Ubuntu Bionic):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alberto Milone (albertomilone)
Alberto Milone (albertomilone) wrote :

Attaching the debdiff

tags: added: patch
Dimitri John Ledkov (xnox) wrote :

v238 has all the required commits already, and it is in cosmic-proposed.

Changed in systemd (Ubuntu):
status: In Progress → Fix Committed
Steve Langasek (vorlon) wrote :

This bug is missing an SRU test case, which needs to be there before we accept this into bionic-proposed.

Changed in systemd (Ubuntu Bionic):
status: In Progress → Incomplete
description: updated
Changed in systemd (Ubuntu Bionic):
status: Incomplete → In Progress

Hello Alex, or anyone else affected,

Accepted systemd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Changed in oem-priority:
status: New → Triaged
Alberto Milone (albertomilone) wrote :

I have tested the new packages here, and I can confirm that they solve the problem.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 237-3ubuntu10.2

systemd (237-3ubuntu10.2) bionic; urgency=medium

  * logind: backport v238/v239 fixes for handling DRM devices.
    These changes introduce all the fixes that correct handling of open fd's
    related to the DRM devices, as used by for example NVIDIA GPUs. This backport
    includes some refactoring, corrections, and comment updates. This to insure
    that correct history is preserved, code comments match reality, and to ease
    backporting logind fixes in the future SRUs. (LP: #1777099)
  * Disable dh_installinit generation of tmpfiles for the systemd package.
    Replace with a manual safe call to systemd-tmpfiles which will process any
    updates to the tmpfiles shipped by systemd package, taking into account any
    overrides shipped by other packages, sysadmin, or specified in the runtime
    directories. (LP: #1748147)

systemd (237-3ubuntu10.1) bionic; urgency=medium

  [ Dimitri John Ledkov ]
  * hwdb: Fix wlan/rfkill keycode on Dell systems. (LP: #1762385)
  * Cherrypick upstream fix for corrected detection of Virtualbox & Xen.
    (LP: #1768104)
  * Further improve captive portal workarounds.
    Retry any NXDOMAIN results with lower feature levels, instead of just those
    with 'secure' in the domain name. (LP: #1766969)

  [ Michael Biebl ]
  * Add dependencies of libsystemd-shared to Pre-Depends.
    This is necessary so systemctl is functional at all times during a
    dist-upgrade. (Closes: #897986) (LP: #1771791)

  [ Mario Limonciello ]
  * Fix hibernate disk offsets.
    Configure resume offset via sysfs, to enable resume from a swapfile.
    (LP: #1760106)

 -- Dimitri John Ledkov 🌈 <email address hidden> Fri, 22 Jun 2018 13:55:09 +0100

Changed in systemd (Ubuntu Bionic):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for systemd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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