4

I recently upgraded my system (nixos unstable), and I now run plasma6 (tried on both wayland and x11)… unfortunately, since the upgrade, emacs hangs for a few seconds really regularly while writing, moving the cursor etc. I tried emacs 28.2 and 29.4, using the gtk and lucid, and the bug is present in both. Interestingly, the bug is also present without any configuration, i.e. when I run it with -Q.

Any idea what is wrong here?

I don't know if this is related, but when I run emacs 28 I have an error:

$ emacs -Q /nix/store/isvpgnnhm3zqh2j2nw6r3f1704590cq0-gvfs-1.54.2/lib/gvfs/libgvfscommon.so: undefined symbol: g_once_init_leave_pointer Failed to load module: /nix/store/isvpgnnhm3zqh2j2nw6r3f1704590cq0-gvfs-1.54.2/lib/gio/modules/libgvfsdbus.so 

but his error is no present when I run the 29 (lucid) version.

3
  • Consider sending in a bug report with M-x report-emacs-bug - no guarantee that it will be fixed, but the report might provide a center for discussion and possible suggestions that might help resolve the bug (if bug it is). Commented Nov 22, 2024 at 15:32
  • You might also report it on a NixOS channel and see if anybody else has run into it. Commented Nov 22, 2024 at 15:33
  • Using a program like htop, check the status of the emacs process when the freeze is happening. Make sure it is not in the "disk sleep" state (or a similar blocking state). Also, maybe it will be useful to run emacs with strace. Commented Dec 3, 2024 at 11:55

1 Answer 1

3

After some investigation (thanks Eli Zaretskii on the emacs ML), there is a known emacs bug that make emacs hang when using XIM, with a simple workaround that work greatly. From https://github.com/emacs-mirror/emacs/blob/master/etc/PROBLEMS:

** Emacs hangs when using XIM This is due to an old bug in the implementation of the X protocol's XIM transport: when an input method crashes for some reason, Xlib cannot recover. Emacs cannot do anything about this except wait for input method developers to fix their crashes. You can work around these problems by disabling XIM in your X resources: Emacs.useXIM: false […] In your ~/.Xresources file, then run $ xrdb ~/.Xresources And restart Emacs. 

See also https://github.com/NixOS/nixpkgs/issues/361457

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.