I have a laptop Asus K53s with nVidia GeForce GT 540M. I (freshly) installed Ubuntu 14.04 64bit and set up nvidia-331 proprietary driver for the graphic card. I set prime option to run nVidia acceleration and it used to work fine.

On 25th Janaury 2015, there was an Ubuntu software update (from apt log I saw it was updated nvidia-settings, and other stuff) after which I see a black screen instead of the login screen.

I tried to switch to intel graphic card (sudo prime-switch intel) but it gives erros, it is not able to switch to intel.

I tried to purge nvidia* and then install nvidia-340, but it still shows black screen instead of login.

The only way to use my laptop is to install:

apt-get install nvidia-current-updates 

which is the driver nvidia-304. But it uses the intel graphics card. It is not possible switch to nVidia neither with

sudo prime-switch nvidia

nor with

nvidia-setting graphic utility.

I need to use my nVidia card for graphic acceleration (OpenGL). At the moment the laptop is too slow for my activity (CAD).

  • Did you try reinstalling the driver ? Try downloading the driver from NVidia Official Website and installing it. – Kenpachi Jan 29 '15 at 8:57
  • No, I did not try NVidia official driver downloaded from NVidia web site because I am worried to mess my Ubuntu system up. Initially I just tried the NVidia proprietary drivers available in Ubuntu "Additional Drivers" window. I always got black login screen with all of them. Then I tried to add NVidia repository: sudo add-apt-repository ppa:mamarley/nvidia and then install nvidia-340. Unfortunately I get again black login screen. If you think official NVidia can fix the problem and not mess my Ubuntu up I will try. – Simone Pernice Jan 29 '15 at 11:34
  • What versions is your xorg stack? – Braiam Aug 13 '15 at 12:15
  • I used a laptop with Ubuntu 14.04.1 64bit which I do not have with me now. That version of Ubuntu should use X Server 1.15.1 – Simone Pernice Aug 17 '15 at 13:47

I eventually solved my problem with my nvidia.

I found the fix on the post #15 of https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1362848

Here how I fixed in details:

Log out and go to the console:


if (like me) you tried to install latest nvidia driver (nvidia-340 ...), you need to revert back with following commands:

sudo apt-get install ppa-purge
sudo ppa-purge xorg-edgers
sudo apt-get purge nvidia*

Then copy all xorg config files in a temporary dir:

mkdir temp
sudo mv /etc/X11/xorg.conf* ./temp/

Then clean, update, upgrade and reboot the system:

sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade
sudo reboot

Go to the console:


Install nvidia 331:

sudo apt-get install nvidia-331 nvidia-prime 

Copy the old xorg.conf made by nvidia back in its directory:

sudo cp temp/xorg.conf.nvidia-xconfig-original /etc/X11/xorg.conf

And edit it (I used vi, you may prefer nano):

sudo vi /etc/X11/xorg.conf 

To be as the following:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"

Section "Device"
    Identifier "intel"
    Driver "intel"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "SNA"

Section "Screen"
    Identifier "intel"
    Device "intel"

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"

Eventually reboot the system:

sudo reboot

Now I have nvidia set as graphic card and the hardware acceleration works fine.


With installation of nvidia drivers, you need to be very careful and calm. Different versions of nvidia work differently with some groups of laptops. This update may screw something up, but do not worry - try to

$ sudo apt-get purge 'nvidia*'
$ sudo apt-get install nvidia-prime nvidia-331 nvidia-331-updates

If something goes wrong

...and you will reboot the system then black screen appears again:

  1. switch to another tty by pressing Ctrl + Alt + F2.

  2. uninstall all stuff connected with nvidia by running sudo apt-get purge 'nvidia*'.

  3. reboot system sudo reboot and try with other versions of nvidia (310, 313, 319 or re-install again 331, but with or without "updates" package).

The combination of Ctrl + Alt + F7 you will return to graphical mode again in you are in other tty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.