Skip to content

Add opt-in auto-orientation support#12

Open
ThalesC wants to merge 3 commits into
bazzite-org:gamescope-bafrom
ThalesC:auto-orientation
Open

Add opt-in auto-orientation support#12
ThalesC wants to merge 3 commits into
bazzite-org:gamescope-bafrom
ThalesC:auto-orientation

Conversation

@ThalesC

@ThalesC ThalesC commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Adds opt-in internal display auto-orientation support using iio-sensor-proxy.

This can be enabled with either:

  • --auto-orientation
  • AUTO_ORIENTATION=1

When enabled, Gamescope listens for accelerometer orientation changes, applies the matching orientation to the internal display, refreshes Xwayland output metadata, and updates the patched EDID/output mode state. It also adds Super + R as a shortcut to toggle auto-orientation at runtime.

This is opt-in only. No devices are enabled automatically by this patch.

Build

This adds an optional Meson feature, auto_orientation, backed by gio-2.0 (pkgconfig(gio-2.0)).

If the dependency is unavailable and the feature is left on auto, Gamescope builds normally without auto-orientation support.

Testing

Tested on a GPD Pocket 3 running Bazzite Game Mode.

Verified:

  • Steam UI rotates across all four orientations
  • Super + R toggles auto-orientation on/off
  • Melvor Idle rotates correctly
  • Ale & Tale Tavern rotates correctly while running a 3D scene with object physics
  • Repeated orientation changes continue working without freezing
  • Repeatedly toggling auto-orientation during gameplay continues working correctly

Known behavior from testing:

  • The first orientation change may briefly show a black screen for around 3-5 seconds
  • Later orientation changes are instantaneous

Authorship / Disclosure

This patch was developed with assistance from OpenAI Codex.

I designed the feature, guided the implementation, built and tested the branch locally, and validated it on real hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant