Restoring keyboard settings in Xorg environment after suspending
The problem was resolved by adding a custom script /etc/pm/sleep.d/00-keyboard
that executes (not only) on system resume:
#!/bin/bashcase $1 in hibernate) # Going to suspend to disk ;; suspend) # Going to suspend to RAM ;; thaw) # Resuming after hibernating ;; resume) # Resuming after suspending echo "Restoring keyboard settings..." /opt/scripts/keyboard.sh ;; *) echo "Something went wrong" ;;esac
For more information see https://wiki.archlinux.org/index.php/Pm-utils#Creating_your_own_hooks