Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

[Ubuntu 14.04 64bit]

After switching between Intel / NVIDIA graphics and the different NVIDIA drivers I am now suddenly stuck with the Intel GPU. It used to be no problem at all switching between the two - I cannot say for sure what is suddenly causing the issue. I think the last thing I did was switching to the "X.Org X server" driver - then something broke. The switching was part of me trying to troubleshoot issues with setting up a secondary screen.

enter image description here

Every time I try to switch to NVIDIA I get this very expressive error message and then it switches back to Intel :/

I could use some assistance with troubleshooting or suggestions on what to try.

So far I (un/re)installed the various packages "nvidia-settings" / "nvidia-current" / "nvidia-current-updates" / "nvidia-331" / "nvidia-331-updates". To no avail.

> lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K2000M] (rev a1)

/etc/apt/sources.list: may be found at

Regarding suggestion by Qasim:

raffael@raffael-GT60~> sudo prime-select nvidia
[sudo] password for raffael: 
Error: alternatives are not set up properly
Error: nvidia mode can't be enabled
raffael@raffael-GT60~> sudo prime-select intel
Error: alternatives are not set up properly
Error: intel mode can't be enabled

Regarding 2nd suggestion by Qasim:

sudo apt-get purge nvidia*
sudo apt-get install nvidia-319-updates nvidia-settings-319-updates nvidia-prime
[tried to switch to NVIDIA]

Weird thing is - this actually worked the first time !? Then I switched back to Intel - log off/on - Switched back to NVIDIA - log off/on -> system crashed - error as described above.

Regarding suggestion by Louis Matthijssen:

