Created attachment 305368 [details] sensors missing from udevadm info --export-db after b300667b33b2b5a2c8e5f8f22826befb3d7f4f2b +++ This bug was initially created as a clone of Bug #212615 +++ I have a HP ProBook x360 435 G7 (Ryzen 4700U). On GNOME Wayland with the Screen Autorotate extension (https://extensions.gnome.org/extension/4191/screen-autorotate/), I confirmed by bisection that b300667b33b2b5a2c8e5f8f22826befb3d7f4f2b caused autorotation to stop working. More specifically, before this commit (on aa0b724a2bf041036e56cbb3b4b3afde7c5e7c9e): * `sudo iio-sensor-proxy -v -r` stays running (doesn't exit immediately) and prints nothing * `monitor-sensor` starts up by saying "=== Has accelerometer (orientation: normal)" and prints " Accelerometer orientation changed: bottom-up" when I physically rotate the screen. * `udevadm info --export-db` contains the accelerometer/gyroscope sensor info I've pasted in the attachment. After b300667b33b2b5a2c8e5f8f22826befb3d7f4f2b: * `sudo iio-sensor-proxy -v -r` exits immediately. * `monitor-sensor` prints " Waiting for iio-sensor-proxy to appear" on startup and does nothing when I rotate the screen. * The sensors in the attachment are no longer listed in `udevadm info --export-db`. * The `hid_sensor_gyro_3d` and `hid_sensor_accel_3d` kernel modules are no longer loaded automatically, and loading them does nothing. Reverting b300667b33b2b5a2c8e5f8f22826befb3d7f4f2b on top of 6.6 also makes screen autorotation work again. Whenever screen autorotation works, `iio_generic_buffer --device-num 2 -A -c 100` reports good accelerometer values. (The following is essentially the contents of bug #212625 comment #46) > If you revert that commit on top of 6.6 does it start working? Also; can > you still get into the deepest s2idle sleep state in 6.6 with it reverted? > You can check with /sys/power/suspend_stats/last_hw_sleep. I don't have a /sys/power/suspend_stats/last_hw_sleep file (tested on stock 6.6, as well as on 6.6 + revert of b300667b33b2b5a2c8e5f8f22826befb3d7f4f2b), but if I leave my computer idle for a while it enters standby and I see Nov 03 08:47:29 hp kernel: PM: suspend entry (deep) in journalctl, and the computer enters deep sleep (need to press power button to wake it up). Also, the content of /sys/power/mem_sleep is "s2idle [deep]". In bug ug #212615 I also attached the report produced by amd_s2idle.py run on stock 6.6 in case it is relevant (I can also attach it for 6.6 + revert if desired).
Hi @Mauricio Collares, Can you please share the dmesg log for both the scenarios mentioned in the description?
Created attachment 305510 [details] dmesg output (stock 6.6.2, accelerometer does not work)
Created attachment 305511 [details] dmesg output (6.6.2 with b300667b reverted, accelerometer works)
Hi @Mauricio Collares, Could you please try to reproduce issue with below patch and let me know if the issue is still present? https://github.com/torvalds/linux/commit/c1db0073212ef39d5a46c2aea5e49bf884375ce4 This patch is already merged in mainline kernel.
I just tested the new mainline kernel and the accelerometer is working perfectly. Thank you very much!