Skip to content

Add output geometry config: rotation, resolution, scale - #10

Merged
flowzone-app[bot] merged 1 commit into
mainfrom
feat/display-output-config
Jun 18, 2026
Merged

flowzone-app[bot] merged 1 commit into
mainfrom
feat/display-output-config

Conversation

@rahul-thakoor

Copy link
Copy Markdown
Contributor

New DISPLAY_ROTATION, DISPLAY_RESOLUTION and DISPLAY_SCALE env vars configure the Weston output via a new 04-output.ini.template fragment.

  • Auto-detect the first connected DRM connector and apply the config to it; skip the [output] section when no display is connected.
  • DISPLAY_ROTATION is clockwise degrees (0/90/180/270). Weston's transform describes panel orientation, not content, so the mapping is inverted (90 -> rotate-270, 270 -> rotate-90) to rotate content clockwise as documented.
  • DISPLAY_RESOLUTION is WIDTHxHEIGHT[@refresh]; unset uses the native mode. DISPLAY_SCALE is an integer factor.
  • Document the new vars in README; record multi-display as out of scope in docs/todo-multi-display.md.

Change-type: minor

New `DISPLAY_ROTATION`, `DISPLAY_RESOLUTION` and `DISPLAY_SCALE` env vars
configure the Weston output via a new 04-output.ini.template fragment.

- Auto-detect the first connected DRM connector and apply the config to
  it; skip the [output] section when no display is connected.
- `DISPLAY_ROTATION` is clockwise degrees (0/90/180/270). Weston's
  transform describes panel orientation, not content, so the mapping is
  inverted (90 -> rotate-270, 270 -> rotate-90) to rotate content
  clockwise as documented.
- `DISPLAY_RESOLUTION` is `WIDTHxHEIGHT[@refresh]`; unset uses the native
  mode. `DISPLAY_SCALE` is an integer factor.
- Document the new vars in README; record multi-display as out of scope
  in docs/todo-multi-display.md.

Change-type: minor
Signed-off-by: rahul-thakoor <13220877+rahul-thakoor@users.noreply.github.com>
@rahul-thakoor

Copy link
Copy Markdown
Contributor Author

Rotation (DISPLAY_ROTATION)

0 — baseline (no rotation)

image image

90 — content clockwise (top edge moves right)

image image

180 — upside down

image image

270 — content counter-clockwise (top edge moves left)

image image

Resolution (DISPLAY_RESOLUTION)

Unset — native/preferred mode

2026-06-18T15:08:50+04:00  display  [11:08:50.408] Output Virtual-1 (crtc 36) video modes:
2026-06-18T15:08:50+04:00  display                 1280x800@75.0, preferred, current, 107.3 MHz
2026-06-18T15:08:50+04:00  display                 5120x2160@50.0 64:27, 742.5 MHz
2026-06-18T15:08:50+04:00  display                 4096x2160@50.0 256:135, 594.0 MHz
2026-06-18T15:08:50+04:00  display                 3840x2160@60.0 16:9, 594.0 MHz
2026-06-18T15:08:50+04:00  display                 3840x2160@59.9 16:9, 593.4 MHz
2026-06-18T15:08:50+04:00  display                 3840x2160@50.0 16:9, 594.0 MHz
2026-06-18T15:08:50+04:00  display                 1920x1440@60.0, 234.0 MHz
2026-06-18T15:08:50+04:00  display                 2560x1080@50.0 64:27, 185.6 MHz
2026-06-18T15:08:50+04:00  display                 1856x1392@60.0, 218.2 MHz
2026-06-18T15:08:50+04:00  display                 1792x1344@60.0, 204.8 MHz
2026-06-18T15:08:50+04:00  display                 2048x1152@60.0, 162.0 MHz
2026-06-18T15:08:50+04:00  display                 1920x1200@59.9, 193.2 MHz
2026-06-18T15:08:50+04:00  display                 1920x1080@60.0, 148.5 MHz
2026-06-18T15:08:50+04:00  display                 1920x1080@50.0 16:9, 148.5 MHz
2026-06-18T15:08:50+04:00  display                 1600x1200@60.0, 162.0 MHz
2026-06-18T15:08:50+04:00  display                 1680x1050@60.0, 146.2 MHz
2026-06-18T15:08:50+04:00  display                 1400x1050@60.0, 121.8 MHz
2026-06-18T15:08:50+04:00  display                 1280x1024@60.0, 108.0 MHz
2026-06-18T15:08:50+04:00  display                 1440x900@59.9, 106.5 MHz
2026-06-18T15:08:50+04:00  display                 1280x960@60.0, 108.0 MHz
2026-06-18T15:08:50+04:00  display                 1360x768@60.0, 85.5 MHz

Fixed mode (e.g. 1920x1080)

image image
2026-06-18T15:13:18+04:00  display  [11:13:18.263] Output Virtual-1 (crtc 36) video modes:
2026-06-18T15:13:18+04:00  display                 1280x800@75.0, preferred, 107.3 MHz

With refresh rate (e.g. 640x480@60)

image
2026-06-18T15:16:36+04:00  display                 640x480@60.0 4:3, 25.2 MHz
2026-06-18T15:16:36+04:00  display                 640x480@59.9, current, 25.2 MHz

Scale (DISPLAY_SCALE)

Scale = 2

image image

Invalid input handling

(e.g. DISPLAY_ROTATION=45 — warns and falls back to 0)
image

Jun 18 11:20:53 43e8941 40c16756234e[1638]: [WARN] Invalid DISPLAY_ROTATION='45' (expected 0/90/180/270); using 0

@samuel-duffield1 samuel-duffield1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@flowzone-app
flowzone-app Bot merged commit ed16557 into main Jun 18, 2026
49 checks passed
@flowzone-app
flowzone-app Bot deleted the feat/display-output-config branch June 18, 2026 11:25
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.

2 participants