

I've recently got a Dell XPS L702X laptop and I was trying to get Nvidia Optimus GPU switching to work in Ubuntu 12.04, through I've recently got a Dell XPS L702X laptop and I was trying to get Nvidia Optimus GPU switching to work in Ubuntu 12.04, through Bumblebee but when running "optirun", I was getting this error:

[ERROR]Cannot access secondary GPU - error: XORG NVIDIA(0): No display devices found for this X screen.

After trying various different solutions available on the Bumblebee wiki and other websites, I've finally found one that worked, so I though I'd share it with you, in case you encounter the same issue as me.

Note: this has only been tested with Dell XPS L702X and may or may not work for other laptops.

Get Bumblebee working in Ubuntu 12.04 (tested on Dell XPS L702X)

sudo apt-get purge bumblebee sudo apt-get install bumblebee

If you are using the nvidia-current driver, copy/paste the following code in a terminal, as a single command (select all the code and paste it):

echo 'Section "ServerLayout" Identifier "Layout0" Option "AutoAddDevices" "true" EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" Option "NoLogo" "true" Option "UseEDID" "true" Option "ConnectedMonitor" "DFP" EndSection' | sudo tee /usr/share/X11/xorg.conf.d/10-nvidia-current-latitude-e6530.conf

If you're using the nvidia-current-updates driver, copy/paste the following code in a terminal window, as a single command:

echo 'Section "ServerLayout" Identifier "Layout0" Option "AutoAddDevices" "true" EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" Option "NoLogo" "true" Option "UseEDID" "true" Option "ConnectedMonitor" "DFP" EndSection' | sudo tee /usr/share/X11/xorg.conf.d/10-nvidia-current-updates-latitude-e6530.conf

After you're done, restart your computer and run "optirun glxspheres" in a terminal to see if Bumblebee / Nvidia Optimus is working correctly - you shouldn't see the error anymore and instead, something like this should be displayed:

andrei@andrei-desktop:~$optirun glxspheres Polygons in scene: 62464 Visual ID of window: 0x21 Context is Direct OpenGL Renderer: GeForce GT 555M/PCIe/SSE2 108.341661 frames/sec - 120.909294 Mpixels/sec 115.823392 frames/sec - 129.258905 Mpixels/sec 118.948088 frames/sec - 132.746066 Mpixels/sec 118.903546 frames/sec - 132.696357 Mpixels/sec 119.179362 frames/sec - 133.004168 Mpixels/sec

Thanks to lucazade @ Ubuntuforums for the Bumblebee Ubuntu 12.04 workaround; image via geeky-gadgets.com

Firstly, install Bumblebee if it's not already installed. If you've messed with the Bumblebee config files, it's probably best to revert them to their default values - you can do this by purging and then installing Bumblebee back:Now, to apply the workaround for getting Bumblebee to work:And obviously, glxspheres should start and the framerate should be singnificantly better than running "glxspheres" without "optirun".