2

I'm using Ubuntu 18.04 with kernel 4.15 and installed Nvidia driver 418.67. All of this is installed on the new Razer blade advanced 15(2019) model. When I change to Intel and reboot powertop says its drawing out 40-50 Watts idle and the Nvidia device is not turned off. I've tried a bunch of workarounds including tlp and https://github.com/timrichardson/Prime-Ubuntu-18.04. Afterward doing these tweaks idle draw is around 17-20 Watts. This still seems a bit high and furthermore issuing the commands.

sudo -i
modprobe bbswitch
cat /proc/acpi/bbswitch

it says 0000:01:00.0 ON, so the Nvidia card is still on. Furthermore powertop also confirms that an Nvidia device is still turned on. Can someone please help me to figure out how to completely disable the Nvidia card in Intel mode.

Kulfy
  • 17,696
thegamer
  • 131
  • Have you tried with Nvidia X Server Settings? –  May 23 '19 at 19:51
  • 1
    Doesn't sudo prime-select intel do the same thing? Or did you mean something else? I have tried just doing powersaving mode from x server settings and then monitoring using powertop showed 40-50 watts usage after reboot. – thegamer May 24 '19 at 01:37
  • Figured out how to do it with bbswitch installed. – thegamer May 24 '19 at 03:32
  • I now have the power discharging at 10 watts, so that part is now fine. My question now is how can I have tee /proc/acpi/bbswitch <<<OFF run during bootup when in Intel mode only? – thegamer May 24 '19 at 03:36

2 Answers2

1

See answer here https://unix.stackexchange.com/a/420273. Once you have switched into Intel mode you can do the command

sudo tee /proc/acpi/bbswitch <<<OFF

to turn off the GPU. Likewise to turn it back on again you can do

sudo tee /proc/acpi/bbswitch <<<ON

Preferabbly I would like this to automatically run during Intel mode instead of manually entering it after every boot. If anyone has a suggestion for how to do this it would be much appreciated.

thegamer
  • 131
0

@michael you have not loaded bbswitch.ko modprobe bbswitch to verify or you do not have bbswitch.ko or your bbswitch.ko was not compiled with your kernel headers do strings bbswitch.ko | grep vermagic and check with your "uname -r"

Try this modified prime version

https://sourceforge.net/projects/toysbox/files/bionic-nvidia/prime-alagras-richardson_1.gdm3-20200802-ubuntu-20.04_amd64.deb

if your display manager is gdm

or

https://sourceforge.net/projects/toysbox/files/bionic-nvidia/lprime-alagras-richardson_1.lightdm-20200730-xubuntu-18.04.4_amd64.deb

if display manager is lightdm

They both work on my live image without reboot (nvidia-450.57)

But turn off the dGPU on hdd installed ubuntu is another story ;

Even when you have your working module bbswitch.ko (compiled for your running kernel's version) and your nvidia driver well behaved installed ,there is still sometime funny things

Suppose by chance ,after boot your display driver is using intel ,so low power consumption ; you switch to nvidia to play game or fiddling with cuda you probably will never be able to switch off dGPU because it needs

1 all nvidia modules be unloaded

2 kernel power management be disabled (never true on standard installation). This prevents bbswitch.ko to switch off ( not "on") ... unless you reboot !

Now to make sure you boot with intel display, put blacklist-nvidia.conf in directory /lib/modprobe.d !

And if you want to experiment a lot with bbswitch

1 put bbswitch.ko into /etc/modules to get it loaded at boot

2 put an option pcie_port_pm=off on kernel cmdline for your grub.conf to disable kernel power management (not really effective in all situations)

Then go into VT3-6 with ctrl-alt-f3(-6) play with

sudo tee /proc/acpi/bbswitch<<<ON (or OFF )

cat /proc/acpi/bbswitch to verify dGPU status

Experiment in various situations Xserver on / off ...and observe !do it with or without kernel power management option too

have fun