Re: Wake-on-timer rtcwake experiments on various PC hardware
Marko Mäkelä <[email protected]> Mon, 17 Apr 2023 21:14:30 +0300
| Newsgroups | gmane.linux.vdr |
|---|---|
| Message-ID | <ZD2Mhki+F4tp63MU@jyty> |
Mon, Apr 17, 2023 at 04:38:11PM +0300, Marko M=E4kel=E4 wrote: >Mon, Apr 17, 2023 at 10:17:03AM +0200, g.bruno wrote: >>here a longer thread at problems with rtcwake (in German): >> >>https://forum.ubuntuusers.de/topic/rtcwake-geht-nicht-mehr/#post-9369451 > >Thank you. I am not going to use rtcwake on those 2 problematic = >laptops for anything real, but out of curiosity I will experiment a = >bit more. > >One user wrote there that after a reboot, the wakeup time is still = >there after reboot, but the IRQ is disabled. > >The "powertop" tool was not mentioned yet. A possible fix might be to = >use it to enable power management on the offending devices. "sudo powertop" indeed fixed the HP laptop. I pressed the TAB key 4 = times to get to the "Tunables" screen, then used the up and down arrow = keys and the Enter key to toggle each "Bad" to "Good". Near the top of = the screen the corresponding command was displayed. Finally, I pressed = Esc and waited several seconds to exit the program. Below are a few = examples of such tuning advice, from my desktop system: echo auto > /sys/bus/usb/devices/3-1/power/control echo auto > /sys/bus/pci/devices/0000:09:00.0/power/control echo med_power_with_dipm > = /sys/class/scsi_host/host0/link_power_management_policy The page https://help.ubuntu.com/community/PowerManagement/ReducedPower = mentions a tool pm-powersave and some options. That could be useful for = making such power-saving changes permanent on startup. On the IBM Thinkpad X60, fixing the "Bad" things to "Good" was not to = enable the wake-up. In the BIOS setup there is a setting that can = prohibit power-on-timer when the system is on battery power, to protect = an old-fashioned spinning HDD from damage in case the laptop happens to = be moving at the wakeup time. I have an SSD, so I had enabled that, and = the system was on AC power anyway. But the system did not wake up. After doing the "powertop", I executed the following to diagnose it: sudo rtcwake -m no -s 300 && sudo reboot sudo rtcwake -m show sudo journalctl -x The "rtcwake -m show" straight after the reboot indicated that the alarm = is off. I read all journal entries between the two rtcwake commands, = which were helpfully logged. The only thing I found was a kernel boot = message that said that the RTC device supports wakeup from the ACPI S4 = state (hibernate, suspend-to-disk). The normal "soft power off" would be = S5. So, I will have to shrink the file system and create a swap = partition, to enable the suspend-to-disk. I expect that after this = exercise, "rtcwake -m disk -s 300" should actually work, perhaps even = without using any "powertop" spells. Marko _______________________________________________ vdr mailing list [email protected] https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr