Uneven scaling at native resolution on Wayland backend
Is there an existing issue for this?
- [X] I have searched the existing issues
Are you using any gamescope patches or a forked version of gamescope?
- [X] The issue occurs on upstream gamescope without any modifications
Current Behavior
When running an app at native resolution, a small gap around the middle of the screen resembling a scaling artifact can be noticed. This issue appears consistently with any combination of game, compositor, nested resolution and scaling settings on both the latest release available and latest commit. It does not appear with the SDL backend.
Steps To Reproduce
No response
Hardware information
- Distro: NixOS 24.11.20241029.30c9efe
- CPU: Intel Core i7-4790
- GPU: AMD Radeon Pro W5500
- Driver Version: Mesa 24.3.0-devel
Software information
- Desktop environment: Hyprland
- Session type: wayland
- Gamescope version: `gamescope version 3.15.13 (gcc 13.3.0)`
- Gamescope launch command(s): `gamescope -f -w 1920 -h 1080 -W 1920 -H 1080 --mangoapp`
Which gamescope backends have the issue you are reporting?
- [x] Wayland (default for nested gamescope)
- [ ] DRM (default for embedded gamescope, i.e. gamescope-session)
- [ ] SDL
- [ ] OpenVR
Logging, screenshots, or anything else
This is what it looks like on a Wayland compositor that uses nearest neighbor scaling for windows (Sway). Take a close look at the cursor image and the letter "g" in "Load game".
Things are blurry on compositors that use filtering for scaled windows such as Hyprland. This is best seen with things like Mangohud, notice how the text in the middle part looks smudged compared to the top.
This is more obvious on certain 3D objects - FXAA is turned on in the game, yet there is noticeable aliasing along the roof of this building.
Is your desktop scaled? Are you able to check whether https://github.com/ValveSoftware/gamescope/pull/1630 fixes your issue? (or makes it worse)
None of my displays are scaled and the issue persists with #1630.
Could this be related to the following issues/PRs? https://github.com/ValveSoftware/gamescope/pull/1494 and https://github.com/ValveSoftware/gamescope/issues/1493
I've noticed blurriness and smudging as well, although I'm running on native resolutions and although I'm building via Nix on GCC. Testing out a build without -ffast-math seems to resolve this.
I just set up a simple package override in my NixOS configuration that adds -fno-fast-math and it appears to have fixed this issue.
If any other Nix users are looking for a quick workaround:
programs.gamescope = {
enable = true;
package = pkgs.gamescope.overrideAttrs (_: {
NIX_CFLAGS_COMPILE = ["-fno-fast-math"];
});
};
It's safe to say that #1494 will close this.
Replying to https://github.com/ValveSoftware/gamescope/issues/1622#issuecomment-2508182530
thank you, your nixpkgs override also solved the problem for me. Games are crispy again!!
reply to https://github.com/ValveSoftware/gamescope/issues/1622#issuecomment-2508182530
I can confirm that this solves the issue of the image being blurry when used in tandem with hyprland nested mode.
Can also confirm that this nix expression fixes it! thank you so much!