So the HP
Envy 2 in 1 I have which runs Endeavour OS is one of those Ryzen machines that uses the Sensor Fusion Hub [1022:15e4] to rotate. This sensor fusion hub has been around since the first mobile Ryzen gen and is still used in the Ryzen 5000 mobile machines, mostly convertibles. But it don't rotate.
Setting KDE's tablet mode does nothing, iio-sensor-proxy is installed but will not return anything, monitor-sensor --accel just waits infinitely. Force starting iio with systemctl and checking it shows No sensors or missing kernel drivers for the sensors. Exiting and deactivates. Modprobing pcie_mp2_amd gives FATAL: Module pcie_mp2_amd not found in directory /lib/modules/7.1.8-arch1-3 which is cool. You can also modprobe amd_sfh to no avail.
I found this totally useless archbbs thread full of dead links, and funny enough I was dual booting Windows 10 on this machine, but no amount of rebooting nor disabling Fast Boot in Windows nor entirely reinstalling EndeavourOS fixes this. A live image of Cachy OS behaves the same.
If you know anything about amd_sfh or pcie_mp2_amd I am begging you, just let me rotate my screen automatically. Or y'know, if you wanna write a patch to make it work, together. Totally.
Bugzilla thread about this gamer hardware issue
EDIT: after a bit of research I see that the Linux kernel has been fighting for its life against AMD's shitass SFH driver... For over six years...