Skip to content

(release/25.0) Xephyr: fix setting physical output size - #3599

Open
metux wants to merge 1 commit into
release/25.0from
pr/release/25.0-xephyr-fix-setting-physical-output-size-_2026-08-20_16-22-24
Open

(release/25.0) Xephyr: fix setting physical output size#3599
metux wants to merge 1 commit into
release/25.0from
pr/release/25.0-xephyr-fix-setting-physical-output-size-_2026-08-20_16-22-24

Conversation

@metux

@metux metux commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Providing physical size via RRRegisterSize() is not enough - physical
size is a property of the output, not resolution and needs to be set
separately. Furhermore, get the physical output size using RandR if
-output is used, to match specific output, not the whole screen.

With this, Xephyr -output OUTPUT_NAME properly copies not only
resolution but also physical size of the named output.

Signed-off-by: Marek Marczykowski-Górecki marmarek@invisiblethingslab.com
Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2240

Providing physical size via RRRegisterSize() is not enough - physical
size is a property of the output, not resolution and needs to be set
separately. Furhermore, get the physical output size using RandR if
-output is used, to match specific output, not the whole screen.

With this, `Xephyr -output OUTPUT_NAME` properly copies not only
resolution but also physical size of the named output.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2240>
@metux metux self-assigned this Aug 20, 2026
@metux
metux requested a review from a team August 20, 2026 14:24
metux pushed a commit that referenced this pull request Aug 20, 2026
Providing physical size via RRRegisterSize() is not enough - physical
size is a property of the output, not resolution and needs to be set
separately. Furhermore, get the physical output size using RandR if
-output is used, to match specific output, not the whole screen.

With this, `Xephyr -output OUTPUT_NAME` properly copies not only
resolution but also physical size of the named output.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2240>
PR: #3599
@metux

metux commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated review — generated by Starfleet ship Voyager on behalf of @metux. Not a human review.

Clean, well-scoped fix for Xephyr's -output option not propagating physical size.

The problem: RRRegisterSize() sets resolution but not physical size — physical size is a per-output property. When using -output OUTPUT_NAME, Xephyr copied the resolution but left the output's mm dimensions at defaults.

The fix:

  1. Extends hostx_get_output_geometry() to return mm_width/mm_height from the RandR output info (single call site, consistent signature change).
  2. Stores the physical size in new win_width_mm/win_height_mm fields on ephyrScrPriv.
  3. In ephyrRandRGetInfo(), calls RROutputSetPhysicalSize() on the first output when in fullscreen mode — this is what actually makes the physical size visible to clients via RandR.
  4. In fullscreen mode without -output, initializes from the host screen's millimeter dimensions. With -output, populated from the named output's RandR info.

ABI: Xephyr-only code (hw/kdrive/ephyr/). hostx_get_output_geometry and ephyrRandRGetInfo are not exported, not referenced by any NVIDIA blob. ABI-safe.

Looks good.

@metux metux added the bot-review-passed Automated bot review found no blocking issues label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-passed Automated bot review found no blocking issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants