Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completely turn off nvidia gpu #60

Open
LoafingBunny opened this issue Aug 17, 2019 · 0 comments
Open

Completely turn off nvidia gpu #60

LoafingBunny opened this issue Aug 17, 2019 · 0 comments

Comments

@LoafingBunny
Copy link

Hi, today I managed to turn off the nvidia gpu, so as to have a power consumption of ~8W as reported by powertop.
When the gpu is on, the power used is ~15W so effectively reducing by half the battery time.

I'm not totally sure how, can be many factors, I'll try to describe them here also as a reminder for me

So, first of all, update the kernel (5.0.0-25-generic) and the nvidia driver (430.26):

I removed bumblebee and bbswitch.

Blacklist all modules related to nvidia as described here : https://wiki.archlinux.org/index.php/Dell_XPS_15_9570#Manually_loading/unloading_NVIDIA_module
Because I'm using wayland I didn't care about the x11 settings.
I copy the three files required:

# /etc/modprobe.d/disable-ipmi.conf

install ipmi_msghandler /usr/bin/false
install ipmi_devintf /usr/bin/false

# /etc/modprobe.d/disable-nvidia.conf

install nvidia /bin/false

# /etc/modprobe.d/blacklist.conf

blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
blacklist nv
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
blacklist ipmi_msghandler
blacklist ipmi_devintf

ok, now when the gpu is on (power usage high) you can remove it with this command:

tee /sys/bus/pci/devices/0000\:01\:00.0/remove <<<1
alternatively also work to remove all the related nvidia modules:

rmmod nvidia-drm
rmmod nvidia-uvm
rmmod nvidia-modeset
rmmod nvidia

Now the gpu is off, as you should see from powertop.
To re-enable it at any time, first rescan

tee /sys/bus/pci/rescan <<<1

now when I call nvidia-smi it automatically loads the drivers too, and the gpu turns on. Note that some additional fine tuning might be required, but everything is written in the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant