Bug 495703 - Graphical artifacts showing abundantly
Summary: Graphical artifacts showing abundantly
Status: CLOSED UPSTREAM
Alias: None
Product: kpat
Classification: Applications
Component: general (show other bugs)
Version: 24.08.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords: wayland-only
: 496052 497973 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-11-01 21:12 UTC by Michał Dybczak
Modified: 2025-01-08 06:46 UTC (History)
5 users (show)

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


Attachments
Artifacts (2.53 MB, image/png)
2024-11-01 21:12 UTC, Michał Dybczak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Dybczak 2024-11-01 21:12:39 UTC
Created attachment 175462 [details]
Artifacts

***
During play, a short horizontal lines appear in various places and the more I play, more visual glitches appear. After win, the whole screen is covered with them - see the screenshot.
Those artifacts were showing from time to time since years, on various laptops and various hardware (Nvidia, AMD), but since the last update, they are ALWAYS there 100% and there are so many of them that it gets annoying.
I can't find any other app having this issue.
***

SUMMARY

STEPS TO REPRODUCE
1.  Just start playing kpat
2. 
3. 

OBSERVED RESULT

Horizontal artifacts appear randomly during a play, flickering when moving cards, with time appearing more and more.

EXPECTED RESULT
No graphical artifacts at all.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
Memory: 30.6 GiB of RAM
Graphics Processor: AMD Radeon 780M
Manufacturer: TUXEDO
Product Name: TUXEDO Sirius 16 Gen1

ADDITIONAL INFORMATION
I tested it also on kernel 6.6 and there was no change.
Comment 1 Albert Astals Cid 2024-11-01 23:33:28 UTC
does that happen with a theme different than the egypt one?

Does it also happen if you try an X11 session instead of a wayland one?
Comment 2 Michał Dybczak 2024-11-02 11:42:11 UTC
Changing themes didn't help, but switching to X did, so the issue happens only on Wayland.
Comment 3 Albert Astals Cid 2024-11-02 19:44:06 UTC
There is nothing special that kpat does in the graphics stack, so sadly I don't think this can be fixed at the kpat level, i'd guess this is either a kwin bug or a graphics driver bug.
Comment 4 Michał Dybczak 2024-11-02 20:30:03 UTC
Any way to debug it further to get more clear data, what is the problem? So far, only kpat shows such issue.

Wait, I could downgrade it and see if it helps.

OK, I checked various past versions and the issue was still there, which confirmed that it is not the package issue. In the past, this problem was minimal or not present, so some other component must be causing this.

I logged in to my test, vanilla user and... the issue was not there! Usually, this means a config problem. So I went and renamed the current kpat config, didn't help. So the issue is not with kpat package, not with kpat config, but some other user config...

There is a good chance that if this config is causing problems in kpat, it could be causing (maybe different) issues elsewhere.

Do you have any idea what could I try to debug it further? What components are important for graphical elements that have user configs?

Some kwin configs probably play a role here. I could experiment with it, but maybe a bit later.
Comment 5 Albert Astals Cid 2024-11-02 21:12:43 UTC
kwin seems the one that could most probably be involved, yes
Comment 6 John Kizer 2024-11-02 22:31:46 UTC
I cannot reproduce on:

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Graphics Processor: NVIDIA GeForce RTX 4070 SUPER/PCIe/SSE2

Just an idea, any chance you have tried on a distro other than Manjaro, to see if it's potentially something in how KPatience or related files are packaged?
Comment 7 Michał Dybczak 2024-11-03 14:54:40 UTC
Since the issue is not happening on the same install but different user, it shows that it's not a distro problem.

I renamed kwinrc and kwinoutputconfig.json, relogged session and no change. Artifacts are still there. If there are any other relevant kwin files to check?

If that is not kwin, what other configs need to be tested?

Here is my hardware configuration if that helps:

System:
  Host: Sirius16-Manjaro Kernel: 6.6.58-1-MANJARO arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.2.2 Distro: Manjaro Linux
Machine:
  Type: Laptop System: TUXEDO product: TUXEDO Sirius 16 Gen1 v: N/A
    serial: <superuser required>
  Mobo: NB04 model: APX958 serial: <superuser required> UEFI: American
    Megatrends LLC. v: 1.00A00_20240108 date: 01/08/2024
