Skip to content

pane-scrollbars causes server CPU spin with mixed TTY and PTY clients #5015

@jeffguy77

Description

@jeffguy77

Version

tmux 3.6a, Linux 6.19.11 (Arch Linux)

Description

When pane-scrollbars is enabled and two clients are attached to the same session from different terminal types (a linux TTY and a desktop PTY), the tmux server process enters a busy loop at 60%+ CPU.

Steps to reproduce

  1. Enable scrollbars: set -g pane-scrollbars on
  2. Start a tmux session on a linux TTY (e.g. /dev/tty3, TERM=linux)
  3. Switch to the desktop (Ctrl+Alt+F7 or equivalent)
  4. Attach a second client from a PTY terminal (e.g. WezTerm, xterm): tmux attach -t <session>
  5. The tmux server process immediately begins consuming 60%+ CPU and the session becomes unresponsive

Expected behavior

The server should render to both clients without spinning, downgrading scrollbar output for terminals that don't support it.

Observed behavior

The server process state changes from Ss (sleeping) to Rs (running) and CPU usage climbs continuously. The session becomes frozen/unresponsive. tmux kill-server hangs and the server must be killed with kill -9.

Workaround

Disabling pane-scrollbars (set -g pane-scrollbars off) eliminates the issue. With scrollbars off, multiple clients of mixed terminal types coexist without any CPU spin.

Notes

  • Occurs regardless of how the second client connects (attach, new-session -A, or session groups via new-session -t)
  • The direction doesn't matter (TTY first then PTY, or PTY first then TTY)
  • aggressive-resize on is set but does not contribute to the issue; the spin is caused solely by pane-scrollbars
  • All other tmux features work correctly with mixed clients when scrollbars are disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions