You are not logged in.
Hi!
Thank you for all your help in the forum.
I'm trying to unbind my gpu from nvidia driver and bind it to qemu to try pci-passthrough with one graphics card.
My Gpu driver's bus id is 0000:01:00.0.
When I try a prebuilt script (after killing X and stopping sddm, and in another tty),
echo 0000:01:00.0 > /sys/bus/pci/devices/0000:01:00.0/driver/unbind This will result in No such file or directory error.
I can 'ls' into the directory and can actually confirm that the entire path works and are present.
I then tried to restart, kill X and stop sddm, login as root on tty2, then try the command on its own.
The tty seems to stop. Not responding to Ctrl-C to cancel, it just has a blinking cursor. No errors, nothing. I move onto another tty to see if it had happened, and I don't see the 'driver' directory anymore. the rest of the path up until 'driver' is still present, but there is no driver directory.
If I force a reboot through systemctl, everything is back to normal.
Can anyone explain to me what is happening here?
Thank you!
Last edited by koreankiwitea (2018-12-03 11:52:11)
very n00b.
Offline
Hello,
IIRC, when working with device passthrough, unlike network cards, it's often recommended that video cards should be stubbed, restricting the kernel from initializing the device during boot. See https://wiki.archlinux.org/index.php/PC … ng_the_GPU.
EDIT: Note, although I haven't tested GPU passthrough with one card, I would recommend having a secondary GPU card available to continue to interact with the host machine.
Last edited by bugsmanagement (2018-12-02 18:02:21)
Offline
Hello,
IIRC, when working with device passthrough, unlike network cards, it's often recommended that video cards should be stubbed, restricting the kernel from initializing the device during boot. See https://wiki.archlinux.org/index.php/PC … ng_the_GPU.
EDIT: Note, although I haven't tested GPU passthrough with one card, I would recommend having a secondary GPU card available to continue to interact with the host machine.
Hi bugsmanagement,
This is what I'm trying to do except not during boot, but on the fly. Unbind the GPU from NVIDIA driver and bind it to the vfio. That's why I kill X and stop sddm before proceeding, as well as unloading the kernel module through 'modprobe -r' (not sure if it helps but trying to make sure nothing is interacting with the nvidia bound gpu before I unbind it)
Not during boot because in such a case I don't see any difference between having a dual boot, and that I only have one graphics card...
I also have ssh configured so in any dire circumstances I can ssh into this machine and figure something out.
Thanks for your response.
very n00b.
Offline
Sadly, according to wiki link I posted earlier, "However, due to their size and complexity, GPU drivers do not tend to support dynamic rebinding very well". Mileage will vary, especially with proprietary drivers from Nvidia who may not have implemented the needed functionality to this on the fly. IMHO, I don't believe you will be very successful going this route.
Offline
Sadly, according to wiki link I posted earlier, "However, due to their size and complexity, GPU drivers do not tend to support dynamic rebinding very well". Mileage will vary, especially with proprietary drivers from Nvidia who may not have implemented the needed functionality to this on the fly. IMHO, I don't believe you will be very successful going this route.
Hm. I understand. Nvidia proprietary is a finicky little thing. But single gpu passthrough has been working for a while now and there are reports of successful single gpu passthrough from NVIDIA users. I'll keep on trying.
very n00b.
Offline
Sure, but I would seriously doubt this was attempted with GPU rebinding on the fly, as opposed to doing it the recommended way. You might have better luck with OSS Nouveau drivers?
Offline
The tty seems to stop. Not responding to Ctrl-C to cancel, it just has a blinking cursor.
I only have one graphics card
Since the command seems to work fine, I'd suggest to take a closer look at "a prebuilt script" and what will actually cause the ENOENT…
Online
Sure, but I would seriously doubt this was attempted with GPU rebinding on the fly, as opposed to doing it the recommended way. You might have better luck with OSS Nouveau drivers?
successfully managed to unbind gpu from drivers and bind it to vfio yesterday! so it's all good now.
Since the command seems to work fine, I'd suggest to take a closer look at "a prebuilt script" and what will actually cause the ENOENT…
I'm not sure what I did, I tried with vfio kernel and drivers but it was the same story, so I rolled back and nuked nvidia driver just to reinstall. After I reinstalled, it... kinda just worked. Not sure what the difference between my state before and now is, but hey, I'm glad!
Solved.
A quick question. Qemu boots but I'm only getting a 'Booting from hard disk...' "GRUB" screen. The link below takes to the image. Because to qemu's eye it didn't go wrong, I don't have any error messages to give me a clue where to begin tackling this. Can you advise?
Thank you!
very n00b.
Offline
Does the image boot w/o the GPU passthrough?
How do you conclude that "Because to qemu's eye it didn't go wrong,"
In doubt please open a new thread on this, especially if the image doesn't boot even w/o the passthrough.
Online
bugsmanagement wrote:Sure, but I would seriously doubt this was attempted with GPU rebinding on the fly, as opposed to doing it the recommended way. You might have better luck with OSS Nouveau drivers?
successfully managed to unbind gpu from drivers and bind it to vfio yesterday! so it's all good now.
seth wrote:Since the command seems to work fine, I'd suggest to take a closer look at "a prebuilt script" and what will actually cause the ENOENT…
I'm not sure what I did, I tried with vfio kernel and drivers but it was the same story, so I rolled back and nuked nvidia driver just to reinstall. After I reinstalled, it... kinda just worked. Not sure what the difference between my state before and now is, but hey, I'm glad!
Solved.
A quick question. Qemu boots but I'm only getting a 'Booting from hard disk...' "GRUB" screen. The link below takes to the image. Because to qemu's eye it didn't go wrong, I don't have any error messages to give me a clue where to begin tackling this. Can you advise?
Thank you!
I'm not sure what I did, I tried with vfio kernel
Sadly, this isn't very helpful. I believe in pay forward. You experimented, it's not reproducible ,
Offline