Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan driver can't do fractional scaling in Wayland mode and there is no X11 env var override #17485

Open
Reonu opened this issue Jan 29, 2025 · 2 comments

Comments

@Reonu
Copy link

Reonu commented Jan 29, 2025

I'll be brief as to not waste your time:

  • The Vulkan video driver does not have support for fractional DPI scaling in native Wayland mode. Therefore, the image looks blurry and the window size is wrong (scaled up)
  • This does not happen if Retroarch runs in xWayland mode, where the window size is correct and the game is not blurry (at least under KDE Plasma)
  • However, it is impossible to run Retroarch with the Vulkan driver in xWayland mode because currently it just unconditionally uses Wayland on Wayland sessions with no possibility of override. You can force the sdl2 driver to run in xWayland with SDL_VIDEODRIVER=x11 but there's no such thing for the Vulkan driver.

So my request is, of course, that fractional scaling is implemented eventually. But regardless of that there should really be an env var to force the Vulkan driver to operate in X11 mode. Sometimes xWayland is a superior experience to native Wayland and right now Retroarch is such a case.

Thanks.

@zoltanvb
Copy link
Contributor

The Vulkan video driver does not have support for fractional DPI scaling in native Wayland mode.

Does it depend on the Vulkan video driver? I may be overlooking details, but respective support was added a while ago, and it included the Wayland+Vulkan context driver as well:
#15965
Compositors still need to support it, and the request would make sense anyway, so this is just a question.

@Reonu
Copy link
Author

Reonu commented Jan 30, 2025

The Vulkan video driver does not have support for fractional DPI scaling in native Wayland mode.

Does it depend on the Vulkan video driver? I may be overlooking details, but respective support was added a while ago, and it included the Wayland+Vulkan context driver as well: #15965 Compositors still need to support it, and the request would make sense anyway, so this is just a question.

Actually, you're right in that it doesn't depend on the video driver. I didn't realize that the SDL2 driver defaults to X11.

If I force the SDL2 driver to launch in Wayland mode (SDL_VIDEODRIVER=wayland) then it also looks blurry and the window is the wrong size, just like with the Vulkan driver, so fractional scaling isn't working either.

This makes me realize the situation is extra weird actually, because right now on a Wayland session, the SDL2 driver will default to X11 but the Vulkan driver will default to Wayland. And you can force the SDL2 driver to Wayland, but you can't force the Vulkan driver to X11. 😅

My system is running EndeavourOS (you can just consider it to be Arch) with KDE Plasma/KWin 6.2.5. My monitor is 1440p 144 Hz (only one monitor connected rn) and the DPI scaling is set to 125% in the KDE settings. Firefox is native Wayland and DPI scaling is working there, so it's not a system-level issue at least.

I hope you can figure out whatever is causing the DPI scaling to not work but even if you do fix it I think the env var override should still exist!

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

No branches or pull requests

2 participants