Hi I am trying to use Ubuntu-Prime for ubuntu 18 on an asus laptop with 2 GPU (intel & nvidia).
I found the power consumption of the computer to be way too high when I reboot with only the intel GPU (using prime-select intel
or using nvidia-settings
).
I found that the nouveau driver was loaded despite normally not used:
$ gpu-manager | grep nouveau
Is nouveau loaded? yes
Is nouveau blacklisted? yes
Skipping "/dev/dri/card1", driven by "nouveau"
Skipping "/dev/dri/card1", driven by "nouveau"
Found "/dev/dri/card1", driven by "nouveau"
Skipping "/dev/dri/card1", driven by "nouveau"
I tried to blacklist it and also have a kernel startup option to prevent nouveau from being loaded yet it still loads. This seems very un-linuxy to me.
I found a way to disable nouveau and get my battery life back when using prime with intel graphic card :
2 bugs in Ubuntu 18 are concerned :
1. Prime fails to turn off discrete GPU (known issue).
Make sure that your discrete GPU is connected to PCI port 0000:01:00.0 (using
lspci -vnn | grep '\''[030[02]\]'
for instance)Change
/etc/systemd/system/display-manager.service.wants/nvidia-prime-boot.service
and replace the current execstart (referencing vgaswitcheroo which is not usually available byExecStart=/bin/sh -c "echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/power/control'"
)2. nvidia-fallback loads nouveau when nvidia is not loaded
Even if we are willing not to use the discrete gpu !
Disable the following service which loads nouveau driver when nvidia driver is not loaded :
sudo systemctl disable nvidia-fallback.service
For anyone suffering with this: I was just about to try Antonin's solution but didn't need to after installing prime 0.8.8.1 from bionic-proposed. I had the nouveau issue with nvidia-390/restricted, nvidia-prime/main, nvidia-settings/main. Currently using nvidia-396 from graphics-drivers/ppa/ubuntu.
system: Dell Precision 7730 on 18.04 w/ Intel i915 and Quadro P4200
Assuming bionic-proposed and graphics-drivers/ppa/ubuntu are enabled:
*reboot
Now prime-select no longer triggers a grub update or loads nouveau. And nvidia-fallback.service seems to have vanished.
returns
and
lspci -nnk | grep -iA2 VGA
Previously nouveau was loaded for 01:00.0
nvidia-prime 0.8.8.1