ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 175 forks source link

Steam client became blurry after enable Fractional Scaling in GNOME #10050

Open NTMan opened 1 year ago

NTMan commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

Yesterday after update mutter in the GNOME was enabled fractional scaling by default.

https://src.fedoraproject.org/rpms/mutter/c/ee7db6d53bac8bd704f033968e577c5febc0c1d7?branch=rawhide

https://pagure.io/fedora-workstation/issue/357#comment-848857

# dnf upgrade 
Last metadata expiration check: 0:20:34 ago on Thu 07 Sep 2023 01:41:55 AM +05.
Dependencies resolved.
================================================================================
 Package             Architecture Version                   Repository     Size
================================================================================
Upgrading:
 mutter              x86_64       45~beta.1-5.fc40          rawhide       2.4 M
 mutter-common       noarch       45~beta.1-5.fc40          rawhide        20 k

Transaction Summary
================================================================================
Upgrade  2 Packages

Total download size: 2.5 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): mutter-common-45~beta.1-5.fc40.noarch.rp  66 kB/s |  20 kB     00:00    
(2/2): mutter-45~beta.1-5.fc40.x86_64.rpm       3.4 MB/s | 2.4 MB     00:00    
--------------------------------------------------------------------------------
Total                                           1.9 MB/s | 2.5 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Upgrading        : mutter-common-45~beta.1-5.fc40.noarch                  1/4 
  Upgrading        : mutter-45~beta.1-5.fc40.x86_64                         2/4 
  Cleanup          : mutter-45~beta.1-2.fc40.x86_64                         3/4 
  Cleanup          : mutter-common-45~beta.1-2.fc40.noarch                  4/4 
  Running scriptlet: mutter-common-45~beta.1-2.fc40.noarch                  4/4 
  Verifying        : mutter-45~beta.1-5.fc40.x86_64                         1/4 
  Verifying        : mutter-45~beta.1-2.fc40.x86_64                         2/4 
  Verifying        : mutter-common-45~beta.1-5.fc40.noarch                  3/4 
  Verifying        : mutter-common-45~beta.1-2.fc40.noarch                  4/4 

Upgraded:
  mutter-45~beta.1-5.fc40.x86_64      mutter-common-45~beta.1-5.fc40.noarch     

Complete!

After this all applications based on Google Chrome WebView become looked blurry.

mutter-45~beta.1-2.fc40.x86_64 mutter-45~beta.1-5.fc40.x86_64
Screenshot from 2023-09-07 11-02-35 Screenshot from 2023-09-07 11-08-13

But in the Google Chrome I can workaround this issue by the setting flag Preferred Ozone platform to Wayland.

Preferred Ozone platform is Default Preferred Ozone platform is Wayland
Screenshot from 2023-09-07 11-22-41 Screenshot from 2023-09-07 11-42-50

Maybe it's time to make this change in steam client?

lostgoat commented 1 year ago

The steam client's CEF windows don't support Ozone at the moment. We also composite these windows into a single SDL surface using the X11 composite extensions, so this change isn't really possible on the steam side.

I'm not really sure what changed on the mutter side. But it seems like it is causing problems for X11 based applications and it should be addressed there.

theoludwig commented 3 weeks ago

Any workaroud? Solution to this problem?

kparal commented 3 weeks ago

GNOME 47 includes a new experimental option in mutter, which changes the behavior of X11 apps scaling. From https://release.gnome.org/47/ :

GNOME 47 includes an enhanced fractional display scaling feature, which provides better support for legacy X11 apps. This feature is still considered experimental and should only be used for testing. To enable it, you can run the following from the command line: gsettings set org.gnome.mutter experimental-features '["scale-monitor-framebuffer", "xwayland-native-scaling"]'

This is enabled by default in Fedora 41 (just freshly released), so no need to enable it manually. Steam is no longer blurry with this change, but it is often sized incorrectly, mostly too small. So far, all other X11 apps seem to behave quite well out of the box (including Chrome, etc), I only saw this problem with Steam. This common issue description documents some workarounds for this problem: https://discussion.fedoraproject.org/t/fractional-display-scaling-in-workstation-makes-some-apps-incorrectly-sized-impacts-games/90393

theoludwig commented 3 weeks ago

@kparal Thank you for pointing this out!

I've tried gsettings set org.gnome.mutter experimental-features '["scale-monitor-framebuffer", "xwayland-native-scaling"]', and it works, as Steam and VLC media player apps are not blurry anymore, however, I can't click on the app anymore. Seems like the mouse cursor is not synchronized or something. Also, I can't move the window/drag the window.

I read discussions on this MR: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3567, they are talking about a "clickthrough" issue, that seems to be fixed? However it doesn't seems like the case?

EDIT: I've restarted my computer, and it seems to already work better. Will test that out, more, for the moment it is very promising to resolve the issue. :+1: