-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the bug
At first, i'm aware that suspend to idle isn't officially supported. Today i was playing around with suspend to idle on my Raspberry Pi 1B and noticed some strange behavior of mailbox property "set power/domain state" which is used by raspberry-power driver. The driver doesn't set the wait bit for the state. Since the properties are resume are replied it's not a firmware crash.
Does the driver have to care about the order while powering down a domain?
Did i missed something obvious?
To reproduce
Add "no_console_suspend" to cmdline.txt and reboot
Connect via Debug UART
echo 1 > /sys/power/pm_debug_messages
echo platform > /sys/power/pm_test
echo freeze > /sys/power/state
Expected behaviour
The power domains for USB, V3D, HDMI and VEC are powered down without timeout.
Actual behaviour
During entering of suspend state all mailbox properties timed out.
System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:
- Which model of Raspberry Pi? Raspberry Pi 1B
- Which firmware version (
vcgencmd version
)? 2023-03-17T10:52:42 - Which kernel version (
uname -a
)? 6.9.3
Logs
[ 302.092009] PM: suspend entry (s2idle)
[ 302.121449] Filesystems sync: 0.029 seconds
[ 302.184627] Freezing user space processes
[ 302.204924] Freezing user space processes completed (elapsed 0.020 seconds)
[ 302.205016] OOM killer disabled.
[ 302.205058] Freezing remaining freezable tasks
[ 302.206591] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[ 302.215584] smsc95xx 1-1.1:1.0 eth0: entering SUSPEND2 mode
[ 302.267282] PM: suspend of devices complete after 59.833 msecs
[ 302.267377] PM: start suspend of devices complete after 60.681 msecs
[ 302.269176] PM: late suspend of devices complete after 1.754 msecs
[ 303.284099] ------------[ cut here ]------------
[ 303.284155] WARNING: CPU: 0 PID: 438 at drivers/firmware/raspberrypi.c:128 rpi_firmware_property_list+0x204/0x22c
[ 303.284256] Firmware transaction 0x00028001 timeout
[ 303.284273] Modules linked in: bcm2835_v4l2(C) videobuf2_vmalloc videobuf2_memops bcm2835_mmal_vchiq(C) videobuf2_v4l2 videobuf2_common snd_bcm2835(C) raspberrypi_hwmon bcm2835_rng rng_core vchiq(C) configfs
[ 303.284438] CPU: 0 PID: 438 Comm: bash Tainted: G C 6.9.3-dirty #17
[ 303.284474] Hardware name: BCM2835
[ 303.284493] Call trace:
[ 303.284522] unwind_backtrace from show_stack+0x18/0x1c
[ 303.284600] show_stack from dump_stack_lvl+0x34/0x44
[ 303.284680] dump_stack_lvl from __warn+0x88/0xec
[ 303.284764] __warn from warn_slowpath_fmt+0x7c/0xb0
[ 303.284820] warn_slowpath_fmt from rpi_firmware_property_list+0x204/0x22c
[ 303.284886] rpi_firmware_property_list from rpi_firmware_property+0x68/0x8c
[ 303.284943] rpi_firmware_property from rpi_firmware_set_power+0x54/0xc0
[ 303.285014] rpi_firmware_set_power from _genpd_power_off+0xe4/0x148
[ 303.285082] _genpd_power_off from genpd_sync_power_off+0x7c/0x11c
[ 303.285143] genpd_sync_power_off from genpd_finish_suspend+0xcc/0xe0
[ 303.285203] genpd_finish_suspend from dpm_run_callback+0x78/0xd0
[ 303.285279] dpm_run_callback from device_suspend_noirq+0xc0/0x238
[ 303.285339] device_suspend_noirq from dpm_suspend_noirq+0xb0/0x168
[ 303.285396] dpm_suspend_noirq from suspend_devices_and_enter+0x1b8/0x5ac
[ 303.285471] suspend_devices_and_enter from pm_suspend+0x254/0x2e4
[ 303.285525] pm_suspend from state_store+0xa8/0xd4
[ 303.285576] state_store from kernfs_fop_write_iter+0x154/0x1a0
[ 303.285646] kernfs_fop_write_iter from vfs_write+0x12c/0x184
[ 303.285713] vfs_write from ksys_write+0x78/0xc0
[ 303.285765] ksys_write from ret_fast_syscall+0x0/0x54
[ 303.285816] Exception stack(0xcc93dfa8 to 0xcc93dff0)
[ 303.285857] dfa0: 00000001 b6fb6500 00000001 002d8c98 00000007 00000000
[ 303.285892] dfc0: 00000001 b6fb6500 b6f18d00 00000004 b6f16c18 b6f16780 00000000 00000000
[ 303.285920] dfe0: 0000000a befca348 b6e92530 b6e9254c
[ 303.285943] ---[ end trace 0000000000000000 ]---
[ 303.285982] rpi_firmware_set_power: Failed to set USB to 0 (-110)
[ 304.324164] rpi_firmware_set_power: Failed to set V3D to 0 (-110)
[ 305.364094] rpi_firmware_set_power: Failed to set HDMI to 0 (-110)
[ 305.364991] PM: noirq suspend of devices complete after 3095.584 msecs
[ 305.365052] PM: suspend debug: Waiting for 5 second(s).
[ 310.362303] hwmon hwmon1: Failed to get throttled (-110)
[ 311.444120] rpi_firmware_set_power: Failed to set VEC to 1 (-110)
[ 311.444823] PM: noirq resume of devices complete after 1082.729 msecs
[ 311.448333] PM: early resume of devices complete after 3.176 msecs
[ 311.761442] PM: resume of devices complete after 313.013 msecs
[ 311.763651] OOM killer enabled.
[ 311.763705] Restarting tasks ...
[ 311.809353] rpi_firmware_set_power: Set VEC to 0
[ 311.810399] smsc95xx 1-1.1:1.0 eth0: Link is Down
[ 311.811184] done.
[ 311.812924] random: crng reseeded on system resumption
[ 322.404088] vc4-drm soc:gpu: [drm] *ERROR* [CRTC:93:pixelvalve-2] flip_done timed out
[ 322.438600] PM: suspend exit
[ 353.124374] vc4-drm soc:gpu: [drm] User-defined mode not supported: "1920x1200": 60 154000 1920 1968 2000 2080 1200 1203 1209 1235 0x68 0x9
[ 363.364073] vc4-drm soc:gpu: [drm] *ERROR* flip_done timed out
[ 363.364157] vc4-drm soc:gpu: [drm] *ERROR* [CRTC:93:pixelvalve-2] commit wait timed out
[ 373.614113] vc4-drm soc:gpu: [drm] *ERROR* flip_done timed out
[ 373.614191] vc4-drm soc:gpu: [drm] *ERROR* [CONNECTOR:32:HDMI-A-1] commit wait timed out
[ 383.844240] vc4-drm soc:gpu: [drm] *ERROR* flip_done timed out
[ 383.844320] vc4-drm soc:gpu: [drm] *ERROR* [PLANE:85:plane-3] commit wait timed out
[ 394.084098] vc4-drm soc:gpu: [drm] *ERROR* flip_done timed out
[ 394.084161] vc4-drm soc:gpu: [drm] *ERROR* Timed out waiting for commit
[ 394.119429] rpi_firmware_set_power: Set VEC to 1
[ 394.119618] rpi_firmware_set_power: Set HDMI to 0
[ 404.324295] rpi_firmware_set_power: Set HDMI to 1