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.
Get Bumblebee working in Ubuntu 12.04 (tested on Dell XPS L702X)
1. 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:sudo apt-get purge bumblebee
sudo apt-get install bumblebee
2. Now, to apply the workaround for getting Bumblebee to work:
You can see if you have the "nvidia-current" or "nvidia-current-updates" driver installed by searching for "nvidia-current" in in Synaptic.
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
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
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
And obviously, glxspheres should start and the framerate should be singnificantly better than running "glxspheres" without "optirun".