[CentOS] Disable hybernate/suspend in CentOS 7
Leon Fauster
leonfauster at googlemail.com
Fri Oct 14 10:05:31 UTC 2016
Am 14.10.2016 um 10:19 schrieb Liam O'Toole <liam.p.otoole at gmail.com>:
> On 2016-10-13, Valeri Galtsev
> <galtsev at kicp.uchicago.edu> wrote:
>>
>> On Thu, October 13, 2016 11:55 am, Mike - st257 wrote:
>>> On Thu, Oct 13, 2016 at 11:33 AM, Valeri Galtsev
>>> <galtsev at kicp.uchicago.edu> wrote:
>>>
>>>
>>> Have you tried disabling power management via GRUB options?
>>> http://askubuntu.com/a/130541
>>>
>>
>> Mike, thanks! You gave me good enough push into right direction,
>> thanks to which I solved my problem.
>>
>> Disabling power management via GRUB (boot) options didn't help me. I
>> went further along these lines, tried to tweak related stuff in
>> /etc/systemd/login.conf (systemd experts will probably lough, I'm not
>> one, so... ;-) - didn't help either. I finally came to doing what
>> helped me: edited
>>
>> /usr/share/polkit-1/actions/org.freedesktop.login1.policy
>>
>> (replaced "yes" with "no" in a few related places). This solved my
>> problem. I'm not posting what exactly I changed, as I overdid it
>> (disabled locally logged in user's ability to reboot/poweroff machine,
>> and the same from gdm loging screen - I will need to restore these).
>>
>> Thanks! Valeri
>
> Be aware that the file
> /usr/share/polkit-1/actions/org.freedesktop.login1.policy is not a
> configfile and will be silently overwritten when systemd is upgraded.
>
> In earlier releases of PolicyLit local changes were made in
> /etc/polkit-1/localauthority, but I don't know if that approach still
> works.
its long time ago but some EL6 workstation have here:
$ cat /etc/polkit-1/localauthority/50-local.d/10-disable-hibernate.pkla
[Disable suspend]
Identity=unix-group:*
Action=org.freedesktop.devicekit.power.hibernate
ResultAny=no
ResultInactive=no
ResultActive=no
--
LF
More information about the CentOS
mailing list