Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
DRM devices opened by logind stay referenced indefinitely by PID 1 #6908
Comments
Nightbane112
referenced this issue
in Witko/nvidia-xrun
Sep 26, 2017
Closed
Unable to unload nvidia_drm #32
|
logind manages device access for graphical display services, so that they lose access to input and DRM when the user switches away from them using Alt-Fn. For that it keeps the devices open. However, there's a bug lurking. In order to make logind rrestartable without losing all display managers logind nowadays pushes open device fds into PID 1 while running, so that they stay referenced. However, they are currently never removed there except if the devices physically go away (i.e. when POLLERR or POLLHUP is seen). I figure this needs to be fixed, and logind needs to ask PID 1 to release devices before that. |
poettering
added
login
pid1
labels
Sep 27, 2017
poettering
changed the title from
nvidia_drm remains in use for no apparent reason after Xorg shutdown
to
DRM devices opened by logind stay referenced indefinitely by PID 1
Sep 27, 2017
|
@poettering There's something quite annoying I've observed but not bothered to investigate yet on my debian 9 (v232) system which may be related:
The VC1 Xorg exit don't manifest if I leave VC2 at the shell, skipping step #5, and switch via Alt-F1, everything works just fine and dandy. I don't understand why VC2's shell exiting didn't simply return me to a VC2 login prompt; I don't necessarily want to switch back to VC1 immediately. Does this sound related/familiar/expected? Should I file a separate bug? |
Atavic
commented
Sep 27, 2017
|
That's another issue IMHO |
added a commit
to poettering/systemd
that referenced
this issue
Nov 13, 2017
poettering
referenced this issue
Nov 13, 2017
Merged
add new FDSTOREREMOVE=1 sd_notify() message #7316
|
Fix waiting in #7316 |
|
Some testing that #7316 actually does what it is supposed to do would be very welcome, as I lack the hatrdware/drivers this was originally reported about. Thank you |
poettering
added
the
has-pr
label
Nov 13, 2017
added a commit
to poettering/systemd
that referenced
this issue
Nov 14, 2017
kokoko3k
commented
Nov 14, 2017
|
Just tested, and now the module is freed correctly, thank you! |
kokoko3k
closed this
Nov 14, 2017
|
Please leave this open until the PR is merged. In fact, github will merge this issue automatically as soon as #7316 is merged. |
kokoko3k commentedSep 25, 2017
Submission type
systemd version the issue has been seen with
Used distribution
Hi, i'm trying to Nvidia "Reverse Prime" with a gtx750 + intel hd4000
Displays are attached to the intel connectors.
What i've done so far:
My xorg.conf:
.xinitrc:
System starts with intel as the primary adapter, nvidia modules are NOT autoloaded.
So i do:
modprobe nvidia-drm
modprobe nvidia_modeset
modprobe nvidia
All is good whitin the X server, and works as expected, but what seems wrong to me is that as i exit the Xorg session, nvidia_drm remains in use.
It took me a while to understand, but there was an open handle to /dev/dri/card1 (nvidia):
It prevents me from unloading nvidia_drm and i need to do that to pass the gpu to a libvirt domain.
Manually use gdb to attach systemd and closing the handle makes it work, but i cannot do that (systemd crashes badly that way).
Note that the open handles i am speaking about increases by on on every xorg restart.
Who is to blame? nvidia driver? Modesetting driver?
As pointed by Aaron Plattner, stopping and starting systemd-logind "frees" the handle.
Is this expected? Any way to avoid?
Thanks