We're running Linux 5.10 with the sam patches on a number of Surface Pros (currently 5.10.23, but the issue occurs with older 5.10 kernels as well).
On the SP7s, changes to the RTC don't seem to persist across reboots, whereas it works fine on an SP4 and an SP6.
Steps to reproduce:
- Disable NTP
- Change system time
- "hwclock -r" -> should show old time
- "hwclock -w" -> write new system time to RTC
- "hwclock -r" -> should show new time
- reboot
- "hwclock -r" -> shows old time
(You can also boot into the UEFI settings, which also shows the old time.)
The above is using the standard rtc_cmos driver which uses the "RTC" ACPI device. I noticed in the ACPI tables that the Surface Pro has another RTC device, "SRTC", which is supported by the acpi_tad driver. However by default the driver fails to load, with the error "acpi-tad ACPI000E:00: Missing _PRW".
By commenting out the "return -ENODEV" after that error in drivers/acpi/acpi_tad.c, the driver seems to load correctly.
Unfortunately it doesn't seem to register as an actual RTC under /dev/rtc*. Instead there is a sysfs interface in /sys/bus/platform/devices/ACPI000E:00.
Reading/writing the "time" sysfs file reads/writes the RTC, and this DOES persist across reboots.
(NOTE: When reading, timezone is always 2047. When writing, timezone must not be 2047 otherwise it silently fails.)
Reactions are currently unavailable
We're running Linux 5.10 with the sam patches on a number of Surface Pros (currently 5.10.23, but the issue occurs with older 5.10 kernels as well).
On the SP7s, changes to the RTC don't seem to persist across reboots, whereas it works fine on an SP4 and an SP6.
Steps to reproduce:
(You can also boot into the UEFI settings, which also shows the old time.)
The above is using the standard rtc_cmos driver which uses the "RTC" ACPI device. I noticed in the ACPI tables that the Surface Pro has another RTC device, "SRTC", which is supported by the acpi_tad driver. However by default the driver fails to load, with the error "acpi-tad ACPI000E:00: Missing _PRW".
By commenting out the "return -ENODEV" after that error in drivers/acpi/acpi_tad.c, the driver seems to load correctly.
Unfortunately it doesn't seem to register as an actual RTC under /dev/rtc*. Instead there is a sysfs interface in /sys/bus/platform/devices/ACPI000E:00.
Reading/writing the "time" sysfs file reads/writes the RTC, and this DOES persist across reboots.
(NOTE: When reading, timezone is always 2047. When writing, timezone must not be 2047 otherwise it silently fails.)