You are not logged in.

#1 2016-01-29 17:33:24

dgall
Member
Registered: 2016-01-29
Posts: 5

Lenovo T450s: Unloading of nvidia module not possible

Hello,

I have the Lenovo Thinkpad T450s with a discrete NVIDIA graphics card. I use bumblebee/bbswitch and optirun/primusrun work perfectly.

Howver, probably related to these bugreports [1,2], bbswitch is not able to turn off my NVIDIA card (sate in /proc/acpi/bbswitch stays ON and I get corresponding error messages in dmesg). As a workaround, it is proposed in many bugreports to remove the nvidia module manually. However, this is not possible for me.

If I type

sudo modprobe -r nvidia

the command seems to succeed (no error message). dmesg output also suggests that the module is unloaded, however it seems to be loaded again automatically:

[11743.034739] nvidia-nvlink: Unregistered the Nvlink Core, major device number 243
[11743.034822] [drm] Module unloaded
[11743.816003] nvidia-nvlink: Nvlink Core is being initialized, major device number 243
[11743.816466] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:04:00.0 on minor 1
[11743.816471] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  358.16  Mon Nov 16 19:25:55 PST 2015

Output of lsmod after the modprobe -r command is:

lsmod | grep nvidia
nvidia               8704000  0
drm                   286720  11 i915,drm_kms_helper,nvidia

Any suggestions what could be the problem?

Thanks in advance,
dgall

[1] https://github.com/Bumblebee-Project/Bu … issues/719
[2] https://github.com/Bumblebee-Project/Bu … issues/696

Last edited by dgall (2016-01-29 17:33:50)

Offline

#2 2016-01-29 18:19:30

spider-net
Member
Registered: 2015-12-09
Posts: 31

Re: Lenovo T450s: Unloading of nvidia module not possible

It's a known issue. As stated here: https://bbs.archlinux.org/viewtopic.php?id=206828 try doing

# modprobe -r nvidia_modeset 

Offline

#3 2016-01-29 18:25:58

dgall
Member
Registered: 2016-01-29
Posts: 5

Re: Lenovo T450s: Unloading of nvidia module not possible

Thanks. I know about that problem that also occurs on my machine. However, nvidia won't unload even if nvidia_modeset is unloaded.

[dgall@xnedder ~]$ lsmod | grep nvidia
nvidia_modeset        708608  0
nvidia               8704000  1 nvidia_modeset
drm                   286720  11 i915,drm_kms_helper,nvidia
[dgall@xnedder ~]$ sudo modprobe -r nvidia
modprobe: FATAL: Module nvidia is in use.
[dgall@xnedder ~]$ sudo modprobe -r nvidia_modeset
[dgall@xnedder ~]$ lsmod | grep nvidia
nvidia               8704000  0
drm                   286720  11 i915,drm_kms_helper,nvidia
[dgall@xnedder ~]$ sudo modprobe -r nvidia
[dgall@xnedder ~]$ lsmod | grep nvidia
nvidia               8704000  0
drm                   286720  11 i915,drm_kms_helper,nvidia

Last edited by dgall (2016-01-29 18:26:08)

Offline

#4 2016-01-29 19:38:52

spider-net
Member
Registered: 2015-12-09
Posts: 31

Re: Lenovo T450s: Unloading of nvidia module not possible

How about:

sudo rmmod nvidia_modeset
sudo rmmod nvidia

Last edited by spider-net (2016-01-29 19:40:31)

Offline

#5 2016-01-29 19:45:12

dgall
Member
Registered: 2016-01-29
Posts: 5

Re: Lenovo T450s: Unloading of nvidia module not possible

Same result, unfortunately.

Do you have an idea how to narrow the error down to a certain subsystem such that I may be able to file a new bug there?

Offline

#6 2016-01-29 19:54:30

spider-net
Member
Registered: 2015-12-09
Posts: 31

Re: Lenovo T450s: Unloading of nvidia module not possible

Unfortunately no, GPU driver issues are not my forte. I had a similar issue: optirun/primusrun wasn't unloading the nvidia driver. Doing a # modprobe -r nvidia_modeset  solved it for me. Unloading nvidia_modeset should unload the nvidia driver too. I'm not sure what's going on with your system.

Offline

#7 2016-01-29 21:17:34

Alcasa
Member
Registered: 2013-05-18
Posts: 46

Re: Lenovo T450s: Unloading of nvidia module not possible

Do you have any programs opened, that might use openCL? (ie Darktable and others) I had that problem a while ago. Closing all programs using openCl on nVidia should let you unload the nvidia module.

Offline

#8 2016-01-29 21:29:35

dgall
Member
Registered: 2016-01-29
Posts: 5

Re: Lenovo T450s: Unloading of nvidia module not possible

Not that I know of.

How can I check that? lsof /dev/nvidia* is empty.

Offline

#9 2016-03-19 23:08:49

effae
Member
Registered: 2013-05-07
Posts: 39

Re: Lenovo T450s: Unloading of nvidia module not possible

Hi there dgall. Did you ever find a solution for this? I have the same situation as you, albeit I've only installed intel drivers and bumblebee/bbswitch, not nvidia's drivers.
bbswitch just doesn't turn my card off.

# cat /proc/acpi/bbswitch
0000:04:00.0 ON
# tee /proc/acpi/bbswitch <<<OFF
OFF
# cat /proc/acpi/bbswitch
0000:04:00.0 ON

Checking logs doesn't give any hints either.. (the ACPI Warning is, afaik, supposedly regarded as "nothing to worry about")

$ dmesg | tail -2
bbswitch: disabling discrete graphics
ACPI Warning: \_SB_.PCI0.PEG_.VID_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)

Any thoughts/updates?

Offline

#10 2016-04-02 10:55:03

dgall
Member
Registered: 2016-01-29
Posts: 5

Re: Lenovo T450s: Unloading of nvidia module not possible

Hi!

I found out that the module got reloaded because of a temperature widget for Plasma. After removing it, the problem looks the same as on your machine. I didn't have the time to engage with it further.

I read that there is a special branch of bbswitch for Thinkpads at GitHub, but I haven't tested it, yet, and I want to avoid self-compiled modules. Maybe some time the changes for Thinkpads are merged to the master branch, I don't know.

Best,
dgall

Offline

Board footer

Powered by FluxBB