StarLabsLtd / firmware

78 stars 5 forks source link

[StarLite Mk V] How to enable auto rotation in tablet mode (NixOS) #178

Closed PhilT closed 5 months ago

PhilT commented 5 months ago

I know NixOS is not officially supported but I'm having trouble finding info on what drivers, patches, software or whatnot I'd need to enable the correct orientation in tablet mode. I'm using Wayland (Hyprland).

I've tried enabling things like opentabletdriver, gnomeExtensions.screen-rotate & iio-sensor-proxy but honestly I'm just stabbing in the dark.

Any pointers would be greatly appreciated.

PhilT commented 5 months ago

I can manually rotate with:

hyprctl keyword monitor eDP-1,preferred,auto,1.5,transform,1

So just need to figure out how to read the accelerometer.

PhilT commented 5 months ago

monitor-sensor is correctly detecting when I rotate the device. Getting there...

PhilT commented 5 months ago

I think https://github.com/JeanSchoeller/iio-hyprland might be the answer. I'll verify and then close this if it works.

PhilT commented 5 months ago

The above repo added to NixOS as a derivation worked for me. I had to add the config line as recommended in the iio-hyprland README for it to work:

monitor=eDP-1,preferred,auto,2,transform,0