Bug 449005 - Network speed graph blinks and flickers on nvidia-340xx
Summary: Network speed graph blinks and flickers on nvidia-340xx
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kquickcharts
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.86.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Arjen Hiemstra
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-01-23 11:39 UTC by NSLW
Modified: 2022-10-05 06:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.100


Attachments
Applet on which my screen blinks (21.36 KB, image/png)
2022-01-23 11:39 UTC, NSLW
Details
plasma-systemmonitor-20220824-205131.kcrash (7.75 KB, text/vnd.kde.kcrash-report)
2022-08-24 19:22 UTC, NSLW
Details
glxinfo (55.49 KB, text/plain)
2022-08-24 19:23 UTC, NSLW
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NSLW 2022-01-23 11:39:12 UTC
Created attachment 145795 [details]
Applet on which my screen blinks

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  LMB on Networks icon on the system tray
2.  LMB on my WiFi network that I'm connected to
3. 

OBSERVED RESULT
Whole screen blinks not so frequently and no network speed is shown

EXPECTED RESULT
I should see network speed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
1) dmesg gives
NVRM: Xid (PCI:0000:01:00): 69, Class Error: ChId 000c, Class 00008297, Offset 000016ac, Data 00000060, ErrorCode 00000004
NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context
2) my GPU driver is nvidia-340.108
Comment 1 NSLW 2022-08-24 19:22:43 UTC
Created attachment 151560 [details]
plasma-systemmonitor-20220824-205131.kcrash

The issue occurs also in plasma-systemmonitor, but only for the following sensor faces:
1) org.kde.ksysguard.linechart
2) org.kde.ksysguard.processtable
3) org.kde.ksysguard.applicationstable
Sensor faces listed below work fine:
1) org.kde.ksysguard.piechart
2) org.kde.ksysguard.textonly
3) org.kde.ksysguard.horizontalbars
4) org.kde.ksysguard.facegrid
5) org.kde.ksysguard.barchart

I've created a minimal test case in QML using SensorDataModel from org.kde.ksysguard.sensors and LineChart from org.kde.quickcharts trying to narrow down the issue but alas everything works without an issue.

I've modified org.kde.ksysguard.linechart to display a static chart, using an example at
https://api.kde.org/frameworks/kquickcharts/html/classLineChart.html
but it fails in plasma-systemmonitor as well. It crashes eventually (.kcrash log attached). 

I'm not sure what can influence the flickering and not really know Kirigami or KQuickCharts.

Could it be that they use extensions unsupported by my gpu driver like e.g. ARB_buffer_storage (my glxinfo attached)? Such bug has been solved at
https://bugs.winehq.org/show_bug.cgi?id=52663

Any ideas on what could be checked?
Comment 2 NSLW 2022-08-24 19:23:12 UTC
Created attachment 151561 [details]
glxinfo
Comment 3 NSLW 2022-08-25 16:22:37 UTC
I found a workaround and reported it at
https://bugzilla.redhat.com/show_bug.cgi?id=2121497
I believe it might be a downstream issue.
Comment 4 NSLW 2022-08-26 19:18:07 UTC
I think it's not a downstream issue anymore. Line chart graphs worked on kquickcharts v5.85.0 and stopped on v5.86.0.  My regression test gave following result. Please fix it.

00637f36bdedd2513a6264b3d1952d61c12bf312 is the first bad commit
commit 00637f36bdedd2513a6264b3d1952d61c12bf312
Author: Arjen Hiemstra <ahiemstra@heimr.nl>
Date:   Mon Aug 23 17:54:26 2021 +0200

    Implement batching for Line chart material
    
    This allows line chart segments and the respective material to be
    batched, by sending per-segment data as vertex attributes rather than
    uniforms.
    
    Unfortunately, OpenGL 2.1/GLSL 1.10 doesn't support array vertex
    attributes, so instead this emulates an array by simply defining a bunch
    of vertex attributes and manually converting it to an output array.

 src/scenegraph/LineChartMaterial.cpp | 110 +++++++------------------
 src/scenegraph/LineChartMaterial.h   |  33 +-------
 src/scenegraph/LineChartNode.cpp     |   6 +-
 src/scenegraph/LineSegmentNode.cpp   | 153 +++++++++++++++++++++++++++--------
 src/scenegraph/LineSegmentNode.h     |   4 +-
 src/shaders/linechart.frag           |  33 ++++----
 src/shaders/linechart.vert           |  69 ++++++++++++++--
 7 files changed, 239 insertions(+), 169 deletions(-)
Comment 5 Bug Janitor Service 2022-09-04 14:45:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kquickcharts/-/merge_requests/50
Comment 6 NSLW 2022-09-29 12:44:51 UTC
Git commit 541fc5e2a58887b3e2e9780291fe455220045323 by Łukasz Wojniłowicz.
Committed on 27/09/2022 at 15:29.
Pushed by wojnilowicz into branch 'master'.

Unpack points in the fragment shader of a line chart

M  +23   -2    src/shaders/linechart.frag
M  +14   -23   src/shaders/linechart.vert
M  +22   -1    src/shaders6/linechart.frag
M  +14   -23   src/shaders6/linechart.vert

https://invent.kde.org/frameworks/kquickcharts/commit/541fc5e2a58887b3e2e9780291fe455220045323