tmux drops out of copy mode (regression)

Bug #1902643 reported by gregrwm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tmux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

After what might be about a minute, or other times many minutes, tmux drops out of copy mode. if the elapsed time were consistent i'd presume it's an intentional feature, and if it were an intentional feature i'd be asking for a way to opt out of that behavior, but as the timing is random i presume it's a bug, and a regression.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: tmux 3.0a-2ubuntu0.1
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
Date: Mon Nov 2 22:17:39 2020
InstallationDate: Installed on 2020-03-15 (232 days ago)
InstallationMedia: Lubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200314)
ProcEnviron:
 LC_TIME=en_DK.utf8
 TERM=screen
 PATH=(custom, no user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: tmux
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.apport.crashdb.conf: 2020-08-27T20:37:28.010487

Revision history for this message
gregrwm (gregrwm) wrote :
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you for taking the time to file a bug report.

Can you provide more details about the issue? By "copy paste mode" I assume you're referring to the copy mode you enter when you type CTRL+b [, is this correct? I've made an experiment here and left tmux in this mode for several minutes, and nothing happened. I'm thinking that maybe there is some other component influencing/causing this behaviour. For example, are you using some terminal application (like mate-terminal, gnome-terminal, xterm, etc.)? If yes, are you using its default configuration? Also, could you share your tmux configuration?

I happen to use tmux in my Focal machine as well, and I have never experienced this problem.

Since there is not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu, I
am marking this bug as "Incomplete". We would be grateful if you would:
provide a more complete description of the problem, explain why you
believe this is a bug in Ubuntu rather than a problem specific to your
system, and then change the bug status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

Changed in tmux (Ubuntu):
status: New → Incomplete
Revision history for this message
gregrwm (gregrwm) wrote :
Download full text (3.2 KiB)

Yes indeed copy mode as per the manpage, which i use frequently not for copy paste but simply for review. And yes i typically run tmux in an xterm.

i haven't tweaked or created any config files for either xterm or tmux. For xterm i use the following variables and aliases, occasionally the xt alias for starting an additional xterm, but more typically just the x alias to start X with a single xterm (from which i launch a window manager according to preference or need, usually twm, occasionally openbox).

      xk='xterm -bg black -fg white -xrm "*"'charClass:33:48,37-38:48,43:48,45-47:48,58:48,63-64:48,92:48,94:48,126:48 #doubleclick group ! %& + -./ : ?@ \ ^ ~
      xt=$xk\ -rightbar #xk knoppix rxvt no -rightbar
alias xt="$xt&"
alias xk="$xk&"
alias x='startx /usr/bin/$xt'

For tmux i just use the following aliases, all 5 are identical except for setting the escape char to one of ^a ^q ^b ^x ^e, which i use for stacking sessions (eg my phone on the first level, ssh to my laptop on the next level, ssh to a server on the next level, ssh to other servers on the next level, etc).

alias ta='tmux h 2>/dev/null||tmux new -d;tmux bi w choose-w 2>/dev/null||tmux bi w choose-t -w;tmux set status off\; set visual-b on\; set display-t 9999\; set prefix ^A\; bi ^A last\; bi a send-p\; bi k killp\; bi . detac\; bi _ sp\; bi \| sp -h\; bi \" set status\; bi Tab selectp -t :.+\; a -d'
alias tq='tmux h 2>/dev/null||tmux new -d;tmux bi w choose-w 2>/dev/null||tmux bi w choose-t -w;tmux set status off\; set visual-b on\; set display-t 9999\; set prefix ^Q\; bi ^Q last\; bi q send-p\; bi k killp\; bi . detac\; bi _ sp\; bi \| sp -h\; bi \" set status\; bi Tab selectp -t :.+\; a -d'
alias tb='tmux h 2>/dev/null||tmux new -d;tmux bi w choose-w 2>/dev/null||tmux bi w choose-t -w;tmux set status off\; set visual-b on\; set display-t 9999\; set prefix ^B\; bi ^B last\; bi b send-p\; bi k killp\; bi . detac\; bi _ sp\; bi \| sp -h\; bi \" set status\; bi Tab selectp -t :.+\; a -d'
alias tx='tmux h 2>/dev/null||tmux new -d;tmux bi w choose-w 2>/dev/null||tmux bi w choose-t -w;tmux set status off\; set visual-b on\; set display-t 9999\; set prefix ^X\; bi ^X last\; bi x send-p\; bi k killp\; bi . detac\; bi _ sp\; bi \| sp -h\; bi \" set status\; bi Tab selectp -t :.+\; a -d'
alias te='tmux h 2>/dev/null||tmux new -d;tmux bi w choose-w 2>/dev/null||tmux bi w choose-t -w;tmux set status off\; set visual-b on\; set display-t 9999\; set prefix ^E\; bi ^E last\; bi e send-p\; bi k killp\; bi . detac\; bi _ sp\; bi \| sp -h\; bi \" set status\; bi Tab selectp -t :.+\; a -d'

One prospect is the bug might be related to window size change (it's one of the reasons i prefer tmux, screen will immediately drop copy mode in response to a window size change, thankfully tmux doesn't). i recall several occurrences happening very soon after returning to a window from another. in the meantime i might have changed the xterm size, or reattached from my phone, or rotated the phone... But i think i've also seen it happen without any window size change, can't promise tho, i'll wa...

Read more...

Revision history for this message
gregrwm (gregrwm) wrote :

Caught centos8 tmux (2.7-1.el8.x86_64) a couple times dropping out of copy mode apparently in response to window size changes while showing a different tmux window, tho now when i repeat what i thought was the trigger sequence i can't repeat it again. Of course i was hoping to catch focal tmux in the act of dropping out of copy mode, but not yet today.

Meanwhile i do observe focal tmux (3.0a-2ubuntu0.1) oddly changing the window size by one line and changing it right back again in response to window size changes while showing a different tmux window. to wit:

 $ alias ws='c=;while ((c==COLUMNS&&l==LINES))||{ c=$COLUMNS l=$LINES;echo $(date +%F%a%T) ${l}x$c;};do sleep .05;done' #track window size changes
 $ ws
2020-11-04Wed15:43:52 57x226
2020-11-04Wed15:44:00 24x80
2020-11-04Wed15:44:01 57x226
2020-11-04Wed15:44:15 56x226
2020-11-04Wed15:44:15 57x226

'24x80' was when i unmaximized the xterm, and '57x226' when i remaximized it a second later, without changing the tmux window meanwhile. However then i switched to show a different tmux window, unmaximized, remaximized, and then when i switched the tmux window back, you see the odd little dance where tmux changes by one line to '56x226' and immediately back to '57x226'.

Revision history for this message
Paride Legovini (paride) wrote :

Hello and thanks for the additional information.

I tried to reproduce the issue but with no success. I could observe the "window size dance" you described by doing a detach/resize/resize-back/attach, but I can't tell if it could be related to tmux dropping out from copy mode.

An interesting data point could be checking if tmux from Groovy or Hirsute also show the problem. If it does not that it means that it has been fixed (likely upstream) between those releases, and we can start looking at the commit history or bisecting to find out what fixed it.

You could also try to compile tmux from source and see if the latest version from git [1] also has the problem. If it does, what I suggest is to file an upstream bug. Personally I'd go this route. If you do file an upstream bug please link it to this bug report. Thanks!

[1] https://github.com/tmux/tmux

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for tmux (Ubuntu) because there has been no activity for 60 days.]

Changed in tmux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
gregrwm (gregrwm) wrote :

i just saw this happen on tmux-3.1b-x86_64.AppImage (from https://github.com/tmux/tmux/wiki/Installing at "Prebuilt AppImage packages") so i'll report it there.

Revision history for this message
gregrwm (gregrwm) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.