-
Notifications
You must be signed in to change notification settings - Fork 314
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
WSLg does not seem to support fractional scaling #23
Comments
@EndPositive, this is currently disabled by default, it can be enabled by WESTON_RDP_DISABLE_FRACTIONAL_HI_DPI_SCALING=false. This is disabled due to scaling quality in RDP client software. |
I am also having this issue on my surface go 2 at 150% scale. I attempted to use WESTON_RDP_DISABLE_FRACTIONAL_HI_DPI_SCALING=false under [wsl2] in my WSL config file and it did not work. I did restart wsl. |
Sorry, I should have put more clearly, please create a file named .wslgconfig at c:\ProgramData\Microsoft\WSL (or /mnt/c/ProgramData/Microsoft/WSL/.wslgconfig from Linux) with contents of below, and restart WSL with wsl --shutdown or wsl --terminate [distro name]. [system-distro-env] |
Is there already a plan when fractional scaling is supported? Almost all new monitors are 4K or more and some text scaling in Windows is very common. |
It seems that if I am at 150% then the Linux app automatically goes to 100%, I want the opposite. Is there any way workaround to have a 150% and obtain a 200% result on the Linux apps? |
@adelicato, currently that's not possible, unless building custom version of system-distro. If you are interested in, you can modify below line of code, which currently drops fractional part by casting to int, but it can be changed to round it up. Thanks! https://github.com/microsoft/weston-mirror/blob/working/libweston/backend-rdp/rdpdisp.c#L85 |
Any hope that Windows scaling 150% -> wsl 200% will be implemented any time? with option, for example... because WESTON_RDP_DISABLE_FRACTIONAL_HI_DPI_SCALING=false gives very blurry fonts |
I have the same issue. |
same here. |
Any updates? This is still going from the start of WSLG, and no one ever thinks about fixing this problem at all? Having good quality for graphical desktop inside WSL should be mandatory when you are releasing a product like that, not optional. |
It still can depends on Linux side, because Linux since years doesn't support Mixed DPI or has great DPI support in general, and I am not sure if Microsoft can do anything about that anyway. But I still have an hope. |
Hi folks, we've made an update in the latest version of WSLg that is available with WSL in the Microsoft Store to change the behaviour where 150% Windows scaling will now go up to 200% WSLg scaling. Please try it out and give us any feedback that you have! |
@craiglowewn-msft: Is there anyway to make 150% Windows scaling = 150 WSLg scaling? 200% makes gnome programs (e.g., gedit) and the mouse cursor huge! As noted above, WESTON_RDP_DISABLE_FRACTIONAL_HI_DPI_SCALING=false makes the windows and cursor the proper size, but gives very blurry fonts. |
It looks like fractional scaling doesn't actually work. I found that setting WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=150 either does nothing, or gets rounded to 200%. WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=100 gives me the 100% scaling that I expect (without the blurry fonts the WESTON_RDP_DISABLE_FRACTIONAL_HI_DPI_SCALING options does). Of course I would rather have 150% scaling, but I'll take 100% over 200% any day. PR #53 should be reverted since it doesn't fix the real problem, and makes things arguable worse. |
All due respect @sandain I believe we are trying to solve the opposite problem. The default experience used to be 150% => 100%, which makes thing too hard to read, so in the latest build they are trying to switch the default to 150% => 200%. Now you are complaining that it's too big haha. I guess we will simply need to wait until non-blurry fractional become a thing. |
Also @EndPositive I saw that you both thumbed up and thumbed down on Craig's post above? lol |
@Laess3r, thanks for being patient on this issue, I think HI-DPI is a bit more complicated in Linux GUI space since its solution is largely dependent on each application framework, such as GTK and Qt, rather than window manager or UI compositor. Thus,, legacy framework such as Xt/Motif has no support for that, and often those applications won't be scaled at all on most of native Linux desktop, while WSLg does the best effort to scale them (but with limitation of scaling quality). For fractional scaling, even Ubuntu Desktop 20.04 LTS does not enable fractional scaling by default. Also, for newer Wayland, its output scaling protocol is still integer base. We will need more time to evaluate the solution, thanks! |
@hideyukn88 The new wp-fractional-scale-v1 is states that it provides the following: "This protocols allows for communicating preferred fractional scales to surfaces, which in combination with wp_viewport can be used to render surfaces at fractional scales when applicable." Since it probably solves the issue you noted with the integer only output scaling protocol, is that a way forward for supporting rendering with fractional scaling also in WSLg? |
@nkrepo, thanks for pointing out that, and I'm aware of that and it's still in "staging". Currently we only consume "stable" protocols, thanks! |
I would recommend implementing "unstable" and "staging" protocol. That only means that new major versions may be added, nothing more. Breaking changes are still forbidden for a given major version. |
Hi! As far as I can see, wp-fractional-scale-v1 support is already released in KDE 5.27 LTS https://invent.kde.org/plasma/kwin/-/merge_requests/2598 https://kde.org/announcements/changelogs/plasma/5/5.26.5-5.27.0/. I've tested KDE 5.27 in ubuntu 22.10 using backports and in fedora 37 and the scaling works perfectly. Is there any chance we can get that support in WSLg soon? I understand that de facto standard protocols may remain in staging for years. |
hi all,
|
i has find the reason for this strange behavior, for .wslgconfig, you need to add ";" at beginning of black line, otherwise configuration line after black line doesn't take effect. Here comes my latest .wslconfig and /mnt/wslg/weston.log
|
@hideyukn88 And since it was merged into wayland's main 5 months already, I think WSLg should support it as soon as possible. |
It seems that this issue has been solved officially now. The fractional scaling is now supported by setting |
This setting is only valid for X11, not valid for Wayland application. |
Also wouldn't help with multiple monitors with different scaling settings |
@hideyukn88 is there any progress towards fractional-scale-v1 support ? |
I did two .wslgconfig file location and it doesn't apply at all, but this solution only works. What should I do? |
|
None of the various suggested configurations work for me in either location (C:\ProgramData\Microsoft\WSL\.wslconfig or C:\Users\user\.wslconfig). |
@chrisandrew-dev, as I can understand WSLGd launches Weston as Wayland compositor, until Weston gets support for wp_fractional_scale_manager_v1 and the subsequent support in backend_rdp component of WSLGd, there will be no real solution for fractional scaling under wslg. |
@nkrepo, Nevermind fractional, I'd be happy with any scaling. All apps look extremely unpleasant and pixelated. |
@chrisandrew-dev that's not the scope of this issue. |
This is working for me on Windows 10, Ubuntu 20, WSL2, without adding any .wslgconfig file. I added the export to my .bashrc file so that is set every time I open terminal. |
does it work with jetbrains idea? |
It partially works. OK scale=1.5 win11
|
Completely unrelated, but for Intellij products I recommend the "Zoom IDE" functionality which works fine for me. |
With this docs from Microsoft, I set both to true and its scale seems fine. The font is still blurry.
|
Does the issue can be tweaked via Xming or VcXsrv ? (For each of them need to request admin support(company policy) so need to know in a good way that it will work) @hung-qt Does it work for multiple monitors with different scaling settings? |
I don't test it yet. I have only 2.8K screen laptop with the scale in Windows is 175%. |
There is a hidden undocumented roundup setting # C:\ProgramData\Microsoft\WSL\.wslgconfig
[system-distro-env]
WESTON_RDP_HI_DPI_SCALING=true
WESTON_RDP_FRACTIONAL_HI_DPI_SCALING_ROUNDUP=true The setting is implemented in microsoft/weston-mirror : compositor/main.c#L2858-L2864 A simple comparison with the roundup option looks way better than the documented one. with with with Edit: If some Qt applications (such as Wireshark) still have font blur issues, install the QtWayland plugin. # for qt6 apps
sudo apt install qt6-wayland
# for qt5 applications
sudo apt install qtwayland5 |
Amazing find, thanks! |
@ttimasdf holy s***, after 4 years, this actually worked! Amazing find indeed, thanks! google-chrome / Electron still has blurry fonts though, but at least the scaling is not all over the place anymore. This is on a 2k monitor with 150% scaling (fonts are slightly blurry if you zoom in): The google-chrome I'm using is from the docs: https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps#install-google-chrome-for-linux UPDATE 1: fixed the font blurryness, I followed this https://www.reddit.com/r/gnome/comments/1dqjfft/comment/laog5c0. UPDATE 2: Chrome crashes because it can't find wayland. Fix: #1032 (comment) UPDATE 3: the mouse cursor becomes comically large though, like referenced in #1290 and #61 UPDATE 4: large mouse cursor fix with #61 (comment) |
Environment
Steps to reproduce
Set display scaling to 150%. Open a graphical application on that monitor (or move it to that monitor).
Expected behavior
The application scales according to the windows display scaling settings.
Actual behavior
wslg only seems to support 100% and 200% as display scales.
The text was updated successfully, but these errors were encountered: