Screen rotation not working

Screen rotation not working on HP ProBook 360 11 G5 EE, nor there’s an option in shell for screen rotation.

I tried screen rotate extension, but it only works if I manually invoke rotation. Also, screen flip event is not registered so no OSK when laptop is in tablet mode.

I’ve installed iio-sensor-proxy-git and this is the output of monitor-sensor:

Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: undefined)
=== No ambient light sensor
=== No proximity sensor
sudo systemctl status iio-sensor-proxy.service
● iio-sensor-proxy.service - IIO Sensor Proxy service
     Loaded: loaded (/usr/lib/systemd/system/iio-sensor-proxy.service; static)
     Active: active (running) since Wed 2024-05-01 02:12:53 CEST; 7h ago
   Main PID: 22314 (iio-sensor-prox)
      Tasks: 4 (limit: 4460)
     Memory: 1.5M (peak: 2.5M swap: 540.0K swap peak: 540.0K zswap: 109.3K)
        CPU: 1.066s
     CGroup: /system.slice/iio-sensor-proxy.service
             └─22314 /usr/lib/iio-sensor-proxy

maj 01 02:12:53 hp-probook systemd[1]: Starting IIO Sensor Proxy service...
maj 01 02:12:53 hp-probook systemd[1]: Started IIO Sensor Proxy service.
maj 01 02:12:53 hp-probook iio-sensor-prox[22314]: Not a switch [/sys/devices/pci0000:00/0000:00:11.0/{33AECD58-B679-4E54-9BD9-A04D34F0C226}/001F:8087:0AC2.0003/HID-SEN>
maj 01 02:12:53 hp-probook iio-sensor-prox[22314]: Invalid bitmask entry for /sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3/event3
lines 1-14/14 (END)

Also, if I stop the service and run:

/usr/lib/iio-sensor-proxy -v -r
** (iio-sensor-proxy:28636): DEBUG: 10:14:25.801: Starting iio-sensor-proxy version 3.5
(iio-sensor-proxy:28636): GLib-GIO-DEBUG: 10:14:25.802: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
** (iio-sensor-proxy:28636): DEBUG: 10:14:25.804: iio-sensor-proxy is already running, or it cannot own its D-Bus name. Verify installation.