KDE-Rounded-Corners icon indicating copy to clipboard operation
KDE-Rounded-Corners copied to clipboard

Weird blurring if using fractional scaling on Wayland.

Open AndGuz opened this issue 2 years ago • 24 comments

Screenshot_20240123_223918 Effect enabled Screenshot_20240123_223927 Effect disabled

Haven't tested without scaling. it is a slight blurring and only happens sometimes.

AndGuz avatar Jan 24 '24 02:01 AndGuz

I confirm that I can also see this issue. I did some digging to find the root cause and I couldn't find any traces of what is going wrong. So I checked the source code of my inspiring built-in effect: Invert

Interestingly, the blurriness can also be observed on the "Invert" effect which is built by KWin devs.

So I conclude that this is a bug on the KWin side when a window is using a shader.

More digging, here are some of the reported items that I believe are related: https://bugs.kde.org/show_bug.cgi?id=480021 https://bugs.kde.org/show_bug.cgi?id=456965

matinlotfali avatar Jan 24 '24 06:01 matinlotfali

I was so excited to try out this effect! Works really great apart from this issue, which makes it unusable :(

debnath-d avatar Jan 24 '24 14:01 debnath-d

Maybe the issue will be fixed with plasma 6

AndGuz avatar Jan 24 '24 16:01 AndGuz

I opened this issue on the official KWin repo: https://invent.kde.org/plasma/kwin/-/issues/201

matinlotfali avatar Jan 24 '24 17:01 matinlotfali

Did some testing and the blurriness is only there on fractional scaling, if i use integer scaling it doesn't happen. The effect is working beautifully apart from that. I'm using 100% scaling for now until the root cause get fixed on kwin. For now, i think is ok to close this issue :) (thanks for the awesome work you're doing, i hope this effect is used on plasma 6)

AndGuz avatar Jan 24 '24 23:01 AndGuz

From what I understand maybe there is a fix? https://bugs.kde.org/show_bug.cgi?id=461283#c9

CeruleanDerpo avatar Mar 15 '24 21:03 CeruleanDerpo

I think this should probably be reopened since the issue isn't present on the official effects anymore.

mufeedali avatar Apr 04 '24 12:04 mufeedali

Sadly the issue still stands and it is still present on effects that use shaders (i.e the official invert effect)

matinlotfali avatar Apr 06 '24 16:04 matinlotfali

Sorry for the misreport, looks like the issue is still present in the Invert effect

mufeedali avatar Apr 18 '24 14:04 mufeedali

I can reproduce

BrandowLucas avatar May 12 '24 20:05 BrandowLucas

This issue is still a problem in plasma 5

hector-macias1 avatar Jun 08 '24 21:06 hector-macias1

Same thing happens here at Plasma 6 with scaling as 150%. However some applications like Firefox and VSCode is not affected.

sppfly avatar Jun 10 '24 13:06 sppfly

invert doesn't seem to blur to me (plasma 6.1, fedora 40), and the bug report about the blurring has been fixed, I am only getting the weird blur with kde rounded corners

CeruleanDerpo avatar Jul 06 '24 20:07 CeruleanDerpo

my screen resolution is 2560x1600(ArchLinux plasma 6.1.2), ~~so I tried 160% and the weird blur did not happen~~ sorry, after careful comparison, there will still be blurring, but it is not very obvious at 160%

CAB233 avatar Jul 08 '24 08:07 CAB233

I did another trial on Wayland and 125% and 150% fractional scaling.

On the latest KDE Neon (plasma 6.1.2, framework 6.3.0) the blurring is not happening anymore with either "invert" or "rounded corners" effects. So maybe the bugfix has landed.

May I ask others to test and report on their distributions? Please indicate versions in your reports.

matinlotfali avatar Jul 08 '24 19:07 matinlotfali

Fedora 40 with Nvidia proprietary drivers and KDE 6.1, I'm still getting the blur on the rounded corners effect, but interestingly not on the invert effect

Edit I'm using 125% scaling on Wayland

CeruleanDerpo avatar Jul 08 '24 20:07 CeruleanDerpo

Arch, Plasma 6.1.2. Still have blur on both the Invert and the Rounded corner effects. 125% scaling.

mufeedali avatar Jul 08 '24 20:07 mufeedali

I did another trial on Wayland and 125% and 150% fractional scaling.

On the latest KDE Neon (plasma 6.1.2, framework 6.3.0) the blurring is not happening anymore with either "invert" or "rounded corners" effects. So maybe the bugfix has landed.

May I ask others to test and report on their distributions? Please indicate versions in your reports.

Operating System: Arch Linux KDE Plasma Version: 6.1.2 KDE Frameworks Version: 6.3.0

Still blurry with Rounded corner effects with 140% scaling on wayland (maybe only serval applications?), but built-in invert not.

GrassBlock1 avatar Jul 09 '24 09:07 GrassBlock1

Operating System: OpenSUSE Tumbleweed (Snapshot 20240704) KDE Plasma Version: 6.1.2 KDE Frameworks: 6.3.0

Now I've discovered that is scaling factor dependent, for me the blurring is less on 125% but none on 140% at 1920x1080. It comes back at 150%, blurriness disappears on 160%. Also, that is app dependent, and the blurriness could be less in some areas but exaggerated in others (blurry titlebar, app ok). The desktop crashes when moving windows after scaling (on the settings). imagen (blurry klassy settings, kde settings ok)

Edit2: closing the klassy settings and open them again fixed the blurriness, so weird! My theory is that is rounding error related.

AndGuz avatar Jul 10 '24 02:07 AndGuz

Arch, Plasma 6.1.3, Qt 6.7.2, Kde frameworks 6.4.0, Wayland. 150% scaling on a 1080p 16:9 screen, I have the same issue.

k0nstruct avatar Aug 06 '24 13:08 k0nstruct

My theory is that is rounding error related.

@AndGuz You seem to be right about this. All apps seem to be unaffected at certain windows sizes...

mufeedali avatar Aug 07 '24 18:08 mufeedali

What's strange is that it doesn't happen on some applications. On spotify, the blur is noticeable, but on firefox it never happens. Yakuake is also immune? It's strange. The blurring seems to happen when the window moves, especially with the plugin settings. But it also happens on its own after some time.

k0nstruct avatar Aug 11 '24 10:08 k0nstruct

I'm really hoping that this bug would be fixed. I miss rounded corners on plasma 6

neo-nayan avatar Aug 13 '24 19:08 neo-nayan

Would you try 160% instead of 150%? It looks a bit better on my 1600p monitor.

imnotlxy avatar Sep 24 '24 01:09 imnotlxy

Hi, i think this will be resolved with the following change on the wayland scaling protocol: WAYLAND-PROTOCOLS, MR#313as it will allow compositor to put better denominators for the scaling of any window. if my theory about float scaling precision is true, then this will fix it. Quoting this message by Jonas Adahl from the MR:

Lets assume I have a 4K monitor with the resolution 3840 x 2400. If I have use the scaling factor s 1.75218 I get a logical monitor size 2192 x 1370. Multiplying the logical size with s, I get 3840 x 2400. With the 120 denominator, s is rounded to 1.75 (lets call it s120). With s120 I get the logical monitor size 2194 x 1371. Multiplying that with s120 I get 3840 x 2399. In practice that means a fullscreen surface wont cover the full screen, when using s120, but will do so when using s

AndGuz avatar Oct 07 '24 23:10 AndGuz