When I first installed Ubuntu 13.10, I installed Nvidia Prime. It was easy to install and things seemed to just work at first. Now, I am having second thoughts. Bumblebee sounds like the better route for me now, and these are my notes. Switching back to Bumblebee was no trivial task though.
My biggest reason for switching lies in the bugs. These are the two main ones that were causing me problems.
- Ubuntu Bug #1220865: [nvidia-prime] Xorg freeze after resume from suspend
- Ubuntu Bug #1220426: [nvidia-prime]Freeze while using touchpad
The bugs were livable. I had figured out how to work around them, but they were annoying.
Then, I also learned that Prime wasn’t as big of a deal as I originally thought. It uses the Nvidia graphics processor the entire time. The price that I pay for that is in battery life. If I switch to Bumblebee where it is only used for some applications, I will get better battery life. I thought it was worth it.
Had I decided to stick with Prime, I could have improved on two things…
First, I would install the Prime Indicator (as WebUpd8 describes) — this would make it easier to switch between the NVidia and the Intel graphics processor. That would improve battery life.
Second, I should have uninstalled the libvdpau-va-gl1 package (as WebUpd8 recommended). That might have fixed some of the little bugs that I was seeing.
In either case, those improvements would not have fixed the issues with it freezing on me or resuming from suspending. So, I am heading toward Bumblebee.
Removing prime was the easy part.
I uninstalled the prime packages with apt-get:
sudo apt-get purge nvidia-319 nvidia-settings-319 nvidia-prime
The output looked like this:
Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: kde-l10n-engb Use 'apt-get autoremove' to remove it. The following packages will be REMOVED: nvidia-319* nvidia-prime* nvidia-settings-319* 0 upgraded, 0 newly installed, 3 to remove and 2 not upgraded. After this operation, 213 MB disk space will be freed. Do you want to continue [Y/n]?
I had hoped to use the Bumblebee Configurator GUI. Unfortunlately, it doesn’t really look like it’s kept up to date. The last post on Alex Facciorusso’s blog about it is in May of last year. The worst part is that the configurator doesn’t contain a Saucy version.
So, I dropped back to the manual installation. I added the repository and installed the package.
sudo add-apt-repository ppa:bumblebee/stable sudo apt-get update sudo apt-get install bumblebee sudo apt-get install primus
Because I am on a 64-bit OS, I tried installing this package (it was already installed):
sudo apt-get install primus-libs-ia32
To see which version of the nvidia driver I had installed, I ran this:
ls -d /usr/lib32/nvidia* ls: cannot access /usr/lib32/nvidia*: No such file or directory
That means I didn’t have one installed. So, I installed the nvidia-current package:
sudo apt-get install nvidia-current
Next, I had to edit the /etc/bumblebee/bumblebee.conf configuration file. Here are the changes that I made:
- Changed “Driver=” to “Driver=nvidia”
- Changed “KernelDriver=nvidia-current” to “KernelDriver=nvidia-304” (the one under [driver-vidia])
- Changed “LibraryPath=/usr/lib/nvidia-current:/usr/lib32/nvidia-current” to “LibraryPath=/usr/lib/nvidia-304:/usr/lib32/nvidia-304”
- changed “XorgModulePath=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules” to “XorgModulePath=/usr/lib/nvidia-304/xorg,/usr/lib/xorg/modules”
If you want the short version of the story, it should have been nvidia_304 instead of nvidia-current. It seems to depend on the package that you install though.
I rebooted at this point. When it came back up, I could login, but it would only take me to a black screen.
In order to get a desktop to troubleshoot Bumblebee, I installed the XFCE4 desktop.
sudo apt-get install xfce4
Looking back through old notes, I think I noticed a point in time where reinstalling Bumblebee helped. It was just a guess. Here’s the commands:
sudo apt-get purge bumblebee sudo apt-get autoremove sudo apt-get install bumblebee bumblebee-nvidia
That didn’t seem to make a big difference, so I edited /etc/bumblebee/bumblebee.conf and changed “KernelDriver=nvidia-current” to “KernelDriver=nvidia_current”. And, I added this after that line: “Module=nvidia”.
That didn’t work, but I had a clue that the KernelDriver wasn’t quite right. From what I read, it depends on the package that you install. Now, I have to figure out exactly which module I had. The modules.dep file held the key:
$ grep nvidia /lib/modules/$(uname -r)/modules.dep kernel/drivers/video/nvidia/nvidiafb.ko: kernel/drivers/video/vgastate.ko kernel/drivers/video/fb_ddc.ko kernel/drivers/i2c/algos/i2c-algo-bit.ko kernel/drivers/net/ethernet/nvidia/forcedeth.ko: updates/dkms/nvidia_304.ko:
The last line showed me that the driver was called “nvidia_304”. So, I edited /etc/bumblebee/bumblebee.conf and changed “KernelDriver=nvidia-current” to “KernelDriver=KernelDriver=nvidia_304”.
Finally, that got Bumblebee working. To prove it, I was able to run “optirun glxspheres64”. But, I still had a black screen when I tried to boot into Unity.
Then, I tried to reset unity with:
That didn’t work for me, so I ran “ccsm”, and disabled and enabled the Unity Plugin. It was a little tricky at first…
The “Ubuntu Unity Plugin” doesn’t have a checkbox on it:
But, if you click on it and open the settings, you will see the enable/disable checkbox on the left:
When, I enabled it back, it said there were some conflicts. I picked the options to fix the conflicts, and then, the menus came right back.
Here are the different ways to run glxspheres (from left to right):
glxspheres64 optirun -b primus glxspheres64 optirun glxspheres64
The framerates didn’t look quite right when they were all running at the same time. So, I did each individually.
When running by itself with optirun, it was running around 59 frames/sec. With optirun by itself, it was running between 169 – 185 frames / sec. Using the primus option, it is still 59 frames / sec.
- Developer Zone: Ubuntu 13.10, nvidia-prime, suspend/resume bug, touchpad bug
- WebUpd8: PRIME INDICATOR LETS YOU QUICKLY SWITCH BETWEEN NVIDIA AND INTEL GRAPHICS [UBUNTU 14.04]
- WebUpd8: USING NVIDIA GRAPHICS DRIVERS WITH INITIAL OPTIMUS SUPPORT IN UBUNTU 13.10 GOT EASIER WITH NVIDIA-PRIME
- WebUpd8: BUMBLEBEE 3.2.1 RELEASED WITH UBUNTU 13.04 FIXES, NEW OPTIONS
- Launchpad: Bumblebee Configurator GUI
- Alex Facciorusso: The Blog! — Bumblebee Configurator GUI Category
- WebUpd8: PRIMUS: BETTER PERFORMANCE AND LESS POWER CONSUMPTION FOR BUMBLEBEE [OPTIMUS HYBRID GRAPHICS CHIPSETS]
- Bumblebee Wiki: Troubleshooting
- Ask Ubuntu: NVidia with Optimus conflicting in Ubuntu 12.04
- ArchLinux Forum: [SOLVED] FATAL: module nvidia not found
- Ask Ubuntu: How do I reset my Unity configuration?
- Ubuntu Bug #1257434: Removing nvidia-prime & nvidia driver packages creates an unusable install