System stutter when interacting with desktop, receiving notifications. X11 related

Hello, I've been using Garuda Linux for quite some time as my main os, but one issue keeps bothering me.

When I open something(program, new directory in doplhin), receive desktop notification my system stutters. My mouse, audio and video lags for a short period of time, and it is very noticeable and annoying. Especially the mouse lag.

It most likely something related to drivers, Xorg or plasma, though it causes such overhead that even the audio lags. But later I had found out that the problem is most likely in xorg.

What I tried:
Nvidia related xorg configuration, running nvidia-xconfiguration, enabling triple buffering, usleep
Messing with compositor settings, forcing and disabling vsync.

But there's a very intersting clue that I've found that probably causes that issue.
When run kwin_x11 --replace from console and I simulate any event that causes stutter it prints these errors:

When I receive a notification(run notify-send 123123)

qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 7654, resource id: 44040535, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 7655, resource id: 44040537, major code: 14 (GetGeometry), minor code: 0

When I switch directory to a previously unopened directory dolphin:

kwin_core: XCB error: 152 (BadDamage), sequence: 4540, resource id: 8388812, major code: 143 (DAMAGE), minor c
ode: 2 (Destroy)
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 10924, resource id: 69206024, major code: 18 (
ChangeProperty), minor code: 0
kwin_core: XCB error: 152 (BadDamage), sequence: 18979, resource id: 8389629, major code: 143 (DAMAGE), minor
code: 2 (Destroy)
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 21325, resource id: 69206024, major code: 18 (
ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 32099, resource id: 69206024, major code: 18 (
ChangeProperty), minor code: 0

When I open application manager:

qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58030, resource id: 44040571, major code: 14
(GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58032, resource id: 44040573, major code: 14
(GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58033, resource id: 44040575, major code: 14
(GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58034, resource id: 44040577, major code: 14
(GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58035, resource id: 44040579, major code: 14
(GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58036, resource id: 44040581, major code: 14
(GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58037, resource id: 44040583, major code: 14
(GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58038, resource id: 44040569, major code: 14
(GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 58039, resource id: 44040571, major code: 14
(GetGeometry), minor code: 0

These are not the only errors that kwin_x11 prints, I included full log in privatebin.
I think it's something qt related, I tried searching these errors, but no success.
But that must be the problem.

To note I did use any themes or anything apart from what comes preinstalled with garuda dragonized. I only tweaked x11 to show titlebar with menu and using standard taskbar dock which is included in latte.

Full log:

System:    Kernel: 5.14.9-zen2-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0  
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=85c6b4f2-2c87-4216-916b-e06ea2ae41e5  
rw [email protected] quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 loglevel=3
Desktop: KDE Plasma 5.22.5 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM  
Distro: Garuda Linux base: Arch Linux  
Machine:   Type: Desktop Mobo: ASUSTeK model: B150M-PLUS v: Rev X.0x serial: <filter>  
UEFI-[Legacy]: American Megatrends v: 2003 date: 09/21/2016  
Battery:   ID-1: hidpp_battery_1 charge: N/A condition: N/A volts: 4.1 min: N/A  
model: Logitech G703 LIGHTSPEED Wireless Gaming Mouse w/ HERO type: N/A serial: <filter>  
status: Discharging  
CPU:       Info: Quad Core model: Intel Core i7-7700 bits: 64 type: MT MCP arch: Kaby Lake family: 6  
model-id: 9E (158) stepping: 9 microcode: EA cache: L2: 8 MiB  
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 57600  
Speed: 4103 MHz min/max: 800/4200 MHz Core speeds (MHz): 1: 4103 2: 4098 3: 4105 4: 4198  
5: 4104 6: 4191 7: 4101 8: 4182  
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled  
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable  
Type: mds mitigation: Clear CPU buffers; SMT vulnerable  
Type: meltdown mitigation: PTI  
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp  
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization  
Type: spectre_v2  
mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling  
Type: srbds mitigation: Microcode  
Type: tsx_async_abort mitigation: TSX disabled  
Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: Micro-Star MSI driver: nvidia v: 470.74  
alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1b81 class-ID: 0300  
Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: nvidia display-ID: :0  
screens: 1  
Screen-1: 0 s-res: 1920x1080 s-dpi: 95 s-size: 513x292mm (20.2x11.5") s-diag: 590mm (23.2")  
Monitor-1: DVI-D-0 res: 1920x1080 hz: 60 dpi: 96 size: 510x290mm (20.1x11.4")  
diag: 587mm (23.1")  
OpenGL: renderer: NVIDIA GeForce GTX 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 470.74 direct render: Yes  
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: ASUSTeK driver: snd_hda_intel  
v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a170 class-ID: 0403  
Device-2: NVIDIA GP104 High Definition Audio vendor: Micro-Star MSI driver: snd_hda_intel  
v: kernel bus-ID: 01:00.1 chip-ID: 10de:10f0 class-ID: 0403  
Device-3: Generalplus USB Audio Device type: USB driver: hid-generic,snd-usb-audio,usbhid  
bus-ID: 1-7:5 chip-ID: 1b3f:2008 class-ID: 0300  
Sound Server-1: ALSA v: k5.14.9-zen2-1-zen running: yes  
Sound Server-2: JACK v: 1.9.19 running: no  
Sound Server-3: PulseAudio v: 15.0 running: no  
Sound Server-4: PipeWire v: 0.3.38 running: yes  
Network:   Device-1: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: kernel port: f000  
bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200
IF: enp0s31f6 state: up speed: 100 Mbps duplex: full mac: <filter>
Device-2: Microsoft Xbox 360 Wireless Adapter type: USB driver: xpad bus-ID: 1-5:4
chip-ID: 045e:0719 class-ID: ff00 serial: <filter>
Drives:    Local Storage: total: 1.02 TiB used: 102 GiB (9.8%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: GOODRAM model: N/A size: 111.79 GiB block-size:
physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 10.6 scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB
block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200
serial: <filter> rev: CC43 scheme: GPT
Partition: ID-1: / raw-size: 239.99 GiB size: 239.99 GiB (100.00%) used: 102 GiB (42.5%) fs: btrfs
dev: /dev/sdb4 maj-min: 8:20
ID-2: /home raw-size: 239.99 GiB size: 239.99 GiB (100.00%) used: 102 GiB (42.5%) fs: btrfs
dev: /dev/sdb4 maj-min: 8:20
ID-3: /var/log raw-size: 239.99 GiB size: 239.99 GiB (100.00%) used: 102 GiB (42.5%) fs: btrfs
dev: /dev/sdb4 maj-min: 8:20
ID-4: /var/tmp raw-size: 239.99 GiB size: 239.99 GiB (100.00%) used: 102 GiB (42.5%) fs: btrfs
dev: /dev/sdb4 maj-min: 8:20
Swap:      Alert: No swap data was found.
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: nvidia temp: 51 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:      Processes: 244 Uptime: 22m wakeups: 4 Memory: 15.55 GiB used: 2.59 GiB (16.7%) Init: systemd
v: 249 tool: systemctl Compilers: gcc: 11.1.0 alt: 10 clang: 12.0.1 Packages: pacman: 1602
lib: 493 Shell: fish v: 3.3.1 running-in: konsole inxi: 3.3.06

Did this happen when you first installed your system?

How long has this problem been happening?

Have you tested what happens with your compositor disabled?

Have you tested creating a new user account to see if it is also affected?

I might also suggest deleting your timeshift snapshots if still using timeshift and then performing a full btrfs balance operation.

Kudos to you on the well documented help request.

4 Likes

Thanks.
Yes, this issue persists since I've installed the system.
When I switch to XRender or disable compositor, the stutters fade away faster, but the errors are still thrown. (Though I think it happens because of simpler rendering and it computes it faster)
Yes new user account is also affected.

I deleted all timeshift snapshots and rebalanced btrfs but it didn't help.

Maybe it's not really the cause of the problem, but in my opinion it wouldn't hurt to check if there is a more updated version....
https://www.asus.com/us/supportonly/B150M-PLUS/HelpDesk_BIOS/

1 Like

I see flashing bios as last resort.

Tried running open-source driver, did not help.

Have you already tried different kernels, especially linux-lts?

2 Likes

Nope. Gonna try.

Tried linux and linux-lts, did not work. Still throws errors.

Can it be a resource related issue? Like if it says BadDrawable might it be that it doesn't find an icon or something. Could I somehow check that? I tried switching icon themes but no use.

Any ideas?

Don't know if this is exactly the same.
I found this old KDE bug report, recently closed as Nvidia problem...
By-the-way, wouldn't it be a workarouund disabling all the notifications (if this is the real source of the stuttering)?
https://bugs.kde.org/show_bug.cgi?id=414785

I can't. It throws errors on every UI interaction either it's a window popping up, or some panel appearing in qt it lags badly. Even hovering makes ui lag while throwing errors, but at least not that badly that it stutters everything.

It can't be an nvidia issue, if I run XRenderer which is cpu based (i belive?) it still stutters.

To really exclude this is an nvidia driver problem, have you ever tried to (temporarily) remove Nvidia drivers and see how it goes with nouveau?

Just installed linux-video and rebooted, absolutely the same thing. Open a window, drag it to the top, get a notification - stutters.

1 Like

It may be time to consider this, as you can not rule this out as a factor.

Does the same issue present in the live environment?

1 Like

I'll burn another DVD with live image to test, don't really remember if it was behaving like this, cuz I kinda installed the system quickly and rebooted. I actually have a rescue disk but I belive it's faulty because it doesn't boot.

After I that I think it's time to do last resort.

Yes, the issue is present in the live environment. Updated to the last motherboard driver, the issue persists :c

Maybe you could try with an ISO of a non-kde edition... :frowning:

1 Like