My laptop computer has a Nvidia video card and runs Ubuntu 12.04 LTS 64-bit. During an upgrade yesterday it seemed as a new Nvidia driver version 304 (if I remember correct) was installed. After upgrade and reboot, I opened the Additional Driver tool and found that the Nvidia driver version 304 was in use. So far so good.

However, the Additional Driver tool also reported that there existed a Nvidia driver version 319 and that this driver version was recommended. I then selected to change to this recommended driver, the driver was downloaded and installed, I rebooted the system and ended up with a black screen and a command shell.

How to change proprietary Nvidia video driver using the command line and revert back to the previous version that worked on my system?

(A second question: How can it be that a video driver that apparently does not work was recommended?)

  • are you interested in also changing version or just seeing them? Jul 19, 2021 at 20:26

6 Answers 6


As per this Ubuntu Community Help Wiki Page, Ubuntu 14.04+ is different:

Ubuntu 14.04 and up

The jockey-text command was removed with the release of Ubuntu 14.04. You can now use ubuntu-drivers to get the list of packages for each driver, and then install the packages using apt-get. For example:

sudo ubuntu-drivers devices

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==

vendor   : NVIDIA Corporation
modalias : pci:v000010DEd00000DDAsv000017AAsd000021D1bc03sc00i00
model    : GF106GLM [Quadro 2000M]
driver   : xserver-xorg-video-nouveau - distro free builtin
driver   : nvidia-304-updates - distro non-free
driver   : nvidia-304 - distro non-free
driver   : nvidia-331 - distro non-free recommended
driver   : nvidia-331-updates - distro non-free

sudo apt-get install nvidia-331

Ubuntu 12.04 (same as mikewhatever's answer)

If you need to change drivers without the use of the X GUI, perhaps because those drivers are not installed, you can with the jockey-text command. For example:

jockey-text --help
jockey-text -l
jockey-text -e xorg:nvidia_current
  • I get ubuntu-drivers: command not found if I try to run sudo ubuntu-drivers devices on 14.04.
    – pir
    Jan 2, 2016 at 20:25
  • 2
    run apt install ubuntu-drivers-common to install ubuntu-drivers first.
    – Hank
    Jul 7, 2016 at 5:30
  • 2
    He didn't ask how to install a new driver. He asked how to activate an already installed driver: "evert back to the previous version that worked on my system" Aug 4, 2017 at 2:57
  • 2
    Facing same challenge. I have login in tty2 and want to switch my driver . By sudo ubuntu-drivers command, i can see 4 options. I want to switch driver from nouveau to nvidia-driver-440 (i want to switch, not install as these 4 are already installed). Can you help me to switch command
    – Mubasher
    Jun 18, 2020 at 4:56
  • 1
    @Mubasher and @charlie-parker , from looking at all tutorials on the topic, the sudo apt install nvidia-driver-123 method is what actually selects the driver as well. You need to reboot your system after that. Then, to verify, run nvidia-smi to see which driver version is being used for NVIDIA. If that does not work for whatever reason, there is also the command ubuntu-drivers install nvidia-driver-123. See ubuntu-drivers -h for more info.
    – King Holly
    Mar 25, 2022 at 19:14

Update: For 18.04 and later you need to use ubuntu-drivers. See ubuntu-drivers -h for syntax.

Ubuntu 12.04 (for later versions, see other answers)

You can use jockey-text to disable and enable Nvidia drivers in Ubuntu.

For example:

  • Run jockey-text --list to get the list of available options.

  • Run sudo jockey-text -d xorg:nvidia_304 to remove the 304 driver.

  • Run sudo jockey-text -e xorg:nvidia_304 to enable the same driver.

  • Run jockey-text --help to see the help manual.

  • 2
    what about in 13.10? I don't have a tool called jockey.
    – northben
    Feb 24, 2014 at 14:23
  • 1
    jockey-text is provided by jockey-common: sudo apt-get install jockey-common
    – bacon
    Feb 24, 2014 at 17:30
  • 11
    14.04 (maybe 13.10 also) replaced jockey-common with ubuntu-drivers-common which has the ubuntu-drivers executable that works differently.
    – Nick T
    Jul 23, 2014 at 23:01
  • what about changing driver now that we have the version? Jul 19, 2021 at 20:25

I had the same problem using 304/319 drivers from repositories, Nvidia has proprietary drivers on their website, installed from there they actually work quite well, I used this manual to remove remaining drivers and install the correct one directly from Nvidia.


Make sure you pay attention to everything, especially make sure that in /etc/default/grub line GRUB_CMDLINE_LINUX_DEFAULT contains nomodeset, otherwise Nvidia driver does not work.

Also if proprietary drivers do not work and you are stuck in command line, you may always uninstall Nvidia drivers and install the default nouveau driver.

sudo apt-get autoremove --purge nvidia-*
sudo service lightdm stop
sudo apt-get install xserver-xorg-video-nouveau
  • sudo: stop: command not found
    – Krease
    Feb 23, 2018 at 0:43
  • what about changing driver now that we have the version? Jul 19, 2021 at 20:26

Nowadays (2023), you can use ubuntu-drivers both for looking at available driver versions, and installing them. For example, you can

  • get the list of available drivers:

    ubuntu-drivers list
  • install the recommended drivers:

    sudo ubuntu-drivers install
  • install a specific version from the list:

    sudo ubuntu-drivers install nvidia:535

You can read more at the official NVIDIA drivers installation guide.

  • This is the most up-to-date answer on this page.
    – karel
    Oct 24, 2023 at 13:52

Besides (I know this does not really answer the question), if you are stuck without menu or have a window manager that does not integrate, the ubuntu menu, in Ubuntu 18.04 (and probably most other versions), the graphical frontend where you can choose the Proprietary Drivers can be started via

software-properties-gtk . Of course you need a working X Server to start and use the tool.


You can also download the .sh file from nvidia then follow the steps:

  • First press control+alt+f1 - to exit GUI mode

    • sudo service gdm stop (on ubuntu)
    • navigate to the folder you downloaded nvidia drivers
    • ./nvidia.drivers.sh
    • sudo reboot after install

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .