You are not logged in.

#1 2024-04-09 19:39:30

marc00077
Member
Registered: 2023-06-04
Posts: 3

[SOLVED] >50 seconds to copy screenshots to clipboard with flameshot

Hello fellow archers. I've been running arch for more than half a decade now with lots of troubles but I'm not sure where to start with this one.

A couple full system updates ago (that is some months ago) flameshot stopped working correctly when I press the button/shortcut to copy the screenshot to the clipboard. The effects are different due to how the app is coded but a similar behavior happens with screengrab. The screenshots take more than 50 seconds to get copied to the clipboard, and, during this time, the screenshot app freezes and some desktop apps stop refreshing the canvas too (e.g. telegram).

Discoveries/tests/findings:
The size of the screenshot does not seem to affect the time it takes to get copied.
Xfce4-screenshooter copies it instantly (just discovered this now) and so does copying an image from the internet with Firefox.
Launching the picom compositor does not fix the issue.
Dmesg is not showing any errors or warnings.
My system is fully updated and freshly rebooted.
The cpu is not being used by anything else and there's plenty of ram/swap/storage space.

Although now at least I have xfce4-screenshooter as an alternative I would like to be able to use flameshot again. Any ideas on how to troubleshoot this problem are appreciated.
I can provide a screen recording to show the problem or more information about the system if needed.

Info/specs from neofetch:

OS: Arch Linux x86_64
Host: MS-7A33 2.0
Kernel: 6.8.4-arch1-1
Uptime: 1 hour, 4 mins
Packages: 2336 (pacman)
Shell: zsh 5.9
Resolution: 1920x1080, 2560x1440
WM: i3
Theme: Arc-Darker [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: alacritty
Terminal Font: hack
CPU: AMD Ryzen 7 1700 (16) @ 3.000GHz
GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
Memory: 5775MiB / 15936MiB

uname -a:

Linux ArchTorre 6.8.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:23 +0000 x86_64 GNU/Linux

GDB trace of where the screengrab utility is getting stuck during the ~50 second hang:

[#0] 0x7ffff62a5ebe → mov edi, ebx
[#1] 0x7ffff62a8750 → pthread_cond_wait()
[#2] 0x7ffff68f3614 → QWaitCondition::wait(QMutex*, QDeadlineTimer)()
[#3] 0x7ffff7d41786 → add rsp, 0x8
[#4] 0x7ffff7d11d01 → mov rsi, r15
[#5] 0x7ffff7d06d7a → QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const()
[#6] 0x7ffff7d18a11 → QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode, QString const&, QList<QVariant> const&)()
[#7] 0x555555599888 → DBusNotifier::displayNotify(StateNotifyMessage const&)()
[#8] 0x5555555819b3 → Core::copyScreen()()
[#9] 0x7ffff6ac89a7 → mov rax, QWORD PTR [rbp-0x90]

glxinfo -B:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon RX 580 Series (radeonsi, polaris10, LLVM 17.0.6, DRM 3.57, 6.8.4-arch1-1) (0x67df)
    Version: 24.0.4
    Accelerated: yes
    Video memory: 8192MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 7438 MB, largest block: 7438 MB
    VBO free aux. memory - total: 7802 MB, largest block: 7802 MB
    Texture free memory - total: 7438 MB, largest block: 7438 MB
    Texture free aux. memory - total: 7802 MB, largest block: 7802 MB
    Renderbuffer free memory - total: 7438 MB, largest block: 7438 MB
    Renderbuffer free aux. memory - total: 7802 MB, largest block: 7802 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 8192 MB
    Total available memory: 16160 MB
    Currently available dedicated video memory: 7438 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 580 Series (radeonsi, polaris10, LLVM 17.0.6, DRM 3.57, 6.8.4-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.4-arch1.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.4-arch1.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.0.4-arch1.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Last edited by marc00077 (2024-04-10 19:47:45)

Offline

#2 2024-04-09 20:32:59

seth
Member
Registered: 2012-09-03
Posts: 51,648

Re: [SOLVED] >50 seconds to copy screenshots to clipboard with flameshot

W/o even reading the post, 50s are two dbus timeouts => check your system journal - probably portal related.

And please use [code][/code] tags. Edit your post in this regard.

Online

#3 2024-04-09 21:29:38

marc00077
Member
Registered: 2023-06-04
Posts: 3

Re: [SOLVED] >50 seconds to copy screenshots to clipboard with flameshot

What would it imply if they were two dbus timeouts?

Output of sudo journalctl -f during a screengrab freeze:

Apr 09 23:24:32 ArchTorre polkitd[1006]: Registered Authentication Agent for unix-process:394078:1173328 (system bus name :1.277 [flatpak list], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale C)
Apr 09 23:24:32 ArchTorre polkitd[1006]: Unregistered Authentication Agent for unix-process:394078:1173328 (system bus name :1.277, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale C)
Apr 09 23:24:51 ArchTorre systemd[1186]: Started dbus-:1.2-org.freedesktop.Notifications@29.service.

Apr 09 23:25:51 ArchTorre plasma_waitforname[394624]: org.kde.knotifications: WaitForName: Service was not registered within timeout
Apr 09 23:25:51 ArchTorre systemd[1186]: dbus-:1.2-org.freedesktop.Notifications@29.service: Main process exited, code=exited, status=1/FAILURE
Apr 09 23:25:51 ArchTorre systemd[1186]: dbus-:1.2-org.freedesktop.Notifications@29.service: Failed with result 'exit-code'.

Offline

#4 2024-04-09 21:34:53

seth
Member
Registered: 2012-09-03
Posts: 51,648

Re: [SOLVED] >50 seconds to copy screenshots to clipboard with flameshot

WM: i3
Waitforname[394624]: org.kde.knotifications: WaitForName: Service was not registered within timeout

https://bbs.archlinux.org/viewtopic.php?id=293764

Online

#5 2024-04-10 19:48:17

marc00077
Member
Registered: 2023-06-04
Posts: 3

Re: [SOLVED] >50 seconds to copy screenshots to clipboard with flameshot

I have moved /usr/share/dbus-1/services/org.kde.plasma.Notifications.service to another place and it has fixed the issue.
Thank you. Months of pain fixed with a single command.

If stuff breaks again I'll just completely remove KDE.

Offline

Board footer

Powered by FluxBB