View previous topic :: View next topic |
Author |
Message |
reikdas Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/20742684265c20c786e8aa0.jpg)
Joined: 27 Nov 2018 Posts: 238
|
Posted: Thu Jan 10, 2019 7:38 pm Post subject: Unable to rmmod nvidia |
|
|
I am unable to do rmmod nvidia.
This is my nvidia-rmmod conf - (I set it up with uvm and kms after first getting bumblebee to work as shown in the wiki)
Code: | reik@reik-msi /etc/modprobe.d $ cat nvidia-rmmod.conf
# Nvidia UVM support
remove nvidia modprobe -r --ignore-remove nvidia_drm nvidia_modeset nvidia_uvm nvidia |
These are the errors I faced while trying to rmmod nvidia -
Code: | reik-msi /home/reik # rmmod nvidia
rmmod: ERROR: Module nvidia is in use
reik-msi /home/reik # rmmod nvidia_drm
rmmod: ERROR: Module nvidia_drm is not currently loaded
reik-msi /home/reik # rmmod nvidia_uvm
rmmod: ERROR: Module nvidia_uvm is not currently loaded
reik-msi /home/reik # rmmod nvidia_modeset
rmmod: ERROR: Module nvidia_modeset is not currently loaded |
I built Nvidia with UVM and KMS for bumblebee, so I need nvidia_drm, nvidia_uvm and nvidia_modeset.
Also I have nvidia as a module in /etc/conf.d/modules. _________________ [19:18] <@NeddySeagoon> Gentoo has an installer. Just like other distros. Go to the bathroom, look in the mirror. You will see the Gentoo installer ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Naib Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/10548223558c42f2887453.jpg)
Joined: 21 May 2004 Posts: 6070 Location: Removed by Neddy
|
Posted: Thu Jan 10, 2019 8:40 pm Post subject: |
|
|
is xorg still running?
This is the bash alias I have to stop xorg, unload nvidia, reload nvidia, start xorg
Code: | alias nvidia="/etc/init.d/xdm stop && rmmod nvidia_drm && rmmod nvidia_modeset && rmmod nvidia && modprobe nvidia && /etc/init.d/xdm start"
|
_________________ #define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0; |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
reikdas Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/20742684265c20c786e8aa0.jpg)
Joined: 27 Nov 2018 Posts: 238
|
Posted: Fri Jan 11, 2019 6:49 am Post subject: |
|
|
Naib wrote: | is xorg still running?
This is the bash alias I have to stop xorg, unload nvidia, reload nvidia, start xorg
Code: | alias nvidia="/etc/init.d/xdm stop && rmmod nvidia_drm && rmmod nvidia_modeset && rmmod nvidia && modprobe nvidia && /etc/init.d/xdm start"
|
|
When I ran that, since my display manager stopped, I was pushed out to tty and my display manager did not start back up, so I am not sure if the rest of the commands worked ![Sad :(](images/smiles/icon_sad.gif) _________________ [19:18] <@NeddySeagoon> Gentoo has an installer. Just like other distros. Go to the bathroom, look in the mirror. You will see the Gentoo installer ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Dwosky Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/6549644685be2d92d0dcdd.jpg)
Joined: 07 Nov 2018 Posts: 141
|
Posted: Fri Jan 11, 2019 6:02 pm Post subject: Re: Unable to rmmod nvidia |
|
|
reikdas wrote: |
These are the errors I faced while trying to rmmod nvidia -
Code: | reik-msi /home/reik # rmmod nvidia
rmmod: ERROR: Module nvidia is in use |
|
You can use lsmod to list the modules but also to check what's their parent process or what process its stopping you from removing the module. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Naib Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/10548223558c42f2887453.jpg)
Joined: 21 May 2004 Posts: 6070 Location: Removed by Neddy
|
Posted: Sat Jan 12, 2019 9:50 am Post subject: |
|
|
reikdas wrote: | Naib wrote: | is xorg still running?
This is the bash alias I have to stop xorg, unload nvidia, reload nvidia, start xorg
Code: | alias nvidia="/etc/init.d/xdm stop && rmmod nvidia_drm && rmmod nvidia_modeset && rmmod nvidia && modprobe nvidia && /etc/init.d/xdm start"
|
|
When I ran that, since my display manager stopped, I was pushed out to tty and my display manager did not start back up, so I am not sure if the rest of the commands worked ![Sad :(](images/smiles/icon_sad.gif) |
this command shouldn't push you out to a tty because you need to be in a tty... IF you ran this from within Xorg (gnome,kde,openbox...) then ONCE xdm has stopped then you will go to a tty... Now maybe aspects of the rmmod started so that part of the drivers were removed BUT it wouldn#'t be able to complete because the terminal would have been killed
This is what you need todo
1) CTRL-ALT-F1 to switch to a tty
2) login as root
3) execute etc/init.d/xdm stop && rmmod nvidia_drm && rmmod nvidia_modeset && rmmod nvidia && modprobe nvidia && /etc/init.d/xdm start (hence why I have this as an alias for root)
* xorg should stop, nvidia unloaded, nvidia loaded, xorg should start
Now if this fails there maybe some additionals associated with your setup (systemd as oppose to openrc, some additional drivers...) and if that is the case the steps would be
1) CTRL-ALT-F1 to switch to a tty
2) login as root
3) /etc/init.d/xdm stop
3) rmmod nvidia
*) check error message
4) lsmod
5) rmmod $some_other_module
... _________________ #define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0; |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Yamakuzure Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/46484627558b6ccf846e49.jpg)
Joined: 21 Jun 2006 Posts: 2305 Location: Adendorf, Germany
|
Posted: Mon Jan 14, 2019 2:44 pm Post subject: |
|
|
As there are "sub"-modules now, like drm and uvm, "rmmod" is not the best idea.
Better to configure to use "modprobe -r" like reikdas did above.
Copy&Paste: (I am not on my laptop...) Code: | $ cat nvidia-rmmod.conf
# Nvidia UVM support
remove nvidia modprobe -r --ignore-remove nvidia_drm nvidia_modeset nvidia_uvm nvidia |
The crux is: 'rmmod" ignores this! Use 'modprobe -r nvidia' and it should just work. _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|