I regularly use konsole (or rather, yakuake, but both share the exactly same behaviour), and tmux on an Archlinux desktop. A recent package update to konsole-19.12.0-1 introduced a bug: I still can start tmux copy mode (C-b [), select text (space + navigation keys); but when I want to save this text in tmux's clipboard, the konsole tab freezes. It can be closed by the usual means (× symbol or C-R, the “really close?” dialog appears as it should), you can switch tabs/start new tabs, but the terminal itself is totally unresponsive. No CLI messages are created. I can connect to the same tmux session from other terminals (I tried xterm) and there everything works as it did before. Even the copy did take place, you can paste the previously selected text (C-b ]). Contrary, the bug occurs with tmux sessions from other hosts (SSH, tried with Gentoo, Debian Stretch, FreeBSD 12.1). Oddly enough, this does only happen for copying plain terminal output, and not if the selected text is inside a Vim editor window. Quick fix was downgrading & pinning konsole at version 19.08.3-1. Downgrading tmux-2.9_a-4 (4 months old) did not help, so this new behaviour was introduced with the konsole update. STEPS TO REPRODUCE 1. Open a konsole (or yakuake) window/tab 2. Open/connect to a tmux session (not necessarily local), regular terminal (not Vim) 3. Start copy mode (default key: C-b [) 4. Select some text 5. Save the text into clipboard (default: Enter) OBSERVED RESULT The tab in question becomes unresponsive and has to be closed forcibly. EXPECTED RESULT The tab to continue working (like it does in older Konsole versions and other terminal emulators). SOFTWARE/OS VERSIONS Linux/KDE Plasma: 5.4.3-arch1-1, no Plasma desktop (Fluxbox WM + Konsole as a standalone terminal emulator/Yakuake + Konsole KPart) KDE Plasma Version: n/a KDE Frameworks Version: n/a Qt Version: 5.13.2-1 (Archlinux packages) ADDITIONAL INFORMATION Originally posted in the Archlinux tracker at https://bugs.archlinux.org/task/64848
Confirmed. SOFTWARE/OS VERSIONS (Archlinux packages) Linux: 5.4.4-zen1-1-zen / Arch Linux KDE Plasma Version: 5.17.4-2 KDE Frameworks Version: 5.64.0-1 Qt Version: 5.13.2-3
Confirmed. KDE Plasma 5.17.4 KDE Frameworks 5.65.0 Qt 5.13.1 Kernel 5.3.12-1
Also happens here. Linux: 5.4.2-arch1-1 Plasma: 5.17.4-2 Frameworks: 5.65.0-4 Qt5: 5.14.0-1
19.08 works but 19.12 does not - I'll do a git bisect later to find what commit caused it.
Also confirmed on Void Linux: SOFTWARE/OS VERSIONS (Void Linux packages) Linux: 5.3.18_1 / Void Linux KDE Plasma Version: n/a KDE Frameworks Version: 5.65.0_1 Qt Version: 5.13.2_2 konsole 19.12.0 It turns out that the hang is heavily dependent of how much text is selected/copied. Single characters/words/lines are no problem, but as soon as you select more than 4…8 lines (depending on length), tmux@konsole hangs.
Yes, make sure you select a large # of lines - it appears to be from the fixing of https://bugs.kde.org/show_bug.cgi?id=231405
I had to press Ctrl+space to start selecting, and end it with Alt+w. Anyway, let's cut tmux off the game. script'ing it reveals that simply passing a longer string to OSC 52, no matter if the terminator is BEL ("\a") or ST ("\e\\") causes such a hang. Small reproducer: lorem=$(echo Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | base64) echo -ne "\e]52;;$lorem\a"
Thanks Egmont, nice find! I can confirm this MWE, also on OpenSUSE Tumbleweed (TIL that tmux switches to Vi mode if the 'vi' regex matches on $EDITOR; C-Space Alt-W are Emacs keybindings).
19.12.1 is going to be tagged on Monday - is there an easy fix or should this be reverted?
Yes. https://invent.kde.org/kde/konsole/merge_requests/61
Git commit 90b4f33965b9be2188af2e7bc223b88744a5c992 by Mariusz Glebocki. Committed on 04/01/2020 at 17:23. Pushed by hindenburg into branch 'master'. Fix token buffer indexing Related: bug 415463 M +2 -1 src/Vt102Emulation.cpp https://invent.kde.org/kde/konsole/commit/90b4f33965b9be2188af2e7bc223b88744a5c992
Git commit 90b4f33965b9be2188af2e7bc223b88744a5c992 by Mariusz Glebocki. Committed on 04/01/2020 at 17:23. Pushed by scmsync into branch 'master'. Fix token buffer indexing Related: bug 415463 M +2 -1 src/Vt102Emulation.cpp https://commits.kde.org/konsole/90b4f33965b9be2188af2e7bc223b88744a5c992
Git commit 23ddfcc4fcd3cce1b52a68f44b8a44f121d11919 by Kurt Hindenburg, on behalf of Mariusz Glebocki. Committed on 05/01/2020 at 15:50. Pushed by hindenburg into branch 'release/19.12'. Fix token buffer indexing Related: bug 415463 FIXED-IN: 19.12.1 (cherry picked from commit 90b4f33965b9be2188af2e7bc223b88744a5c992) M +2 -1 src/Vt102Emulation.cpp https://invent.kde.org/kde/konsole/commit/23ddfcc4fcd3cce1b52a68f44b8a44f121d11919
Git commit 23ddfcc4fcd3cce1b52a68f44b8a44f121d11919 by Kurt Hindenburg, on behalf of Mariusz Glebocki. Committed on 05/01/2020 at 15:50. Pushed by scmsync into branch 'release/19.12'. Fix token buffer indexing Related: bug 415463 FIXED-IN: 19.12.1 (cherry picked from commit 90b4f33965b9be2188af2e7bc223b88744a5c992) M +2 -1 src/Vt102Emulation.cpp https://commits.kde.org/konsole/23ddfcc4fcd3cce1b52a68f44b8a44f121d11919
I can confirm that the bug has gone! konsole-git-r7039.7cfe2c8a-1 (Archlinux AUR) konsole 20.03.70 Thank you all!