pikvm-board icon indicating copy to clipboard operation
pikvm-board copied to clipboard

Permission denied: '/sys/class/rtc/rtc0/wakealarm'

Open hewfish opened this issue 2 years ago • 9 comments

I'm seeing a repeating error in the log PiKVM web log that seems linked to the RTC module. I'm running the latest v3 hat image of PiKVM

PermissionError: [Errno 13] Permission denied: '/sys/class/rtc/rtc0/wakealarm'

Full error log:

[2022-03-16 00:25:07 kvmd-watchdog.service] --- kvmd.apps.watchdog INFO --- Running watchdog loop on RTC0 ... [2022-03-16 00:25:07 kvmd-watchdog.service] --- Traceback (most recent call last): [2022-03-16 00:25:07 kvmd-watchdog.service] --- File "/usr/bin/kvmd-watchdog", line 9, in [2022-03-16 00:25:07 kvmd-watchdog.service] --- main() [2022-03-16 00:25:07 kvmd-watchdog.service] --- File "/usr/lib/python3.10/site-packages/kvmd/apps/watchdog/init.py", line 119, in main [2022-03-16 00:25:07 kvmd-watchdog.service] --- options.cmd(config.watchdog) [2022-03-16 00:25:07 kvmd-watchdog.service] --- File "/usr/lib/python3.10/site-packages/kvmd/apps/watchdog/init.py", line 80, in _cmd_run [2022-03-16 00:25:07 kvmd-watchdog.service] --- _reset_alarm(config.rtc, config.timeout) [2022-03-16 00:25:07 kvmd-watchdog.service] --- File "/usr/lib/python3.10/site-packages/kvmd/apps/watchdog/init.py", line 65, in _reset_alarm [2022-03-16 00:25:07 kvmd-watchdog.service] --- _write_int(rtc, "wakealarm", wake) [2022-03-16 00:25:07 kvmd-watchdog.service] --- File "/usr/lib/python3.10/site-packages/kvmd/apps/watchdog/init.py", line 55, in _write_int [2022-03-16 00:25:07 kvmd-watchdog.service] --- with open(_join_rtc(rtc, key), "w") as value_file: [2022-03-16 00:25:07 kvmd-watchdog.service] --- PermissionError: [Errno 13] Permission denied: '/sys/class/rtc/rtc0/wakealarm'

hewfish avatar Mar 15 '22 21:03 hewfish

did you try this https://github.com/ThomasVon2021/pikvm-CM4-Board#25real-time-clock-rtc

hzzfly avatar Mar 16 '22 11:03 hzzfly

Yes, the rtc is loaded and available, however there is not wakealarm under that class

Thanks

On Wed, 16 Mar 2022, 10:23 pm hzzfly, @.***> wrote:

did you try this https://github.com/ThomasVon2021/pikvm-CM4-Board#25real-time-clock-rtc

— Reply to this email directly, view it on GitHub https://github.com/ThomasVon2021/pikvm-CM4-Board/issues/19#issuecomment-1069019167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAV6DUNF7LMBFCXOFPQ5ZETVAHACZANCNFSM5QZ75IAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

hewfish avatar Mar 16 '22 11:03 hewfish

As per my previous comment:

[root@pikvm boot]# cat config.txt 
# See /boot/overlays/README for all available options
initramfs initramfs-linux.img followkernel

hdmi_force_hotplug=1
gpu_mem=128
enable_uart=1
dtoverlay=tc358743
dtoverlay=disable-bt
dtoverlay=dwc2,dr_mode=peripheral
#dtparam=act_led_gpio=13

# HDMI audio capture
dtoverlay=tc358743-audio

# SPI (AUM)
dtoverlay=spi0-1cs

# I2C (display)
dtparam=i2c_arm=on

# Clock
#dtoverlay=i2c-rtc,pcf8563
dtoverlay=i2c-rtc,ds1307
[kvmd-webterm@pikvm rtc0]$ ls
device  subsystem  dev      max_user_freq  since_epoch  uevent
power   date       hctosys  name           time
[kvmd-webterm@pikvm rtc0]$ pwd
/sys/class/rtc/rtc0
[kvmd-webterm@pikvm rtc0]$ 

There is clearly no wakealarm under that tree. Any ideas?

hewfish avatar Mar 21 '22 23:03 hewfish

Same issue here.

How to solve this ?

nmaster2042 avatar Apr 12 '22 19:04 nmaster2042

That's what happens when your software is meant for PiKVM v3 but used on BliKVM...

The PiKVM v3 team #wontfix since it's not their problem!

Martin-HiPi avatar Apr 15 '22 15:04 Martin-HiPi

You can completely disable kvmd-watchdog by

rw
systemctl disable --now kvmd-watchdog
ro

DerTFL avatar Apr 17 '22 08:04 DerTFL

Disabling the specific wakealarm service seems to remove the log issue, does it have any other detrimental effect?

On Sun, 17 Apr 2022, 6:55 pm DerTFL, @.***> wrote:

You can completely disable kvmd-watchdog by

rw systemctl disable --now kvmd-watchdog ro

— Reply to this email directly, view it on GitHub https://github.com/ThomasVon2021/pikvm-CM4-Board/issues/19#issuecomment-1100834581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAV6DUJL6X6VHXYZF6E7Y2LVFPGWJANCNFSM5QZ75IAQ . You are receiving this because you authored the thread.Message ID: @.***>

hewfish avatar Apr 18 '22 00:04 hewfish

I think it only removes the ability to power on the pi at a defined hour. To be checked and confirmed.

nmaster2042 avatar Apr 18 '22 09:04 nmaster2042

I don't think the ds1307 chip supports that function anyway, hence why there is no wakealarm function exposed and available.

hewfish avatar Apr 18 '22 10:04 hewfish