Ubuntu 14.04 and Nvidia GeForce (840M) compatability on 64-bit laptop
My laptop diagnostic shows several pre-fails and has other issues so I am urgently shopping for a new laptop, my second using Ubuntu. I need a laptop with good graphics capabilities and have come across a couple with the Nvidia GeForce 840M graphics card. In other words, I do not have a problem now and am hoping to avoid one.
My research on Ask Ubuntu and elsewhere shows that there have been some bugs with Ubuntu 14.04 and Nvidia drivers (not just for the 840M driver) but that fixes were made or a least suggested. But I have seen nothing definitive, e.g. the Ubuntu Certification for laptops is barely starting with 14.04.
I am about to spend a 1000 dollars and would love a little more assurance before I proceed -- my understanding is that a Live CD cannot perform a full simulation. Are there easy-to-recognize concrete factors which make compatibility (more) predictable, such as specific models of computer and their processors?
I am a considering a MSI GP60 with an Intel i5 4200M and an ASUS n56jn-mb71 with an Intel i7 4700HQ. Both use an Nvidia 840M graphics card.
Solution 1:
I had a very similar problem and spent several days trying to get my card working.
I have an ASUS X550LN which has an Intel Graphics Driver on the CPU and a dedicated NVIDIA GEFORCE GT 840M.
First, installing the nvidia-340 drivers would cause Unity and Gnome to fail when launching. I could drop to a shell Ctrl + Alt + F1
and remove the driver sudo apt-get remove nvidia*
to get things back to running solely on the Intel Graphics Driver.
After some research, I discovered that having both these interfaces made the system an NVIDIA Optimus (which is actually good just not well supported on Linux yet). Luckily, there is a project called Bumblebee which will help. More info here: https://wiki.ubuntu.com/Bumblebee
Here is what finally worked for me:
-
Install bumbleebee
- Add bumblebee repository:
add-apt-repository ppa:bumblebee/stable
- Update repository information:
apt-get update
- Install packages:
apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic
- Reboot
- Add bumblebee repository:
For me, at this point bumblebee was installed but the nvidia-304
package was installed as this is what is installed with nvidia-current
. Looking online I found that I needed Driver 337+. At the time of writing this, the best driver for me was nvidia-340
. This however is not in the default repo so you will need to add another one.
-
Install correct nvidia driver
- Add xorg-edgers repository:
add-apt-repository ppa:xorg-edgers/ppa
- Update repository information:
apt-get update
- Install nvidia-xxx drivers (for 840m it was nvidia-340):
apt-get install nvidia-xxx
- Add xorg-edgers repository:
For me I got an error message the first time I ran apt-get install nvidia-xxx
. However, simply running it again worked fine. I'm not 100% sure what happened.
-
Configure bumblebee to use latest driver
- Using your favorite text editor open
/etc/bumblebee/bumblebee.conf
- Find the line starting with
Driver
and change it toDriver=nvidia
- Find the line starting with
KernelDriver
and change it toKernelDriver=nvidia-xxx
- Find the line starting with
LibraryPath
and change it toLibraryPath=/usr/lib/nvidia-xxx:/usr/lib32/nvidia-xxx
- Find the line starting with
XorgModulePath
and change it toXorgModulePath=/usr/lib/nvidia-xxx/xorg,/usr/lib/xorg/modules
- Using your favorite text editor open
Basically, replace all of the nvidia bits with the nvidia driver you installed in step 2.
- Reboot
After rebooting, hopefully you are able to access Unity, Gnome, or whatever display manager you're using.
- Test that everything is working
- First test without using NVIDIA card:
glxspheres
- Second test with NVIDIA card:
optirun glxspheres
- First test without using NVIDIA card:
I hope this works for the next person!
Solution 2:
I installed a Lenovo Z50-70 laptop two days ago with an Intel HD 4400 integrated and with this Nvidia Geforce 840M GPU. I installed an Ubuntu 14.04 trusty thar on it (from an usb stick with UEFI boot). The system worked with the intel vga by default, yes, a current nouveau driver can't recognise the Geforce 840M.
The easiest sollution to work with it:
In terminal, add the xorg-edgers ppa:
sudo add-apt-repository ppa:xorg-edgers/ppa
(type password and press an other enter after the ppa add request)
Update package database:
sudo apt-get update
Open the System settings window, than softwares and updates, and the Additional drivers tab. Wait some seconds, and now, you can see at least two component in the Nvidia list. Select the nvidia driver instead of nouveau (current stable version is 340.58), and wait for the automatic install (a progressbar will work in the window).
Optional (but suggested for hybrid systems like mine): in terminal, install nvidia-settings and nvidia-prime (maybe installed by default, i don't know exactly), so type:
sudo apt-get install nvidia-settings nvidia-prime
Don't install the prime-indicator, because it kills the good driver (unless the prime-indicator package is updated by the package maintainer, currently it is not)!
Reboot your system and (after some flashing at first boot) the 840M works well!
If you installed bumblebee or any other unsupported tool, you must purge these things first! Or you can try to tricking with this toys. With the official prime support, you can switch between the intel and nvidia chips with the nvidia settings application.
Solution 3:
Well, I had the same problem on my Z50-70. I tried many solutions including the ones described here. And I discovered something that worked much better for me than these two.
First add the apt-repository: sudo add-apt-repository ppa:xorg-edgers/ppa
.
Then update package database sudo apt-get update
.
And then install the nvidia-331 driver. Install this exact version, not any newer version. I tried some newer versions (and also lot of other stuff) and they were working but much worse. sudo apt-get install nvidia-331
.
Then simply reboot. Everything should work fine.
You don't have to install additionally any things like nvidia-prime or nvidia-settings as they are installed automatically with nvidia-331.
This solution is good for both hybrid and normal systems.
For hybrid system owners:
The default used GPU should be the nVidia one but if you want to use the Intel one (e.g. for saving power) you can easilly change it with nvidia-settings
.
Hope that helps. :-)