Joined: 06 Sep 2019
|Posted: Fri Sep 06, 2019 5:51 am Post subject: How to set shutdown as the hibernation mode for KDE Plasma
I have installed Gentoo on a MacBook Air of late 2011 with KDE Plasma as the desktop environment. I am running kernel 4.19.67 for hot-plugging of Thunderbolt/ethernet adapter and generally speaking everything is working kernel-wise. I have the following user-space problem that likely involves sys-power/pm-utils or plasma PM that I could not fix. As for PM, suspension to RAM works flawlesly. But the hibernate icon in plasma leads to a reboot, indicating a platform firmware issue. Specifically, I can actually hibernate provided the hibernation mode is "shutdown"; i.e.,;
|echo "shutdown" > /sys/power/disk; echo "disk" > /sys/power/state |
works and resumes fine; but
|echo "platform" > /sys/power/disk; echo "disk" > /sys/power/state |
seems to freeze the system and save the image successfully; but the system cannot resume and reboots during wake up.
I frankly didn't care to waste my time to keep or reinstall OS/X just to attempt to update the firmware and see if the "platform"/ACPI hibernation would work. (Before I wiped out OS/X, it seems OS/X had the BIOS updated to a September 2018 version as I see via dmidecode on Linux. So, the former is unlikely to be successful.)
Instead, I just want plasma or pm-hibernate (is it invoking that?) to default to "shutdown" as the hibernation mode:
|$ cat /etc/pm/config.d/gentoo
$ cat /etc/local.d/suspend_to_disk.start
echo shutdown > /sys/power/disk
While the above indeed sets the mode properly for the kernel as I could verify from the command-line, I am afraid KDE plasma and/or pm-hibernate do not seem to honor either. I am not using systemd, which seems to have an explicit setting for this.
Would you be aware of any pm-utils or more directly KDE/plasma solution that would not require me to sudo to invoke a shell script to hibernate properly? If not, I may have to wrap such a solution as a new desktop item, which would be ugly compared to the rest of the plasma environment...
Thanks in advance!
|$equery l acpid laptop-mode-tools pm-utils powerdevil consolekit
* Searching for acpid ...
[IP-] [ ] sys-power/acpid-2.0.31:0
* Searching for laptop-mode-tools ...
[IP-] [ ] app-laptop/laptop-mode-tools-1.72.2-r1:0
* Searching for pm-utils ...
[IP-] [ ] sys-power/pm-utils-1.4.1-r7:0
* Searching for powerdevil ...
[IP-] [ ] kde-plasma/powerdevil-5.15.5:5
* Searching for consolekit ...
[IP-] [ ] sys-auth/consolekit-1.2.1:0
[Moderator edit: added [code] tags to preserve output layout. -Hu]