Home > ubuntu > After waking up from suspend, the keyboard doesn’t work properly

After waking up from suspend, the keyboard doesn’t work properly

This is not specific to Ubuntu 13.04; I had this problem before too. That is, after waking up the machine from a suspend, the keyboard doesn’t work properly. Not all key presses are accepted, only about 70% of them. Hitting the keys stronger helps but I don’t want to break the keyboard :)

I’ve found a stupid workaround but it works :) It’s a USB keyboard and pulling out the cable and reconnecting it fixes the issue. If someone has a more elegant solution, please tell me.

  1. Jaume
    April 29, 2013 at 10:30

    Updating to a version that is supported for only 8 months does not seem to be the wise option, aafter all. Thanks for your comments, I will stick to my current version until 13.10 is finally released.

    • April 29, 2013 at 11:46

      They are supported for 9 months actually. For me it’s OK, I like living on the edge and I update as soon as possible. But the upgrade process is not always a huge success (like in the case of 13.04 for instance…)

  2. April 30, 2013 at 22:34

    From this [http://goo.gl/DZqzY] site you can get the information how to run a script when your computer wakes up. We need to use the external application ‘xinput‘, to get the needed results.

    First find out the ID of the input device, in our case the keyboard:

    $ xinput --list

    Then we put the following lines into the /etc/pm/sleep.d/01_keyboard_hack resume case:

    xinput set-int-prop  "Device Enabled" 8 0 # Disable
    xinput set-int-prop  "Device Enabled" 8 1 # Enable
    • April 30, 2013 at 23:07

      Thanks Devilirium, it’s an excellent idea. With xinput I managed to disable/enable the keyboard. I put the patch script in the sleep.d directory but after waking up from a suspend I still have the same problem :(


      Here is how I tested disabling/enabling the keyboard:

      xinput set-prop 11 "Device Enabled" 0; sleep 5; xinput set-prop 11 "Device Enabled" 1

      Where 11 is the keyboard’s ID according to “xinput --list“.

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: