> 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.
> 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.