Skip to content

dwm hangs on ctrl+z-like hotkeys #434

@myrrc

Description

@myrrc

Hi!
Not quite confident what's the cause, or whether the cause is related to dwm,
but maybe you could give me a hint. I'm using dwm (latest master) with the
following patches:

git diff --no-color origin/master -- patches.def.h | grep +#define
+#define CENTER_TRANSIENT_WINDOWS_PATCH 1
+#define COOL_AUTOSTART_PATCH 1
+#define DECORATION_HINTS_PATCH 1
+#define LOSEFULLSCREEN_PATCH 1
+#define NOBORDER_PATCH 1
+#define TOGGLEFULLSCREEN_PATCH 1
+#define MONOCLE_LAYOUT 0

The following key bindings are defined:

alt + asdf - focus monitor
win + asdf - move to monitor
alt + g - spawn dmenu
alt + enter - spawn st
alt + r - spawn maim
alt + k - cycle focus previous window in stack
alt + j - cycle focus next window in stack
win + shift + q - kill client
alt + e - toggle floating
alt + m - toggle fullscreen

As a terminal emulator I use st (also latest master) with the following patches:

+#define BOXDRAW_PATCH 1
+#define CLIPBOARD_PATCH 1
+#define COPYURL_HIGHLIGHT_SELECTED_URLS_PATCH 1
+#define DYNAMIC_CURSOR_COLOR_PATCH 1
+#define HIDECURSOR_PATCH 1
+#define KEYBOARDSELECT_PATCH 1
+#define LIGATURES_PATCH 1
+#define REFLOW_PATCH 1
+#define SIXEL_PATCH 1
+#define WIDE_GLYPHS_PATCH 1

My main use case of st is launching it with /bin/bash, spawning some processes
and suspending them via Ctrl+z. Sometimes, possibly when I mis-press Ctrl+z,
dwm hangs with the following pattern:

  • terminal window stops being re-drawn and instead gets filled with background
    color only. It doesn't react to any input, including killclient,
    image of how it looks: https://ibb.co/wMB0S66.
  • When I re-focus to other terminal windows, they also stop being redrawn.
    At this point, killall st launched from dmenu sometimes helps -- all
    terminals are killed, but other windows become fully functional.
  • If I try to launch st with /bin/sh or xterm with any of these two shells,
    only a background color is drawn, no reaction to input.
  • Other windows like Telegram or Firefox remain functional for a while, but
    after some time they also degrade to (1). At this point neither killall dwm
    or killall Xorg work, the only option is to restart the computer.
    They don't "work" in the sense the login window isn't shown, but rather just
    a blank screen with a cursor.
  • What's strange is that after (4) switching to other TTY (Ctrl+Alt+F3-4-5)
    doesn't work either.

I suppose it's dwm and not an st issue as, afaik multiple st instances don't
share anything so issue with one st wouldn't affect other applications.
I've tried building and launching dwm with debug info, killing it to generate a
coredump, and changing xsessions file to redirect dwm log, but no useful info
was found.

OS: Debian 13 trixie
Xorg: 1:7.7+23.1
Login manager: none, x11 is started in .bash_profile:

[[ -z $DISPLAY ]] && exec startx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions