Jump to content

No response after rtcwake


Faberix

Recommended Posts

Hello
I recently set up NextCloudPlus/NextCloudPi on a Rock64. I used the image that can be downloaded from the ownyourbits website, cat /etc/*-release resulted in the following output:

BOARD=rock64
BOARD_NAME="ROCK64"
BOARDFAMILY=rk3328
VERSION=5.44
LINUXFAMILY=rk3328
BRANCH=default
ARCH=arm64
IMAGE_TYPE=user-built
BOARD_TYPE=conf
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
03af3b07-6131-4b1c-8cc2-7f716caf75e1
# PLEASE DO NOT EDIT THIS FILE
BOARD=rock64
BOARD_NAME="ROCK64"
BOARDFAMILY=rk3328
VERSION=5.44
LINUXFAMILY=rk3328
BRANCH=default
ARCH=arm64
IMAGE_TYPE=user-built
BOARD_TYPE=conf
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

 

Now, I wanted to use rtcwake to automatically shut down or suspend my server during night. I tested the states off, suspend-to-disk and suspend-to-ram. The first two did not work at all (-m disk was not recognized and when completly switching off, it did not wake). Probably they are not supported by the device. Suspend-to-Ram (-m mem) did work, however, after my Rock64 woke, I was unable to communicate with it. Both the NextCloudPi web interface and ssh are unreachable, then until i manually restart the device using the power connection.

This is a link to a section out of my system log that I think is important (I think it is when rtcwake was launched, the command was sudo rtcwake -m mem -s 300, if I remember the time correctly).

 

I already posted this question in the NextCloud forum and they told me that I may have better chances here.

 

Does anybody know how to solve this issue?
Thanks in advance for any help.

 

Link to comment
Share on other sites

17 minutes ago, Faberix said:

to automatically shut down or suspend my server during night


I don't recall any board that has this feature functional. But I was never particularly interested in having RTC wake.

Link to comment
Share on other sites

Quote

I don't recall any board that has this feature functional. But I was never particularly interested in having RTC wake.

As I said, suspend to ram seems to be working, the on-board LEDs switch on after the appropriate time, I'm just unable to connect to it. I know that Rock64 has an RTC module, so the reason cannot be the lack of a RTC.

Link to comment
Share on other sites

Maybe...

I have found out on this thread that the RTC is not located inside the CPU but in a RK805

Quote

...programmable DC-DC converter unit providing all the voltages the board needs does have one

This RTC has neither a battery nor a crystal, so it cannot be used while the board is off, as I read on this page:

Quote

I2C

Pinouts indicate there are i2c-0 signals on pins P3/F21 (SDA) and P5/F22 (SCL), and i2c-1 on pins P27 (SDA) and P28 (SCL), but looking at the system shows only the /dev/i2c-1 and /dev/i2c-4 busses defined. Scanning them with i2cdetect -y 1, shows address 0x18 on /dev/i2c-1 being occupied by some device or kernel function, presumably the PMIC, and i2cdetect -y 4 shows that the /dev/i2c-4 is on the hdmi line and the DDC bus for monitor. The system emits messages about dw_hdmi_i2c_read calls erroring out.

Indeed, the schematics show that these i2c-1 lines go to a RK805-1 power control chip, the PMIC, and there are 2.2kΩ pull-up resistors on them, so this can be used with some care (stay away from address 0x18).

This address does give access to an RTC within the RK805-1 chip. Unfortunately, the designers have omitted connections to a crystal and a backup-battery, so it can't work as an actual RTC that runs when the device is turned off. However, we can still access it, set and read its time. By the time of the kernel identified as 4.4.126-rockchip-ayufan-239 the time here does appears to be set at startup, since reading it on a newly powered-up machine returns the correct date and time.

 

So I would need an external RTC if I wanted to use rtcwake with off or suspend-to-disk options. Still, in suspend-to-ram, the LEDs turned on again, so apparently, the RTC works in suspend-to-ram mode.

 

In the log it says

Sep  2 12:32:25 nextcloudplus kernel: [    1.431242] rk808-rtc rk808-rtc: rtc core: registered rk808-rtc as rtc0
Sep  2 12:32:25 nextcloudplus kernel: [    1.432090] rk3x-i2c ff160000.i2c: Initialized RK3xxx I2C bus at ffffff8009bf8000

so the on-board RTC is at least registered somewhere. I don't know whether 'nextcloudplus kernel' is the linux kernel in disguise, but apparently, it handles the RTC.

Maybe I will have to see what happens if I have a monitor connected to my rock64.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines