Comment 23 for bug 998310

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

I noticed this on Debian (buster). It appears to be caused by the keyboard being detected multiple times, resulting in xfsettingsd running xmodmap multiple times. To monitor, run:

  XFSETTINGSD_DEBUG=1 xfsettingsd --replace --no-daemon

After suspend/resume (or just unplug/plug the USB keyboard), xfsettingsd launches xmodmap multiple times:

xfce4-settings(keyboard-layout): spawning "xmodmap /home/user/.Xmodmap"
xfce4-settings(keyboard-layout): New keyboard detected; restoring XKB settings.
Warning: Only changing the first 3 of 10 buttons.
xfce4-settings(keyboard-layout): spawning "xmodmap /home/user/.Xmodmap"
xfce4-settings(keyboard-layout): New keyboard detected; restoring XKB settings.
Warning: Only changing the first 3 of 10 buttons.
xfce4-settings(keyboard-layout): spawning "xmodmap /home/user/.Xmodmap"
Warning: Only changing the first 3 of 10 buttons.
xfce4-settings(keyboard-layout): New keyboard detected; restoring XKB settings.
xfce4-settings(keyboard-layout): spawning "xmodmap /home/user/.Xmodmap"
xfce4-settings(keyboard-layout): New keyboard detected; restoring XKB settings.
xfce4-settings(keyboard-layout): spawning "xmodmap /home/user/.Xmodmap"
xfce4-settings(keyboard-layout): New keyboard detected; restoring XKB settings.

As a test, doing:

  for x in {1..10}; do bash -c 'xmodmap ~/.Xmodmap &'; done

Has similar results of high CPU in xorg and xmodmap.