Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] KVM vga passthrough suspend host
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jnack95
n00b
n00b


Joined: 28 Jun 2008
Posts: 20

PostPosted: Thu Nov 05, 2015 4:40 pm    Post subject: [SOLVED] KVM vga passthrough suspend host Reply with quote

I have a problem I've been unable to find an answer to, if one exists. I am running Gentoo with kvm installed using libvirt and virt-manager. I have two graphics cards installed, a Geforce GTX 560 and a Quadro 2000. I am running Win7 professional as a guest with the Quadro 2000 so I can use CAD/CAM software (Sprutcam). I stubbed out the Quadro PCI address and bound it and it works perfectly. The problem is if I suspend my Gentoo host system while the Win7 Guest is running (or paused), the Quadro is not re-attached after resuming and passed through to the guest and I get a blank screen, but windows is still running. Sometimes it freezes the whole system and sometimes I can forceably shutdown Windows (or use keystrokes to shut it down). I'm not sure this is even possible, but there is no problem pausing and restarting the guest as long as there is no vga passthrough. It seems the quadro card needs to be re-initialized or something. I would like to keep windows running (or paused) all the time without having to shut it down. Hoping someone else has figured this out. Thanks.

Last edited by jnack95 on Thu May 12, 2016 3:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1747

PostPosted: Sat Nov 07, 2015 9:13 pm    Post subject: Reply with quote

An interesting scenario. What happens when you try to suspend that guest OS before you suspend the host?
Back to top
View user's profile Send private message
jnack95
n00b
n00b


Joined: 28 Jun 2008
Posts: 20

PostPosted: Sat Nov 07, 2015 9:39 pm    Post subject: Reply with quote

I can't suspend (Sleep) the Windows 7 guest from within windows (greyed out), but I can pause the guest from the host on virt-manager. When I pause the guest and suspend the host, then resume the host and unpause the guest, is when I lose my graphics (blank screen). Interestingly though, If I just pause the guest and then unpause it, the graphics come back.
Back to top
View user's profile Send private message
jnack95
n00b
n00b


Joined: 28 Jun 2008
Posts: 20

PostPosted: Thu May 12, 2016 3:39 pm    Post subject: Reply with quote

Finally figured this out. SeaBIOS doesn't have this functionality and OVMF must be used.....which means the guest must be installed with the proper OVMF uefi bios. Then, the suspend function in the guest can be turned on in the .xml file virt-manager uses. To suspend the host without losing the graphics during resume, the guest must first be suspended. When the host is resumed, the guest also resumes and the graphics work fine. There's probably some way to have the host issue suspend to the guest via virsh before it suspends, but I haven't put any effort into figuring this out yet.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1747

PostPosted: Thu May 12, 2016 5:36 pm    Post subject: Reply with quote

Great news!
Quote:
There's probably some way to have the host issue suspend to the guest via virsh before it suspends, but I haven't put any effort into figuring this out yet.

The easiest way will be setting action triggered by power button to suspend and sending ACPI even to the guest.
You could use network-based service or virtio device for that as well, but why do that the hard way? ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum