I have been running OpenSUSE on a System 76 Darter laptop for the last several years on OpenSUSE 13.1, 13.2 and now Leap 42.1. I have never had a problem and everything has worked perfectly until last week when the keyboard stopped working properly after resuming from sleep/suspend (probably because of a software update). Something wonky is going on with the keyboard, however, I am able to get the keyboard to start working properly by pressing the Num Lock key twice. Pressing the Num Lock key once puts the keyboard into Num Lock mode and pressing it again turns Num Lock off and goes back to "regular" mode. It appears that the only keys affected by this are the Num Lock character keys such as I, J, K, M, etc. As best as I can tell, those keys appear to be generating an escaped sequence following resume from suspend until I press the Num Lock key twice. My login screen is presented upon resume from suspend and so I cannot determine what characters these keys are generating. Very odd....

So, any ideas on how to fix this? I think that systemd will execute a script on resume from suspend if you put the script in /usr/lib/systemd/system-sleep. Therefore, I created the following script as /usr/lib/systemd/system-sleep/numlock.sh:

#! /bin/sh
numlockx on
numlockx off
I set the file to be executable with chmod a+x, however, it doesn't work to fix this problem. Any suggestions would be appreciated.