nvidia-prime can't switch off the discrete GPU

Bug #1757180 reported by Alberto Milone
76
This bug affects 16 people
Affects Status Importance Assigned to Milestone
nvidia-prime (Ubuntu)
Fix Released
High
Alberto Milone
nvidia-settings (Ubuntu)
Fix Released
High
Alberto Milone
ubuntu-drivers-common (Ubuntu)
Fix Released
High
Alberto Milone

Bug Description

nvidia-prime used to be able to switch off and on NVIDIA dGPU. Now, a change in the nvidia packaging, and a change of behaviour in logind, broke this feature.

Changed in ubuntu-drivers-common (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alberto Milone (albertomilone)
milestone: none → ubuntu-18.04
Changed in nvidia-settings (Ubuntu):
importance: Undecided → High
status: New → In Progress
assignee: nobody → Alberto Milone (albertomilone)
milestone: none → ubuntu-18.04
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-prime - 0.8.6

---------------
nvidia-prime (0.8.6) bionic; urgency=medium

  [ Alberto Milone ]
  * debian/control:
    - Drop dependencies on bbswitch, lsb-release, pciutils,
      and on login managers.
    - Make nvidia-prime arch independent.
  * debian/rules,
    90-nvidia.conf,
    debian/dirs.in,
    debian/install.in,
    oem/00-prime-offload,
    prime-offload,
    prime-switch:
    - Remove obsolete files.
  * prime-select,
    debian/nvidia-prime.nvidia-prime-boot.service:
    - Drop code to deal with alternatives, since the nvidia
      packages don't use them any more.
    - Rely on nouveau and vgaswitcheroo to switch off
      the discrete GPU (LP: #1757180).

  [ Bryan Quigley ]
  * debian/nvidia-prime.upstart:
    - Remove upstart file.

 -- Alberto Milone <email address hidden> Tue, 20 Mar 2018 17:28:05 +0100

Changed in nvidia-prime (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Doug McMahon (mc3man) wrote :

Re: nvidia-setting
previously with alternatives lightdm could affect switch on a og out/in, however gdm3 needed a reboot.
The message was never changed to reflect this, now that apparently a reboot is required no matter what dm it would be a good time to edit it.
Old bug - https://bugs.launchpad.net/ubuntu/+source/nvidia-prime/+bug/1704781

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-settings - 390.42-0ubuntu1

---------------
nvidia-settings (390.42-0ubuntu1) bionic; urgency=medium

  * New upstream release.

  [ Alberto Milone ]
  * debian/patches/08_add_prime_support.patch:
    - Use pkexec to call prime-select (LP: #1757180).
    - Recommend a computer restart, rather than
      a simple log out (LP: #1704781).

  [ Graham Inggs ]
  * debian/patches/05_add_polkit_support.patch,
    debian/patches/06_remove_local_prefix.patch,
    debian/patches/07_remove_features_for_legacy.patch,
    debian/patches/08_add_prime_support.patch,
    debian/patches/10_legacy_vdpau.patch,
    debian/patches/11_link_as-needed.patch,
    debian/patches/12_nostrip.patch,
    debian/patches/15_clean.patch:
    - Refresh all patches for new upstream 390.42
  * debian/patches/13_libxnvctrl_so_0.patch,
    debian/patches/link-order.diff:
    - Reorder libraries and object files to allow proper
      dependency resolution.
  * debian/control,
    debian/libxnvctrl0.install,
    debian/rules,
    debian/source/format:
    - Switch to debhelper 9.
    - Switch to source format 3.0 (quilt).
    - Depend on libgtk-3-0 | libgtk2.0-0, don't require both.
    - Switch to debian/watch.
    - Drop download-sources target with obsolete URL.
    - Change libxnvctrl0 and libxnvctrl-dev Architecture
      to any (LP: #1690669).

 -- Alberto Milone <email address hidden> Thu, 22 Mar 2018 18:29:24 +0100

Changed in nvidia-settings (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.5

---------------
ubuntu-drivers-common (1:0.5) bionic; urgency=medium

  * gpu-manager.{c|py}:
    - Drop all the code to handle driver configuration, which
      stopped working after we moved away from alternatives.
      Only keep telling the system whether PRIME is supported
      or not (LP: #1757180).

 -- Alberto Milone <email address hidden> Thu, 22 Mar 2018 18:35:19 +0100

Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
YAFU (yafu) wrote :

Hi.
I do not know if I am currently being affected by the same Bug. My system is:
intel i7 3770 (HD4000 igpu)
nvidia GTX 960

I have Kubuntu 18.04 updated to date. I was using 390.48 nvidia proprietary driver correctly. I decided to try nvidia-prime in Kubuntu 18.04, so from the BIOS I enabled iGPU as the primary display. I opened nvidia-settings GUI and from Prime options I chose Intel. After entering user password, it took about a minute for the message to appear that the change had been successful. So I rebooted the system and it worked correctly, the system was using intel iGPU. But then when trying to return to nvidia something went wrong. After rebooting the system, PRIME options of nvidia-settings GUI disappeared. nvidia-settings GUI is only shown in the minimal version, only items from Application Profiles and nvidia-settings Configuration is displayed.
If I select my nvidia as a Primary Display from BIOS, the system enters in graphic mode but it apparently is not using nvidia driver, system and graphics work very slow and take time to refresh. nvidia-settings GUI just keeps showing minimal interface with almost no options. All this despite the fact that from the terminal, PRIME is informed that nvidia is selected:
$ sudo prime-select query
nvidia

I have tried to purge all nvidia package and reinstalling the driver from driver manager, but everything remains the same. Since troubleshooting nvidia problems is more difficult with new packaging system:
https://askubuntu.com/questions/1011589/what-has-changed-in-nvidia-proprietary-driver-packaging-in-18-04-bionic

I do not know if I did it right. These are the packages that I currently have installed:
http://pasteall.org/915940

Just a question to see if I can reverse PRIME changes. Which configuration file is modified when you select nvidia or intel from PRIME options in nvidia-setings GUI (after entering user key)?

Revision history for this message
YAFU (yafu) wrote :

(after entering user key) must be > (after entering my user password)

Revision history for this message
YAFU (yafu) wrote :

Well, I have been able to solve the problem and I am able to use nvidia driver again. The problem is that nvidia-prime blacklist nvidia driver. The file is "/etc/modprobe.d/blacklist-nvidia.conf" with content:
# Do not modify
# This file was generated by nvidia-prime
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
alias nvidia off
alias nvidia-drm off
alias nvidia-modeset off

File was never re-established, even when uninstalling/purging nvidia-prime package. I think that this file should be re-established/deleted when you uninstall nvidia-prime.

Thanks Alberto and other maintainers for your hard work maintaining nvidia packages (

Revision history for this message
Zac (isitzac-9) wrote :

I seem to be having an issue like this as well. I did a fresh install of 18.04 yesterday, and while the nvidia x server application states that the discrete gpu is turned off, i have a hardware light on my laptop that shows it to still be active, even though the nvidia x server settings show the integrated gpu to be in use, and there's additional fan noise and heat that typically accompanies the discrete gpu when the internal is selected.

intel i-5 2410M
nvidia 550M

according to nvidia, the 390 drivers are appropriate compatable with my hardware.

16.04 did not share this error, and when the discrete gpu was deactivated to run the integrated gpu, it would truly switch off.

Is there another fix for this?

Revision history for this message
Zac (isitzac-9) wrote :

I reinstalled 16.04 and reinstalled nvidia drivers, and I was able to properly disengage the discrete gpu under prime profiles.

This issue seems to only affect 18.04.

Revision history for this message
yustnip (yustnip) wrote :

I have this issue after the fresh install 18.04 too.

Revision history for this message
Артем (givespam) wrote :

I think I understand the error. Sorry for my English.
Ubuntu 18.04. After installing nvidia drivers, nouveau modules are added to the modprobe blacklist. The path /sys/kernel/debug/vgaswitcheroo/switch disappears. To turn off the nvidia graphics card, prime-select creates a symlink in /etc/systemd. It tries to write /sys/kernel/debug/vgaswitcheroo/switch, but there is no such path and nothing happens.

Revision history for this message
Amir (amirzolal) wrote :

This bug was not fixed. It still affects me. The GPU doesn't go off, so the power consumption remains pretty high (and the fan keeps on going).

Revision history for this message
Amir (amirzolal) wrote :

Correction - after two restarts switching back and forth, the output is as follows:

sudo cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0

Revision history for this message
Артем (givespam) wrote :

After installing the switcheroo-control package, I got the same output as the Amir
But the discrete graphics card does not turn off. The fan rotates, the power consumption is at a high level.

Revision history for this message
Артем (givespam) wrote :

And more. Different output of the command: cat /sys/kernel/debug/vgaswitcheroo/switch

nouveau driver:
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0

nvidia 390.48, after prime-select intel:
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0

You can see the different status of the discrete card. When "DunOff" it really disconnected from the power supply, and in case of "Off" it continues to consume energy.

Revision history for this message
Tom (tom-lorinthe) wrote :
Revision history for this message
Stefan Girstmair (djefo) wrote :

I have the same issue. Ubuntu 18.04 with Nvidia 1070 MaxQ GPU. Have switched to intel GPU but still powerdrain is enormous so obvioulsy the nvidia card is still in use.
Powertop show me that the network interfaces wlp3s0 (iwlwifi) drains around 14W which cannot be true. So it also can't detect that its the nvidia card.

Revision history for this message
Roman Dinga (roman-dinga) wrote :

Same here, Asus N550JK with Nvidia 850M. After switch to Intel by Nvidia-prime and restart, I can see huge consumption, around 22W. When I disable nouveau completely, by disabling the Nvidia fallback service and then turning off the GPU using old bbswitch, I get 11W which is normal for this laptop with turned off GPU. So bbswitch still works, but vgaswitcheroo doesn't. Pity that bumblebee doesn't work anymore...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.