Bug 486187 - cant activate rtc wakeup
Summary: cant activate rtc wakeup
Status: RESOLVED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: general (show other bugs)
Version: 3.8.1
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-27 04:14 UTC by zak
Modified: 2024-09-11 14:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 24.08.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zak 2024-04-27 04:14:41 UTC
SUMMARY:
when trying to make an rtc wake-up it does not set it. this is what i get in terminal:

org.kde.pim.kalarm: Kernel alarm timers not available (no CAP_WAKE_ALARM capability)
kf.i18n.kuit: "Tag 'b' is not defined in message {<__kuit_internal_top__><para>This wakeup will cancel any existing wakeup which h...}."
Warning from helper: QProcess: Destroyed while process ("/usr/bin/rtcwake") is still running.

my pc have the rtc option, if i set it manually it works:
echo Setting rtclock; echo "sudopass HERE" | sudo -S rtcwake -m no -l -t $(date +%s -d 'today 1610')

to show the current wakeup time:
echo "sudopass HERE" | sudo -S rtcwake -m show -l -v |rg alarm: | cut -c 8-30

but with Kalarm it does not work.

STEPS TO REPRODUCE
1. new alarm
2. highlight the alarm
3. actions > wake from suspend
4. use highlighted alarm

OBSERVED RESULT
no rtc wakeup is programmed when clicking "use highlighted alarm"

EXPECTED RESULT
a wakeup program

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.9.0-rc4-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6300U CPU @ 2.40GHz
Memory: 11,6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Manufacturer: Dell Inc.
Product Name: Latitude 7480
Comment 1 David Jarvie 2024-04-27 15:43:40 UTC
The RTC wake-up code using kernel timers was contributed by somebody else who I don't have a contract for, and unfortunately I can't test it on my system. Running the following command might fix the problem: 

systemd-run --user --collect --unit kalarm --property=AmbientCapabilities=CAP_WAKE_ALARM -- kalarm

You may possibly need to quit KAlarm first and then restart it after running the command (or perhaps it will only work if executed while KAlarm is running). It would be very helpful if you could report whether this does fix the problem, and if so whether KAlarm needs to be running when it is executed.  Thank you.
Comment 2 David Jarvie 2024-09-10 15:33:45 UTC
Looking at this again, I realise that kernel timers are not relevant after all.
Comment 3 David Jarvie 2024-09-11 14:36:58 UTC
It looks like the KAuth process which executed rtcwake was exiting before rtcwake had completed. The bug should now be fixed in KAlarm version 3.9.2, which will be released in KDE Gear 24.08.2, by commit 97ef99f19570fb1ffaaed2b1d56df03bdf2e02bc.

If the bug still occurs using KAlarm 3.9.2 or later, please reopen this bug report.