Bug 479637 - Software cursor has artifacts while hardware looks fine (Intel GPU)
Summary: Software cursor has artifacts while hardware looks fine (Intel GPU)
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.92.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
: 480174 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-01-11 10:30 UTC by Mykola Krachkovsky
Modified: 2024-01-23 11:22 UTC (History)
1 user (show)

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


Attachments
Bibata Amber software cursor photo (183.79 KB, image/jpeg)
2024-01-11 10:31 UTC, Mykola Krachkovsky
Details
Bibata Amber hardware cursor photo (141.90 KB, image/jpeg)
2024-01-11 10:31 UTC, Mykola Krachkovsky
Details
Bibata Amber cursor screenshot (doesn't depend on sw/hw) (1.42 KB, image/png)
2024-01-11 10:32 UTC, Mykola Krachkovsky
Details
Breeze software (155.16 KB, image/jpeg)
2024-01-11 12:22 UTC, Mykola Krachkovsky
Details
Bibata Amber cursors (1.69 MB, application/zip)
2024-01-11 12:39 UTC, Mykola Krachkovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mykola Krachkovsky 2024-01-11 10:30:40 UTC
SUMMARY
Commit https://invent.kde.org/plasma/kwin/-/commit/b214251f81cbacacf3ef483081a7cef15343fa7f forces software cursors on Intel GPU's. But they have visual artifacts.

STEPS TO REPRODUCE
1. Activate software cursors with `KWIN_FORCE_SW_CURSOR=1`
2. Check how cursor is rendered.
3. Disable software cursors with `KWIN_FORCE_SW_CURSOR=0`
4. Compare rendering.

OBSERVED RESULT
HW cursors have smooth shadow outside.
SW cursors have artifacts instead of shadow.

EXPECTED RESULT
SW should look similar to HW ones.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE 20240109
(available in About System)
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
Comment 1 Mykola Krachkovsky 2024-01-11 10:31:28 UTC
Created attachment 164806 [details]
Bibata Amber software cursor photo
Comment 2 Mykola Krachkovsky 2024-01-11 10:31:51 UTC
Created attachment 164807 [details]
Bibata Amber hardware cursor photo
Comment 3 Mykola Krachkovsky 2024-01-11 10:32:26 UTC
Created attachment 164808 [details]
Bibata Amber cursor screenshot (doesn't depend on sw/hw)
Comment 4 Mykola Krachkovsky 2024-01-11 10:38:01 UTC
I've added photos (sorry, but screenshot has no artifacts that are present on real screen) how cursor looks like when SW and HW.

I'm using older version of Bibata Cursors (prefer pointie ones, not modern rounded): https://build.opensuse.org/package/show/home:NickLion:res/bibata-cursors
Comment 5 Vlad Zahorodnii 2024-01-11 11:15:37 UTC
> I'm using older version of Bibata Cursors (prefer pointie ones, not modern rounded): https://build.opensuse.org/package/show/home:NickLion:res/bibata-cursors

Is the issue reproducible with breeze cursor theme?
Comment 6 Vlad Zahorodnii 2024-01-11 11:19:04 UTC
or can attach a zip archive with the cursor theme?
Comment 7 Vlad Zahorodnii 2024-01-11 11:21:58 UTC
also have you enabled color management?
Comment 8 Mykola Krachkovsky 2024-01-11 12:22:00 UTC
Created attachment 164810 [details]
Breeze software

(In reply to Vlad Zahorodnii from comment #5)
> > I'm using older version of Bibata Cursors (prefer pointie ones, not modern rounded): https://build.opensuse.org/package/show/home:NickLion:res/bibata-cursors
> 
> Is the issue reproducible with breeze cursor theme?

Yes. Here it is.
Comment 9 Mykola Krachkovsky 2024-01-11 12:23:57 UTC
(In reply to Vlad Zahorodnii from comment #7)
> also have you enabled color management?

No, ICC is not set, gamma at 1.00, night colors not active yet.
Comment 10 Mykola Krachkovsky 2024-01-11 12:26:03 UTC
(In reply to Vlad Zahorodnii from comment #6)
> or can attach a zip archive with the cursor theme?

Should I add it? It's about 1.7MiB.
Comment 11 Vlad Zahorodnii 2024-01-11 12:35:41 UTC
(In reply to Mykola Krachkovsky from comment #10)
> (In reply to Vlad Zahorodnii from comment #6)
> > or can attach a zip archive with the cursor theme?
> 
> Should I add it? It's about 1.7MiB.

Yes, I'm unable to reproduce the glitch when using breeze cursor theme
Comment 12 Mykola Krachkovsky 2024-01-11 12:39:39 UTC
Created attachment 164811 [details]
Bibata Amber cursors
Comment 13 Bug Janitor Service 2024-01-11 13:26:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4878
Comment 14 Vlad Zahorodnii 2024-01-11 13:56:42 UTC
Git commit 68f1570d452a775d617a5141d94d9a5e95e2e038 by Vlad Zahorodnii.
Committed on 11/01/2024 at 14:44.
Pushed by vladz into branch 'master'.

scene: Fix alpha channel of offscreen cursor texture

When running with 10bpc, the alpha channel has only 2 bits for it, which
is too low for the cursor.

M  +3    -2    src/scene/cursordelegate_opengl.cpp

https://invent.kde.org/plasma/kwin/-/commit/68f1570d452a775d617a5141d94d9a5e95e2e038
Comment 15 Mykola Krachkovsky 2024-01-11 21:17:59 UTC
Thank you, it looks fine now.
Comment 16 Vlad Zahorodnii 2024-01-12 11:13:40 UTC
Git commit a7f1c284a089c25a4c8a19dd8f4ff5a53d979c99 by Vlad Zahorodnii.
Committed on 12/01/2024 at 12:01.
Pushed by vladz into branch 'Plasma/6.0'.

scene: Fix alpha channel of offscreen cursor texture

When running with 10bpc, the alpha channel has only 2 bits for it, which
is too low for the cursor.


(cherry picked from commit 68f1570d452a775d617a5141d94d9a5e95e2e038)

M  +3    -2    src/scene/cursordelegate_opengl.cpp

https://invent.kde.org/plasma/kwin/-/commit/a7f1c284a089c25a4c8a19dd8f4ff5a53d979c99
Comment 17 Vlad Zahorodnii 2024-01-23 11:22:29 UTC
*** Bug 480174 has been marked as a duplicate of this bug. ***