Bug 219493

Summary: rtcwake doesn't work on systems with no /dev/rtc
Product: Tools Reporter: Todd Brandt (todd.e.brandt)
Component: pm-graphAssignee: Virtual Assignee for pm-graph (tools_pm_graph)
Status: NEW ---    
Severity: blocking    
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Bug Depends on:    
Bug Blocks: 178231    

Description Todd Brandt 2024-11-12 09:21:22 UTC
In fedora I've just discovered that the /dev/rtc file is missing. This is the core of the -rtcwake arg and NEEDS a workaround ASAP.

Here's what this should look like:
tebrandt@wopr:~$ ls -al /dev/rtc
lrwxrwxrwx 1 root root 4 Oct  8 10:08 /dev/rtc -> rtc0
tebrandt@wopr:~$
tebrandt@wopr:~$ ls -al /sys/class/rtc/
total 0
drwxr-xr-x  2 root root 0 Nov 12 01:14 .
drwxr-xr-x 70 root root 0 Oct  8 10:08 ..
lrwxrwxrwx  1 root root 0 Oct  8 10:08 rtc0 -> ../../devices/pnp0/00:01/rtc/rtc0
tebrandt@wopr:~$
tebrandt@wopr:~$ ls -al /sys/class/rtc/*/
total 0
drwxr-xr-x 3 root root    0 Nov 12 01:14 .
drwxr-xr-x 3 root root    0 Oct  8 10:08 ..
-r--r--r-- 1 root root 4096 Oct 14 15:44 date
-r--r--r-- 1 root root 4096 Nov 12 01:14 dev
lrwxrwxrwx 1 root root    0 Nov 12 01:14 device -> ../../../00:01
-r--r--r-- 1 root root 4096 Oct  8 10:08 hctosys
-rw-r--r-- 1 root root 4096 Nov 12 01:14 max_user_freq
-r--r--r-- 1 root root 4096 Nov 12 01:14 name
drwxr-xr-x 2 root root    0 Nov 12 01:14 power
-r--r--r-- 1 root root 4096 Nov 12 01:14 since_epoch
lrwxrwxrwx 1 root root    0 Oct  8 10:08 subsystem -> ../../../../../class/rtc
-r--r--r-- 1 root root 4096 Oct 14 15:44 time
-rw-r--r-- 1 root root 4096 Oct  8 10:08 uevent
-rw-r--r-- 1 root root 4096 Oct 14 15:44 wakealarm

Here's what it  looks like on a broken system
[intel@ubuntu ~]$ uname -a
Linux ubuntu.iind.intel.com 5.14.0-503.2.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 6 09:45:12 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
[intel@ubuntu ~]$ ls -al /dev/rtc
ls: cannot access '/dev/rtc': No such file or directory
[intel@ubuntu ~]$ ls -al /sys/class/rtc/
total 0
drwxr-xr-x.  2 root root 0 Aug 24 05:30 .
drwxr-xr-x. 68 root root 0 Aug 24 05:30 ..
[intel@ubuntu ~]$ ls -al /sys/class/rtc/*/
ls: cannot access '/sys/class/rtc/*/': No such file or directory
[intel@ubuntu ~]$