qvm-create-windows-qube icon indicating copy to clipboard operation
qvm-create-windows-qube copied to clipboard

Force to disable hibernation

Open jevank opened this issue 2 years ago • 2 comments

According to feedback from Qubes OS Forum it is critical to disable hibernation with Windows 10 at preparation stage. Looks like auto-qwt/run.bat is the place for it.

P.S. Very nice tool, thank you.

jevank avatar Dec 22 '21 12:12 jevank

@jevank -

Would it make sense to have it be part of the general power_settings.bat execution in the crossbuild of QWT, modifying here:

https://github.com/QubesOS/qubes-installer-qubes-os-windows-tools/blob/master/power_settings.bat

:: Disable idle sleep & hibernation
powercfg /setacvalueindex SCHEME_MIN SUB_SLEEP STANDBYIDLE 0
powercfg /setdcvalueindex SCHEME_MIN SUB_SLEEP STANDBYIDLE 0
powercfg /setacvalueindex SCHEME_MIN SUB_SLEEP HIBERNATEIDLE 0
powercfg /setdcvalueindex SCHEME_MIN SUB_SLEEP HIBERNATEIDLE 0

By adding powercfg -H off or similar?*

B

PS - also, I have run into a problem before (can't remember if it was windows 7 or 10 VM) where the type of video adapter prevented powercfg from disabling hibernation. In that case, the workaround was using a .reg file to modify the registry directly, e.g.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power]
"HibernateEnabled"=dword:00000000

brendanhoar avatar Dec 22 '21 19:12 brendanhoar

I've made changes in QWT-cross preparation.bat so this issue mostly for R4.0 users. But power_settings.bat looks more reasonable.

jevank avatar Dec 22 '21 20:12 jevank

We're already disabling hibernation in optimize.bat (it's at the end of the script). But it's good to have QWT doing it too now.

ElliotKillick avatar Jun 10 '23 07:06 ElliotKillick