Remove nouveau driver (nvidia) without rebooting

I have a Ubuntu Version here, that is started from USB as a Live version. I do not want to install it on hard disk, because it would be too much for only testing a small thing on Ubuntu.

So I started Ubuntu and installed the nvidia driver (from nvidia) for a GPU (Tesla C2050) with the following commands:

sudo apt-add-repository ppa:xorg-edgers/ppa -y
sudo apg-get update
sudo apt-get install nvidia-346

As Ubuntu is started as Live-version, in the beginning, there was the nouveau driver activated. I want to deactivate it (maybe through rmmod or something. similar), so only the nvidia driver is activated and the GPU is using the nvidia driver.

How it is possible? What can I do without rebooting the whole system (because all packages installed / removed / changes would be gone)?

I have access to Ubuntu through SSH.

I read that I might be helpful to type the command sudo update-initramfs -u but that command generated the output update-initramfs is disabled since running on read-only media

Asked By: devopsfun

||

Have you tried just restarting X?
End session / logout and login again

Answered By: lviggiani

You need to unload the nouveau driver before you can load the nvidia driver.
However, the nouveau driver is currently in use by the X-server, so it cannot be unloaded yet.
You have to stop the X-server first (but don’t just re-start it, as then it will use the nouveau driver again).

So in short:

  • stop X-server: sudo service lightdm stop

  • unload the nouveau driver: sudo rmmod nouveau

  • load the nvidia driver: sudo modprobe nvidia

  • start the X-server: sudo service lightdm start

You might be out-of-luck and the framebuffer for the console is locking the nouveau driver as well. In this case I haven’t found a way to unload the driver at all…

Answered By: umläute
Categories: Answers Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.