raffael@raffael-GT60:~$ sudo update-alternatives --set /etc/ /usr/lib/nvidia-331-updates-prime/
update-alternatives: error: alternative name (/etc/ must not contain '/' and spaces
raffael@raffael-GT60:~$ ls -la /usr/lib/nvidia-331-updates-prime
total 44
drwxr-xr-x   2 root root  4096 Mai  2 22:45 .
drwxr-xr-x 196 root root 32768 Mai  3 10:57 ..
-rw-r--r--   1 root root     0 Apr  4 11:50
-rw-r--r--   1 root root    60 Apr  4 11:50

Repeated algo twice - didn't work again :/

Now it seems to work:

raffael@raffael-GT60:~$ sudo update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/nvidia-331-updates-prime/ 
update-alternatives: using /usr/lib/nvidia-331-updates-prime/ to provide /etc/ (x86_64-linux-gnu_gl_conf) in manual mode

raffael@raffael-GT60:~$ sudo update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/nvidia-331-updates-prime/
update-alternatives: using /usr/lib/nvidia-331-updates-prime/ to provide /etc/ (i386-linux-gnu_gl_conf) in manual mode

Afterwards I could switch to NVIDIA - but wasn't offered the extended "NVIDIA X Server Settings" - will reboot now and see what happens. Follow up: It switched back to Intel after reboot and cannot switch to NVIDIA as usual. To me it seems that your method, Louis, tricks the OS into believing it uses NVIDIA while this is actually not the case.

share|improve this question
I have exactly the same problem, in fact the problem is extended and now my Nvidia card is not working in windows 8.1, that means that affect some configuration aout of the OS :( Indeed i tried with a clean installation of Ubuntu and don't reconizes anymore the card. – user5288 Apr 21 '14 at 15:34
Can you post your /etc/apt/sources.list? – davidbaumann May 2 '14 at 16:17
@Raffael ... I have deleted the answer, try to remove and reinstall nvidia prime by sudo apt-get install nvidia-319-updates nvidia-settings-319-updates nvidia-prime – Qasim May 2 '14 at 18:55
did u removed nvidia 1st ? @Raffael – Qasim May 2 '14 at 19:25
can i have teamviewer access so i can look the issue – Qasim May 2 '14 at 19:28

As you get the following error:

Error: alternatives are not set up properly

You may try to set the alternatives yourself.

When I switch to Intel I see:

update-alternatives: using /usr/lib/nvidia-331-prime/ to provide /etc/ (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-331-prime/ to provide /etc/ (i386-linux-gnu_gl_conf) in manual mode

When I switch to NVIDIA I see:

update-alternatives: using /usr/lib/nvidia-331/ to provide /etc/ (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-331/ to provide /etc/ (i386-linux-gnu_gl_conf) in manual mode

So you could try this to switch to Intel:

sudo update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/nvidia-331-prime/
sudo update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/nvidia-331-prime/

Obviously you should replace 331 by your own version.

Now you could try a few things to trigger the switch:

  • Log out and log in again

    to restart the X server as you normally would do

  • Reboot your whole PC

    for the same purpose of the above

  • Execute sudo prime-select nvidia

    as your alternatives are now set for Intel, I hope this will also fix any other settings so that everything is as it should be again (obviously you should still restart the X server)

I hope that I've interpreted the error right.

Also, you could use prime-select query to check which card is currently selected, and fix the alternatives for that card (for example NVIDIA) as you may somehow have set alternatives for the other card (for example Intel), but the tool is still thinking that you're using the other card (for example NVIDIA), thus giving an error saying that the alternatives are not set up properly.

share|improve this answer
Not sure why you suggest how I should switch to Intel - but invoking the first command ends up as added to my question. – Raffael May 3 '14 at 19:39
I'm sorry, those were the wrong commands. I mean you could try to set the alternatives to the current card (Intel) as prime-select says the alternatives are broken. Then, you can try if switching to NVIDIA is working again. I don't know if this will work and you should check what the alternatives are currently pointing to, so you can restore the alternatives if this doesn't work. – Louis Matthijssen May 3 '14 at 20:00
I just got exactly the same problem as you have when I tried to switch to NVIDIA. The commands I provided here worked for me. See my full output. – Louis Matthijssen May 4 '14 at 13:46
+10 +50 for the effort ;) I guess I'll just reinstall Ubuntu when I find the time – Raffael May 7 '14 at 14:40
Okay, could you let me know if that's working? As soon as I try to switch to NVIDIA I get the same problem every time. I'm on 337 now and I'll check if it's working there. – Louis Matthijssen May 7 '14 at 15:05

what worked for me , I am still trying to find his post. I had so many i was viewing:

Here, this is what worked for me:

I tried:

sudo update-alternatives --config x86_64-linux-gnu_gl_conf
sudo ldconfig -n
sudo update-initramfs -u

And rebooted, with no changes. So I tried:

sudo apt-get purge libvdpau-va-gl1 bumblebee* nvidia*
sudo apt-get install linux-headers-generic
sudo apt-get install nvidia-331 nvidia-settings nvidia-prime

Reboot. Still, no changes, and the same blank error message in nvidia-settings when I try to switch to me nvidia card.

I tried switching manually, using sudo prime-switch nvidia, and configuration info was updated. I tried again, and nvidia-settings asked me to log out and log back in and...voilà! I've got it working!

In my case, it appeared that before being able to switch using nvidia-settings UI, I had to manually switch first as superuser, so as to generate the proper configuration!

Good thing I tried that, or I'd still be tinkering about, installing other drivers! Hope this proves useful to someone else!

share|improve this answer

I think I've found a workaround at least.

It's all about update-alternatives.
I've noticed that both
sudo update-alternatives --config i386-linux-gnu_gl_conf
sudo update-alternatives --config x86_64-linux-gnu_gl_conf
return list containing
/usr/lib/i386-linux-gnu/mesa/ or similar.
Somehow after every reboot /usr/lib/i386-linux-gnu/mesa/ was set as choosen even if I've changed it before manually.

I tried changing the order on that list, but finally the solution was to remove it by
sudo update-alternatives --remove x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/mesa/
sudo update-alternatives --remove i386-linux-gnu_gl_conf /usr/lib/i386-linux-gnu/mesa/
That should be enought. If not, set both 'i386' and 'x86_64' to the same option by sudo update-alternatives --config x86_64-linux-gnu_gl_conf and sudo update-alternatives --config x86_64-linux-gnu_gl_conf. Reboot afterwards.

You can always restore it to original state by
sudo update-alternatives --install /etc/ i386-linux-gnu_gl_conf /usr/lib/i386-linux-gnu/mesa/ 500
sudo update-alternatives --install /etc/ x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/mesa/ 500.

Hope that it will also work for You.

share|improve this answer

follow pre answers, this is the way how I get it right on my linux mint 17.2.

first I do:

sudo update-alternatives --config x86_64-linux-gnu_gl_conf

select the one with 'nvidia-prime':

sudo prime-select nvidia

then restart:

sudo init 6
share|improve this answer

I've had a problem that looked the same, and the answer was that I still had bumblebee-nvidia installed.

Notice that you're purging "everything NVIDIA" with sudo apt-get purge nvidia*, and the package above doesn't match that wildcard.

So, try:

apt-get purge bumblebee-nvidia nvidia*

Then reboot, then install the relevant nvidia-xxx, nvidia-settings and nvidia-prime packages (I'm currently using the version 340.24 from xorg-edgers).

Now during this installation you should see the relevant update-alternatives messages about the *gnu_gl_conf files.

share|improve this answer
:-/ ... nothing bumblebish left to purge since my last attempt – Raffael Jul 27 '14 at 9:24

I found the solution.

I'm not sure what exactly was the problem, but this issue seems to have disappeared on a fresh install of 16.04. Perhaps they updated the dependencies properly in it? I'm not sure.

But I can personally confirm that this is no longer an issue in 16.04. I used to have the EXACT same issue in 14.04. But now with 16.04 it is no longer an issue.

share|improve this answer
Forgive me for bringing up an old answer but I was facing the exact same issue – Rakshith Ravi Apr 28 at 12:43

protected by Community Aug 30 '14 at 17:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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