Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

[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 pastebin.com


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*
[reboot]
sudo apt-get install nvidia-319-updates nvidia-settings-319-updates nvidia-prime
[reboot]
[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/ld.so.conf.d/x86_64-linux-gnu_GL.conf /usr/lib/nvidia-331-updates-prime/ld.so.conf
update-alternatives: error: alternative name (/etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf) 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 alt_ld.so.conf
-rw-r--r--   1 root root    60 Apr  4 11:50 ld.so.conf

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/ld.so.conf 
update-alternatives: using /usr/lib/nvidia-331-updates-prime/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

raffael@raffael-GT60:~$ sudo update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/nvidia-331-updates-prime/alt_ld.so.conf
update-alternatives: using /usr/lib/nvidia-331-updates-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (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
1  
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 at 15:34
    
Can you post your /etc/apt/sources.list? –  davidbaumann May 2 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 at 18:55
    
did u removed nvidia 1st ? @Raffael –  Qasim May 2 at 19:25
    
can i have teamviewer access so i can look the issue –  Qasim May 2 at 19:28

3 Answers 3

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/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-331-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode

When I switch to NVIDIA I see:

update-alternatives: using /usr/lib/nvidia-331/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-331/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (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/ld.so.conf
sudo update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/nvidia-331-prime/alt_ld.so.conf

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 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 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 at 13:46
    
+10 +50 for the effort ;) I guess I'll just reinstall Ubuntu when I find the time –  Raffael May 7 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 at 15:05

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 at 9:24

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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