I know how to rotate the screen in Xorg using xrandr or in Wayland using the gnome-control-center GUI, but is there a way to do it in Wayland using a command line interface or an API call ?

Context: I have a convertible laptop which is not supported by iio-sensor-proxy, and I would like to use a script or shortcut to quickly rotate the screen. Going back to Xorg is not an option.


A partial solution is to set the rotate-monitor key to some keybinding using gsettings or dconf-editor.

For instance, the following command will cause Ctrl+F8 to rotate the screen counterclockwise:

$ gsettings set org.gnome.mutter.keybindings rotate-monitor "['XF86RotateWindows', '<Control>F8']"

This does not allow the user to specify the target orientation, but only to rotate the screen until the desired orientation is reached.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.