Linux turn off nvidia

Cannot turn off NVIDIA GPU using bbswitch

I have a laptop with a GeForce GT 650M. I recently installed Kubuntu 20.04 and have nvidia-prime installed. I can select PRIME Profiles in nvidia-settings and I have «NVIDIA (Performance)», «NVIDIA On-Demand», and Intel (Power Saving Mode)». When I select Intel, I suspect my NVIDIA card is still active because the laptop seems warmer than it should be and battery life is pretty bad. In Kubuntu 18.04 I was able to use bbswitch to turn off the NVIDIA card. However, that doesn’t work now. I get an error when I try modprobe.

$ sudo modprobe bbswitch modprobe: ERROR: could not insert 'bbswitch': No such device 
[12360.793484] bbswitch: version 0.8 [12360.793498] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0 [12360.793509] bbswitch: No discrete VGA device found 
$ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 

It only shows the Intel card here. So it looks like my GPU simply does not exist. However, if I change the PRIME profile to any of the NVIDIA ones, lspci does show the NVIDIA GPU and glxinfo and friends show the NVIDIA card being used. So it does work! So my question is, does Kubuntu 20.04 do something to drop the GPU from the PCI bus to power it down (and failing to power it down)? Ultimately, I would like to power it down completely (there is no option in the BIOS). I have tried to go the bbswitch way, but if there are other ways, that would work too.

Источник

Is it possible to completely turn off nvidia GPU to be able to run wayland?

I’m about to buy a new laptop that is being used with Linux only. Unfortunately finding a Linux laptop is not simple at all, and it seems the only option I found includes a nvidia Quadro M1200 and an Intel HD 630. I know that it is very complex/impossible to properly run wayland (Ubuntu for instance) on nvidia. Actually I don’t care in any way about the nvidia GPU, the Intel GPU should be more than sufficient. But is it possible to completely disable the nvidia GPU to let wayland run properly on the Intel GPU? I read about nvidia prime: can I use it like this? Can I completely disable nvidia and just forget about it, like it was not even there?

Читайте также:  Can linux read ntfs disks

IIRC the nVidia GPU just writes into the Intel GPU framebuffer, so blacklisting the nVidia-related kernel modules should suffice.

So blacklisting the driver forces a fallback to the integrated Intel GPU which should allow me to properly run wayland? Would be great! Someone actually doing this succesfully?

4 Answers 4

The answer was simple: just install nvidia drivers, open the nvidia settings page and set to use the Intel HD GPU only. Login again and you are done. Works perfectly. Battery lasts much much longer and wayland works properly.

As soon as the nvidia GPU is enabled, it seems that the fan turns on immediately, and keeps running even when idle. That is probably a large part of battery consumption. I’m wondering if that is reasonable or not: is that fan really always needed?

NOTE: I recently discovered that what I described is a Ubuntu specific patch applied to the nvidia config app. Other distros may not include it entirely. Manjaro, for instance, is not including it in any way. It is probably possible to setup manually, but I didn’t succeed.

NOTE2: blacklisting nvidia and nouveau is sufficient to run on Intel only. Not sure how to run on nVidia only.

Источник

Disable your NVIDIA card in Linux

My NVIDIA graphic card on my linux box had already given me alot of pain. I couldn’t resist seeing my laptop fan going wild and my laptop going excessively hot even during normal operation. I knew that all this is due to the NVIDIA graphic card I have. Since, I do not use my graphic card much, I decided to turn my graphic card off permanently on my fedora 20 box.

bbswitch module helped me alot in accomplishing this. But before using this module I had to disable the inbuilt nouveau driver for NVIDIA card that is already shipped with the linux kernel for NVIDIA card. nouveau is an open source graphic card driver for NVIDIA cards. Disabling it means I need to blacklist it. On my Fedora 20 box, I added following file in

Just add following line in the above mentioned file.

Remember to generate initramfs image after doing this, so that your kernel knows about the change the next time you reboot. You can generate the new initramfs image as :

Читайте также:  Проброс принтера через rdp linux

Reboot your box and your nouveau driver is not loaded this time. You can double check that using the following command :

If you still see nouveau in the output, there is some problem and the driver is not unloaded successfully. Re-check the instructions above. There shouldn’t be any problem if you followed them accurately.

The next step is to download the kernel-devel package for your current kernel. You can do that as :

sudo yum install kernel-devel-$(uname -r)

This downloads the necessary kernel files to build modules for this kernel. You can now download the bbswitch module from github. Download the zip file. Extract it. cd to the its extracted directory. Hit

It will successfully make the bbswitch kernel module if kernel-devel packages are installed for your kernel version.

After this point, you can load the kernel module explicitly using

It will load the bbswitch module if nouveau is disabled. You can see the results using :

Loading the module doesn’t mean your NVIDIA card is off now. To do that you have to enter the following :

sudo tee /proc/acpi/bbswitch

It will turn off your card. Again to see the resulsts you can run dmesg and see the latest output of the command. If there is some problem in disabling the driver, the output of dmesg will tell you that.

Disabling card on boot

If you don’t want your NVIDIA card at all, you can turn off your card at every boot. bbswitch module should be loaded at every reboot for this to happen. To load the bbswitch module at every reboot, create a file as :

with the following content

Also create another file as :

options bbswitch load_state=0

This makes sure that whenever the bbswitch module is loaded, the card is turned off automatically so you won’t have to edit /proc/acpi/bbswitch manually.

For above things to work, there is another thing you need to do. modprobe should be able to find the bbswitch module you just built. By default modprobe looks for the modules in :

So copy your bbswitch.ko file to the above mentioned directory. Now to refresh the database, you need following command :

Now to check if modprobe finds the bbswitch, you can check this via :

If it finds the bbswitch module, it will output nothing else it will show you the error saying that it couldn’t find the module bbswitch.

Читайте также:  Скриншот через терминал linux

After following all the above instructions, your NVIDIA card will automatically be disabled on every reboot. There is one thing you need to keep in mind here that you have to follow all the above instructions in case you upgrade your kernel version. If you want this to remain persistent across kernel upgrades you can use the DKMS. To know more about it you can refer to the bbswitch README.

Источник

How to turn off Nvidia GPU on a headless server?

I am running a headless server with an Nvidia GPU. Even when the GPU is not doing any work, it is consuming about 25 Watts of power:

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 430.26 Driver Version: 430.26 CUDA Version: 10.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 950 Off | 00000000:01:00.0 Off | N/A | | 0% 61C P0 26W / 110W | 0MiB / 2001MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+ 

Is there a way to completely turn off power delivery to the GPU when it is not in use? I tried sudo prime-select intel Which does cause nvidia-smi to stop working, but a power meter connect to the wall shows exactly the same power consumption with either intel or nvidia selected. Completely removing the GPU reduces the power consumption by about 30 Watts as expected. The main purpose is to save power and costs during idle operations, with an option to spin up the GPU when it is needed (remotely via ssh).

Is this a desktop or laptop? Your usage of commands applicable to hybrid graphics suggests a laptop but the removing of GPU suggests a desktop. Desktop can have multiple graphics cards/chips but it’s not the same things as a laptop’s hybrid and switchable graphics. In a desktop you may toggle in BIOS/UEFI and in some cases toggling to integrated GPU or disabling the discrete GPU results in the latter being treated as simply not there and not powered.

A desktop, but I am not using the card for display output. I was hoping there is something equivalent to spinning down idle HDDs

It’ll always use some power. Again, in some systems, disabling it in BIOS/UEFI turns it off completely.

Источник

Оцените статью
Adblock
detector