Bug 489077 - When 2 monitors are present, with monitor 1 at 100% scaling, and monitor 2 at 125% scaling; (1) Xwayland applications on monitor 1 are blurry; (2) xwayland games recognize monitor 1 as being higher resolution than it actually is, and appear blurry.
Summary: When 2 monitors are present, with monitor 1 at 100% scaling, and monitor 2 at...
Status: RESOLVED DUPLICATE of bug 474738
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 6.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-23 23:30 UTC by Flaan
Modified: 2024-06-25 22:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Flaan 2024-06-23 23:30:50 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
I have a laptop with a Nvidia GTX 1650 and UHD 630 intagrated graphics. The laptop has a 1080x1920 display, and is plugged into a 1080x2560 display. Since the laptop display is much smaller, it is be at 125% scaling. The external 1080x2560 display is at 100% scaling. The HDMI port on the laptop is routed to the GTX 1650.

Xwayland Applications on the external display (100% scaling) appear to be blurry, and some appear to be downscaled. Furthermore, running a game (Genshin Impact, running through proton experimental (as of june 23rd, 2024)) on the external monitor results in the game being blurry (in game resolution being set to 1080x2560). going into the game's settings, the highest resolution option is 1350x3200. Setting this option fixes the blurriness, but results in the game running poorly (GTX 1650 is not powerful enough to run the game at this resolution). Re-setting the game resolution to 1080x2560 results in the game running in a smaller window.

This issue does not exist if both displays are at the same scaling.
This issue does not exist if the laptop display is deactivated. 
This issue does not exist for native wayland applications.

I have tested this a while ago, on plasma 5 (I am unsure to what version, but i believe it was 5.27.XX), and the issue was still present then.

I do not have another laptop with a non-nvidia gpu to test to see if this is a nvidia problem.

STEPS TO REPRODUCE
1. Use laptop (with Nvidia GPU, maybe)
2. Using KDE system settings, set display scale of laptop display to 125%
3. plug in external monitor, ensuring that it is at 100% scaling
4. observe that Xwayland apps running on the external monitor with 100% scaling are blurry, and some are downscaled.
5. run XWayland game, observe that it is blurry unless it's resolution is set to one that is higher than the monitor's resolution

OBSERVED RESULT
Xwayland Windows are blurry, game is blurry and recognizes the external 1080x2560 monitor with 100% scaling as being higher resolution (1350x3200) that it actually is, requiring to be set to that (1350x3200) resolution to not be blurry. setting the game resolution to what the monitor's true resolution (1080x2560) is results in the game being blurry (if fullscreen), or the game running in a window smaller than the display.

EXPECTED RESULT
for X11 applications/windows to not be blurry/downscaled, and for the game to recognize the 1080x2560 monitor as being 1080x2560, not 1350x3200. Setting the game to 1080x2560 fullscreen should result in no blur, and setting the game to a window of said size should result in the window being clear, and the same size as the display, not smaller.

SOFTWARE/OS VERSIONS
KDE Plasma: Plasma 6.1.0 (wayland)
Distro: Arch Linux
Kernel: 6.9.5-arch1-1
(available in About System)
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
NVIDIA Driver Version: Proprietary, 550.90.07

ADDITIONAL INFORMATION

CPU: i5 9300H
GPU0: Intel UHD 630
GPU1: Nvidia GeForce GTX 1650

Display 1: 1080x1920 (GPU0)
Display 2: 1080x2560 (GPU1)

I believe that the issue is that X11 applications running through XWayland detect the external display at 100% scaling to be at a resolution that is 1.25x what it actually is, resulting in them being downscaled/blurry. They detect the 1080x2560 monitor to be a 1350x3200 monitor.

Tested Applications: (all from either arch repository or AUR)

Firefox: Unaffected
Konsole: Unaffected
Dolphin: Unaffected (exception: Certain icons change to different icons)
KDE System Settings: Unaffected

Spotify: Blurry, correct scale
Discord: Blurry, correct scale
Vesktop: Blurry, correct scale

Chrome: Downscaled
Steam: Downscaled
Genshin Impact: Downscaled
Comment 1 Vlad Zahorodnii 2024-06-24 07:54:12 UTC
THe xwayland scale factor is global on wayland at the moment.
Comment 2 Nate Graham 2024-06-25 22:57:00 UTC

*** This bug has been marked as a duplicate of bug 474738 ***