protonscr

Fullscreen doesn't take into consideration xrandr scaling

protonopen
ValveSoftware/Proton#3060 · opened 2019-09-15 by Rhiyo · updated 2019-09-18 · 5 comments · github
RRhiyo 2019-09-15 github

Hello, I'm using the linear scaling feature of xrandr to fit 1920x1080 linearly to my 4k screen. However, on some games, (specifically Underrail and Pillars of Eternity II in this case), this scaling is ignored when the game is at fullscreen and the game will still still scale from 1920x1080 to 4k on its own, causing only the top left quarter of the game to be visible (and not use linear scaling.)

I've tested this with 4.11-4 and 4.2-9 with the same issue.

Investigating other options that have a "Borderless Fullscreen" and separate "Fullscreen" mode, it seems to be a problem with Fullscreen as Borderless Fullscreen fits to the window fine.

Aaeikum 2019-09-16 github

This isn't a feature of xrandr that I've used before. How do you use it? Can you point me towards some documentation for how to enable this feature?

RRhiyo 2019-09-17 github

It's only available in newer versions I think, in Ubuntu I had to build a newer version to get the feature, however in Manjaro it works right away.

xrandr --output DisplayPort-0 --scale 0.5x0.5 --filter nearest
The above will scale the screen size while using the nearest method (replace DisplayPort-0 with your own display, obviously), which is much more clearer when fractional scaling isn't needed.

Unfortunately, I can not find documentation on it though.

Aaeikum 2019-09-17 github

Understood, thanks for the pointers. I'll take a look at supporting this.

RRhiyo 2019-09-18 github

Thank you. I don't understand the underworkings of either proton or xrandr, so I'm not sure if this is problem that can be solved within proton itself, however.

Aaeikum 2019-09-18 github

Basically we need to call XRRGetCrtcTransform and apply that transformation to the modes we query from xrandr before passing them to X11DRV_Settings_AddOneMode. We already do the same kind of thing with the rotation property. It's not clear to me whether the transformation and rotation fields are independent of each other (do we apply both? only one?).

If this sounds interesting to you, please feel free to work on it.

Nothing extracted yet.