Battery:
  ID-1: BAT0 charge: 76.1 Wh (95.0%) condition: 80.1/80.1 Wh (100.0%)

CPU:
  Info: 8-core AMD Ryzen 7 7840HS w/ Radeon 780M Graphics [MT MCP]
    speed (MHz): avg: 684 min/max: 400/5137
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 33 [Radeon RX 7600/7600
    XT/7600M XT/7600S/7700S / PRO W7600] driver: amdgpu v: kernel
  Device-2: Advanced Micro Devices [AMD/ATI] Phoenix1 driver: amdgpu
    v: kernel
  Device-3: Microdia Integrated Camera driver: uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.14 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu,amdgpu
    resolution: 1969x1108
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.2.6-arch1.1
    renderer: AMD Radeon 780M (radeonsi gfx1103_r1 LLVM 18.1.8 DRM 3.54
    6.6.58-1-MANJARO)
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: N/A
  Device-2: Intel Wi-Fi 6E AX210/AX1675 2x2 [Typhoon Peak] driver: iwlwifi
Drives:
  Local Storage: total: 2.74 TiB used: 820.08 GiB (29.2%)
Info:
  Memory: total: 32 GiB note: est. available: 30.58 GiB used: 5.78 GiB (18.9%)
  Processes: 409 Uptime: 26m Shell: Bash inxi: 3.3.36
Comment 8 Albert Astals Cid 2024-11-03 18:01:55 UTC
I think you've reached a point we (kpat developers) can't really help you, you need some other expert. I am going to move this bug out to kwin in hopes they can hopefully help you in figuring out what may be wrong.

For the kwin devs, see the attached image, the user has that problem in their regular session but not in a new one.
Comment 9 Zamundaaa 2024-11-13 18:23:28 UTC
I see similar glitches in KDevelop, and looked into this. In both kpat and kdevelop, saving the wl_shm buffer KWin gets from the app shows the glitches, so this is almost certainly a bug in Qt.
Comment 10 Michał Dybczak 2024-11-13 19:59:56 UTC
I noticed somewhat similar artifacts in Dolphin when some elements were in move. However, those happen only for fractions of seconds and because the movement was small, the visual glitches were also almost neglectable. With kpat, they are abundant and happen all the time, while in Dolphin they are a rarity.

Is there a link to this QT bug report? It would be good to follow this bug's progress and see if this one here is solved, when fixes from this QT bug are applied.
Comment 11 David Edmundson 2024-11-14 12:09:26 UTC
It's a fractional scaling issue client side. 

If you need a fast workaround, running: 
QT_SCALE_FACTOR_ROUNDING_POLICY=ceil kpat

Will not show the artifacts.

Interestingly

QT_SCREEN_SCALE_FACTORS=1.05 kpat --platform xcb

also does not exhibit issues. That implies it's a Qt issue and can be resolved there.
Comment 12 Michał Dybczak 2024-11-15 17:01:33 UTC
You are right!
Starting game with: QT_SCALE_FACTOR_ROUNDING_POLICY=ceil kpat completely nullifies the problem. My screen is 1440p with 130% scale.

In this case, since this is an upstream issue, I'm changing status to NEEDSINFO->UPSTREAM and will mark as resolved when a bug report is created in the proper place or when an existing bug is found and linked here.

I'm not a developer, only an average user, so I'm not sure, where is Qt bugtracker?
Is it here?

https://bugreports.qt.io/secure/Dashboard.jspa
Comment 13 Bug Janitor Service 2024-11-30 03:46:21 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Bug Janitor Service 2024-12-15 03:46:41 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.
Comment 15 Michał Dybczak 2024-12-16 14:37:28 UTC
Thanks for the link to the bug report:

https://bugreports.qt.io/browse/QTBUG-126990

I'm changing the status to Closed Upstream.
Comment 16 Albert Astals Cid 2024-12-22 23:25:17 UTC
*** Bug 496052 has been marked as a duplicate of this bug. ***
Comment 17 John Kizer 2025-01-08 06:46:11 UTC
*** Bug 497973 has been marked as a duplicate of this bug. ***