ilayna / Single-GPU-passthrough-amd-nvidia

My way of doing single gpu passthrough the simplest way, I've gathered many sources together to make the perfect Single GPU passthrough guide the simplest and easiest way.
GNU General Public License v3.0
397 stars 39 forks source link

BlackScreen after shutdown VM #18

Closed ZaikoARG closed 2 years ago

ZaikoARG commented 2 years ago

Hello, I have a problem with the GPU Passthrough.

The VM starts perfectly, I can use it and the Passthrough works perfectly, but when I shut down the machine I get a Black Screen.

I've tried running the start and revert scripts manually from ssh without the machine running and these work perfectly. When I run start the GPU unbind occurs and when I run revert the nvidia drivers are initialized correctly and the GPU is bind again. But when running the VM with the same scripts I get the black screen.

CPU: Ryzen 5 3600 GPU: RTX 2070 Super Kernel Version: 5.15 OS: Ubuntu 22.04 Nvidia Drivers: 515 (I've tried with the 470 and it didn't work either. I saw the previous issue that was solved by installing the 460 drivers, but unfortunately I can't install them since the .run gives me an error in building kernel module, this is probably because the driver was made for an older version of the kernel. And the apt package is Transitional)

ilayna commented 2 years ago

Is tty working ? can you go to it and see the command line ? (ctrl + alt + f1)

ZaikoARG commented 2 years ago

Is tty working ? can you go to it and see the command line ? (ctrl + alt + f1)

With the VM off it works, when I'm on the black screen it doesn't

ilayna commented 2 years ago

With the VM off it works, when I'm on the black screen it doesn't

Okay, can you try starting the display manager from it ? try sudo systemctl start display-manager or sudo systemctl start gdm

ZaikoARG commented 2 years ago

With the VM off it works, when I'm on the black screen it doesn't

Okay, can you try starting the display manager from it ? try sudo systemctl start display-manager or sudo systemctl start gdm

When I try to do it under ssh on the black screen it hangs.

Same for virsh nededev-reattach

image

ilayna commented 2 years ago

Weird, can you please share the logs, (please as a pastebin link or something like that thanks)

ilayna commented 2 years ago

Found people having the same issue, check here https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/29 https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/27 https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/19

Can you please try downgrading the kernel to 5.15 LTS and try again ? might be kernel related issue.

ZaikoARG commented 2 years ago

Found people having the same issue, check here

https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/29

https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/27

https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/19

Can you please try downgrading the kernel to 5.15 LTS and try again ? might be kernel related issue.

Ok, now I reinstall Ubuntu and will try to set it up again. If I have the same problem, I’ll try your solution.

ilayna commented 2 years ago

Found people having the same issue, check here https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/29 https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/27 https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/19 Can you please try downgrading the kernel to 5.15 LTS and try again ? might be kernel related issue.

Ok, now I reinstall Ubuntu and will try to set it up again. If I have the same problem, I’ll try your solution.

Okay, please post here how it ends.

ZaikoARG commented 2 years ago

Found people having the same issue, check here

https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/29

https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/27

https://gitlab.com/risingprismtv/single-gpu-passthrough/-/issues/19

Can you please try downgrading the kernel to 5.15 LTS and try again ? might be kernel related issue.

Ok, now I reinstall Ubuntu and will try to set it up again. If I have the same problem, I’ll try your solution.

Okay, please post here how it ends.

Ok, I reinstalled all and the error follow appearing. I try to downgrade to kernel 5.15.0.43 which comes already installed on ubuntu and not working for me. Note: when I has downgrade the kernel I installed the nvidia driver 470.

ZaikoARG commented 2 years ago

I finally fix the problem.

I was able to fix it by using these scripts and disabling CSM. I personally followed the steps in this repository but used those scripts. Although I didn't test the scripts in this repository with CSM disabled, I'm just commenting on how I got it to work for me.

All this using the 5.15 kernel and version 470 of the Nvidia drivers.

By the way, thank you very much @wabulu for your help and quick attention.

ilayna commented 2 years ago

I finally fix the problem.

I was able to fix it by using these scripts and disabling CSM. I personally followed the steps in this repository but used those scripts. Although I didn't test the scripts in this repository with CSM disabled, I'm just commenting on how I got it to work for me.

All this using the 1.15 kernel and version 470 of the Nvidia drivers.

By the way, thank you very much @wabulu for your help and quick attention. It is fair to assume it is related to CSM enabled, as it is intended for UEFI, I don't believe the scripts have anything to do with it, but can't be sure until someone tests it. thanks for posting the solution.