5

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.

  • Is the nvidia driver loaded? Post the whole output of gpu-manager. Blacklisting doesn't prevent something from explicitly loading a driver, so something must be pulling it in, maybe because Nvidia's not loaded. – ubfan1 Jun 4 '18 at 22:59
  • No nvidia is not loaded. I would actually like my discrete GPU to be off to prevent it from draining the battery. – Antonin Jun 5 '18 at 7:04
  • What video driver are you trying to use, Vesa? See askubuntu.com/questions/849481/… There might even be another framebuffer fallback driver possible. – ubfan1 Jun 5 '18 at 15:29
  • I do not see why I would need a driver for a graphic card supposedly off ? – Antonin Jun 6 '18 at 9:20
  • Digging the issue, Ubuntu 18 has a conflicting service (with prime) that actually loads a driver for the discrete GPU : ``` systemctl status nvidia-fallback.service ● nvidia-fallback.service - Fall back on nouveau if nvidia is not loadedLoaded: loaded (/lib/systemd/system/nvidia-fallback.service; enabled; vendor preset: enable Active: active (exited) Process: 1007 ExecStart=/sbin/modprobe nouveau --config /(code=exited, status=0/SUCCESS) Main PID: 1007 (code=exited, status=0/SUCCESS) XX systemd[1]: Starting Fall back on nouveau if nvidia is not loaded – Antonin Jun 6 '18 at 9:45
5

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 by ExecStart=/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

  • This worked perfectly for me. Thank you. – Joseph Redfern Jun 25 '18 at 10:04
  • /etc/systemd/system/display-manager.service.wants/nvidia-prime-boot.service was just a symlink to /lib/systemd/system/nvidia-prime-boot.service and it's gone in the latest nvidia-prime package version, 0.8.8.1 that is in bionic-proposed. – int_ua Sep 9 '18 at 14:33
0

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:

sudo apt purge nvidia* && sudo apt autoremove --purge  
sudo apt install nvidia-driver-396 nvidia-prime/bionic-proposed nvidia-settings  

*reboot

Now prime-select no longer triggers a grub update or loads nouveau. And nvidia-fallback.service seems to have vanished.

gpu-manager | grep nouveau  

returns

/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
Is nouveau loaded? no
Is nouveau blacklisted? no

and lspci -nnk | grep -iA2 VGA

00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:3e94]
Subsystem: Dell Device [1028:0832]
Kernel driver in use: i915

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1bb9] (rev a1)
Subsystem: Dell Device [1028:0832]
Kernel driver in use: nvidia

Previously nouveau was loaded for 01:00.0

nvidia-prime 0.8.8.1

  • I had this same problem and fixed this way. The only difference is that, after purging all NVIDIA related stuff, I reinstalled it with the .run file from Nvidia. Did not need to install any nvidia-prime, it did everything by itself and now no nouveau loaded. Thanks for pointing me in the right direction. – Andyc Jan 23 at 0:27

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.