1

Sometimes Emacs stops responding to keyboard input. It responds to mouse input though. If I do killall -s SIGUSR2 emacs, the debugger shows this (but remains unresponsive to keyboard):

Debugger entered--entering a function:
* company-pre-command()
  recursive-edit()
  debug(lambda)
* company-pre-command()
  recursive-edit()
  debug(lambda)
* eldoc-pre-command-refresh-echo-area()

This happens every few days and I end up having to kill emacs and restart. How can I fix it?


GNU Emacs 26.1 running emacsclient

Ubuntu 18.04

system-configuration-options: "--build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib --program-suffix=26 --with-modules --with-file-notification=inotify --with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-xwidgets --with-lcms2 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs26-pCvJBp/emacs26-26.1~1.git07f8f9b=. -fstack-protector-strong -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie'"

system-configuration-features: "XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS XWIDGETS LIBSYSTEMD LCMS2"

  • @phils How do I check? – Hatshepsut Aug 20 at 0:15
  • 1
    I've encountered this on a handful of occasions (certainly not as frequently as yourself). For me it affected GUI frames only, so emacsclient -nw still takes keyboard input. You may be able to restore GUI functionality by creating a terminal frame and then deleting all other frames, and only then creating a new GUI frame -- I'm not 100% sure of that process though, as my results were inconsistent. If the server was started with emacs --daemon then you may need to delete the (hidden) frame which was created when the daemon started. – phils Aug 20 at 0:20
  • 1
    I'm not sure I've seen this with 26.2 come to think of it, so potentially a solution is to upgrade. – phils Aug 20 at 0:22
  • 1
    FWIW I compile --with-x-toolkit=lucid and you're using gtk3 so presumably the issue is not specific to any particular X toolkit. – phils Aug 20 at 3:53
  • This smells like a UI bug. If I were to guess, a popup window (window in the UI sense) is being instantiated, but not actually rendered, cutting off your ability to dismiss it. Based on your debug output, it's possibly a company completion popup. Try disabling these popups, If the frequency of your freezes decreases, great, we're on the right track. If not, then I was totally wrong. ;) – nega Aug 20 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.