Cannot switch from Intel to Nvidia in Ubuntu 16.04 (Nvidia Prime)

5,642

I had the same problem. then i did the following:

software & updates > additional drivers: select nvidia 381.09> reboot the machine

then use nvidia x settings, and then select nvidia prime.

after rebooting, everything is ok.

I hope this will help :-)

Share:
5,642

Related videos on Youtube

bartovan
Author by

bartovan

Been using Linux, and mainly Ubuntu, for about 15 years now. No code hero (at all), just a more or less experienced user. And absolutely crazy about open source, using it for all sorts of creative projects.

Updated on September 18, 2022

Comments

  • bartovan
    bartovan almost 2 years

    I cannot switch from my Intel GPU to my Nvidia GPU on Ubuntu 16.04. I get no error messages or other problems, it just doesn't switch. Other similar questions here have not solved my problem. Here are the details:

    • HP Envy dv7 7390eb laptop with hybrid graphics (Nvidia and Intel), Ubuntu 16.04.

    • Ubuntu's Additional Drivers shows me I'm using Nvidia binary driver 367.57 (proprietary) and Processor microcode firmware for Intel CPUs from intel-microcode (proprietary).

    • I have package nvidia-367, nvidia-prime, nvidia-opencl-icd-367 and nvidia-settings installed. No bumblebee or other related packages.

    • I can start Nvidia-settings app, and select Nvidia. It tells me to logout. When I log back in, Intel is still the active card. (I use this method to know which card is active, namely sudo lshw -c video | grep configuration and then modinfo i915).

    When I do sudo prime-select nvidia, I get

    Info: the current GL alternatives in use are: ['mesa', 'nvidia-367']
    Info: the current EGL alternatives in use are: ['mesa-egl', 'nvidia-367'] 
    Info: selecting nvidia-367 for the nvidia profile
    update-alternatives: using /usr/lib/nvidia-367/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode 
    update-alternatives: using /usr/lib/nvidia-367/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
    

    prime-select query then gives me: nvidia

    But the above method to check which GPU is active, still tells me Intel is active. And after logout and login, it is also still Intel (the Nvidia-settings app tells me so, and so does the lshw method. prime-select query however tells me: unknown.) So basically there seems to be no way to activate my Nvidia GPU.

    EDIT: My problem is exactly the same as described here, when I launch nvidia-settings in a terminal, I also get the error

    ERROR: nvidia-settings could not find the registry key file. 
    This file should have been installed along with this driver at
    /usr/share/nvidia/nvidia-application-profiles-key-documentation. 
    The application profiles will continue to work, but values cannot be
    prepopulated or validated, and will not be listed in the help text. 
    Please see the README for possible values and descriptions.
    

    However the solutions proposed there, namely

    cd /usr/share/nvidia
    mv nvidia-application-profiles-340.76-key-documentation
    nvidia-application-profiles-key-documentation
    mv nvidia-application-profiles-340.76-rc nvidia-application-profiles-rc
    

    (changing 340.76 in the number corresponding to the actual driver on my system of course)

    refers to Ubuntu 15.04 (I'm on 16.04) and does not work.

    • DollarAkshay
      DollarAkshay over 7 years
      I have the same problem :(
    • bartovan
      bartovan over 7 years
      In this post ubuntuforums.org/showthread.php?t=2329171 there is talk about a solution in an upcoming Xorg release, to be included in Ubuntu 17 apparently.
    • bartovan
      bartovan about 7 years
      @DavidFoerster you are right, I just fixed it, thanks for notifying.
    • alexmogavero
      alexmogavero over 6 years
      I have the same problem, but some time ago it was working. Not sure why it is not working any more.