5

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

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
devopsfun
  • 1,377
  • 6
  • 16
  • 24

2 Answers2

7

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...

kbulgrien
  • 780
  • 6
  • 21
umläute
  • 6,300
  • 1
  • 24
  • 48
  • 1
    I was getting `rmmod: ERROR: Module nouveau is in use` and I found that `echo 0 > /sys/class/vtconsole/vtcon1/bind` solves the problem. I still have to understand what that command does. – Avio Jan 11 '19 at 00:40
  • 1
    That command works indeed, but it left me with no console (I was on VT1). No VT1-6 or 7 would work. I had to ssh into the system from the laptop in order to proceed with the other commands. Then I could `rmmod nouveau` – Andyc Jan 23 '19 at 11:19
1

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

lviggiani
  • 3,549
  • 7
  • 35
  • 67
  • 1
    I tried it now with `sudo service lightdm restart`. Output says, that `lightdm` stopped and started again. But the command `lspci -vnn | grep -i VGA -A 12` says, that the GPU is using `nouveau` (`Kernel driver in use: nouveau`) – devopsfun Jul 29 '15 at 15:08
  • Maybe another needed info: I have access to Ubuntu through SSH. – devopsfun Jul 29 '15 at 15:10