Re: [vfio-users] Preventing host from going into sleep

2016-07-03 Thread Colin Godsey
Ah, damn me for not checking my email! Will post scripts tomorrow for the auto-suspend functionality. On Sun, Jul 3, 2016, 2:07 AM Nicolas Roy-Renaud < nicolas.roy-renau...@ens.etsmtl.ca> wrote: > As it turns out, it's not just about permissions; doing anything too > complex in the wrapper script

Re: [vfio-users] Preventing host from going into sleep

2016-07-03 Thread Nicolas Roy-Renaud
As it turns out, it's not just about permissions; doing anything too complex in the wrapper script can interfere with the way libvirt manages qemu VMs and make it unable to shut them down properly (whether that's due to signal propagation in bash scripts or arguments being altered in some way).

Re: [vfio-users] Preventing host from going into sleep

2016-06-22 Thread Nicolas Roy-Renaud
The thing is that I want my computer to be able to go to sleep at the press of a button *unless* I'm running a VM. Systemd-inhibit does exactly what a want here, complete with a warning and an override prompt, but I haven't managed to get it to communicate properly with the system dbus when it'

Re: [vfio-users] Preventing host from going into sleep

2016-06-22 Thread Laszlo Ersek
On 06/22/16 07:01, Nicolas Roy-Renaud wrote: > I've had my fair share of lockups because I forgot to turn off my VM > before putting my host to sleep, and I've started looking into some sort > of lock to prevent that kind of mistake. Normally, I'd use something > like `systemd-inhibit >

Re: [vfio-users] Preventing host from going into sleep

2016-06-22 Thread Will Marler
Colin, mind posting a pastebin/github link to your script? I want your functionality without doing any work :-D On Wed, Jun 22, 2016 at 8:01 AM, Colin Godsey wrote: > I eventually just set up a script that looks for active qemu/kvm instances > every 15 minutes. I set up the guests to hibernate,

Re: [vfio-users] Preventing host from going into sleep

2016-06-22 Thread Colin Godsey
I eventually just set up a script that looks for active qemu/kvm instances every 15 minutes. I set up the guests to hibernate, because for some reason the… ‘double sleeping’ of the guest and host seem to put the GPUs in a weird state when it wakes. After this, I just have a systemd hook for suspend

Re: [vfio-users] Preventing host from going into sleep

2016-06-21 Thread Samuel Holland
On 06/22/2016 12:01 AM, Nicolas Roy-Renaud wrote: By the looks of it, I can't write a wrapper script for qemu-system either since libvirt doesn't launch it with the same capabilities as a regular user, and the dbus calls coming from sysd-inhibit fail. You should be able to change the permission

[vfio-users] Preventing host from going into sleep

2016-06-21 Thread Nicolas Roy-Renaud
I've had my fair share of lockups because I forgot to turn off my VM before putting my host to sleep, and I've started looking into some sort of lock to prevent that kind of mistake. Normally, I'd use something like `systemd-inhibit