I have a Dell XPS with a NVIDIA GeForce GTX 1050 Ti Mobile. Until it is possible to use the Nvidia GPU only on demand, I decided to disable it and use only the Intel GPU. Unfortunately there is no way in the BIOS to switch/power off the Nvidia GPU completely.
In order to give the system at least as little access to the Nvidia GPU as possible and hopefully save a bit power this way, I removed the PCI device. Unfortunately I do not have a measuring device to test this, i have to rely on the output of powertop
which tells me that i save about 8 watts at idle.
Here is how i’ve done it.
1. Disable the nvidia Kernel modules by creating /etc/modprobe.d/blacklist.conf
with the following content. (maybe it isn’t necessary to disable all of them, but I wanted to be sure):
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
blacklist nv
2. Identify the PCI ID of the Nvidia GPU with lspci
(the ID on my laptop is 01:00.0
).
$ lspci
...
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
...
3. Create a systemd service script with the following content (you can name it like you want, i named it kill-nvidia-gpu). Keep an eye, the ID translates from 01:00.0
to 0000:01:00.0
: /etc/systemd/system/kill-nvidia-gpu.service
[Unit]
Description=Kill Nvidia GPU
[Service]
Type=oneshot
ExecStart=/usr/bin/sh -c "/usr/bin/echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove"
[Install]
WantedBy=multi-user.target
4. Enable the service:
$ sudo systemctl enable kill-nvidia-gpu.service
5. Reboot: After the reboot, lspci
should no longer display an entry for the Nvidia GPU.
I have the feeling that the battery lasts a little longer. What do you think, should this method technicaly work?