Comment 27 for bug 1307069

Revision history for this message
Alberto Milone (albertomilone) wrote : Re: [Bug 1307069] Re: gpu-manager causing long startup delays

On 28-10-15 13:56:42, Martin Pitt wrote:
> > The module can be loaded on boot and then it can (automatically) be
> unloaded (at some point) if the GPU is disabled in a hybrid system.
>
> Then I suggest to install an udev rule like
>
> ACTION=="remove", SUBSYSTEM=="module", DEVPATH=="*/nvidia",
> RUN+="/bin/touch /run/nvidia_unloaded"
>
> (this assumes the module is called "nvidia.ko" -- adjust the DEVPATH
> match as appropriate) and check whether /run/nvidia_unloaded exists.
>

That is only part of what I need though, is there a udev rule that can
print out the PCI BusID of the device when the module is loaded?