joeknock90 / Single-GPU-Passthrough

1.48k stars 75 forks source link

Unable to unload nvidia module #25

Open Mindstrial opened 4 years ago

Mindstrial commented 4 years ago

I'm having problems with startup hook. I've followed this guide, but starting VM shows my motherboard logo (the same as when starting PC) and hangs. I used ssh to manually run the script and found two problems:

echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind this prints echo: write error: No such device

modprobe -r nvidia this prints modprobe: FATAL: Module nvidia is in use.

I've tried using lsmod | grep nvidia to find what module is using nvidia, but unfortunately I didn'get any module names, only count nvidia 19722240 15

I've tried googling for solutions, but haven't found anything. I'm using Solus OS with Budgie desktop (with LightDM). Any help would be appreciated.

ryujinxx commented 3 years ago

I have the same issue, any luck?

Mindstrial commented 3 years ago

Sorry, no. I gave up on this long time ago and just went dual-boot. If you manage to solve this, please post the solution here!

nift4 commented 2 years ago

for me it was nvidia-persistenced

jiblime commented 2 years ago

echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind this prints echo: write error: No such device

Do you have CONFIG_FB_EFI enabled in your kernel .config? Removing the nvidia module is probably failing because it's still being used as the framebuffer, check with $ cat /proc/fb

$ modprobe -D nvidia would find what is needing nvidia

Dimensional commented 1 year ago

I had the same issue, and it was caused by nvidia-persistenced. I've updated my copies of the start and stop scripts to account for that service. Stack overflow thread helped me down this track. https://stackoverflow.com/questions/61543214/how-to-unload-an-nvidia-kernel-module-nvidia-for-new-driver-installation