No 3D support on Lenovo W520 with nVidia Optimus

13,553

I have seen the Lenovo W520 machines psychically. These provide options to choose between Optimus, Discrete and Integrated mode. Optimus mode still defaults to the Intel graphics card while keeping the Nvidia card on. Discrete just hides the Intel graphics card from the OS. If you wish to take advantage of the nVidia card, you still need Bumblebee for now, or use discrete video mode.

If you switch to the integrated card in BIOS you need to make sure that the nVidia GL libraries are not loaded, otherwise it'll result in broken 3D support. The easiest method is uninstalling the nvidia-current driver. Otherwise, if you want to keep the nvidia drivers (because you frequently switch between Optimus/Nvidia and integrated), a change is needed to control the libraries to be loaded:

Disabling the nvidia libraries (forcing Mesa libraries)

Run the below commands to configure the Mesa libraries as default. One of the commands may fail if you do not have the 64-bit (or 32-bit for the second) libraries.

sudo update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
sudo update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/i386-linux-gnu/mesa/ld.so.conf
sudo ldconfig

Re-login (or simply reboot) for the changes take effect.

Enabling the nvidia libraries

To enable the nvidia libraries, make the alternatives system automatically choose the best driver available (nvidia takes precedence over Mesa).

sudo update-alternatives --auto x86_64-linux-gnu_gl_conf
sudo update-alternatives --auto i386-linux-gnu_gl_conf
sudo ldconfig

Re-login (or simply reboot) for the changes take effect.

Share:
13,553
Juli Ru
Author by

Juli Ru

Updated on September 18, 2022

Comments

  • Juli Ru
    Juli Ru over 1 year

    i know about projects like Bumblebee but i don't need them. I've got a Lenovo W520 and i can choose in the BIOS which graphics card I'd like to use.

    And now my problem: I've installed the nividia-driver and it work's fine but when I switch to the integrated graphics card (Intel) ubuntu isn't able to detect it. It boots up well but Unity 3D doesn't work which means that there is no 3D-support.

    What should I do now?

    Thanks for your help!

  • Juli Ru
    Juli Ru about 12 years
    Thank you for your answer. My W520 provides 3 options. One for optimus, one for integrated grpahics and one for discrete graphics. But now everything works correctly..... Tanks, thanks, thanks... :-)
  • Lekensteyn
    Lekensteyn about 12 years
    Oh, I haven't looked further on that because I thought there were only two options. Good to know, thanks :)
  • nafg
    nafg over 10 years
    Do you mean "The second mode just hides the nvidia graphics card"? Or am I confused?
  • Lekensteyn
    Lekensteyn over 10 years
    @nafg That would be true for discrete mode indeed. This machine actually has three options, I'll update the answer accordingly.