You are not logged in.

#1 2010-01-13 22:47:48

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Resuming from suspend breaks function key on laptop

I have an Asus K40IN laptop.  Up until a few days ago, suspending worked perfectly.  However, now when I resume from suspend, my function key no longer works.  I use it for some global shortcuts like play/pause, volume up/down, brightness up/down, etc.  I checked in xev, and it's actually registering no key press at all.  However, if I press it twice quickly, it will start registering infinite presses of the d key (keycode 43).  This also completely incapacitates the keyboard -- many keys do not do what they should.  It stops if I press the actual d key once.

I'm guessing the most likely cause is a recent update.  Here's my recent /var/log/pacman.log:

[2010-01-08 14:45] upgraded kernel26-firmware (2.6.32.2-2 -> 2.6.32.3-1)
[2010-01-08 14:45] >>> Updating module dependencies. Please wait ...
[2010-01-08 14:45] >>> MKINITCPIO SETUP
[2010-01-08 14:45] >>> ----------------
[2010-01-08 14:45] >>> If you use LVM2, Encrypted root or software RAID,
[2010-01-08 14:45] >>> Ensure you enable support in /etc/mkinitcpio.conf .
[2010-01-08 14:45] >>> More information about mkinitcpio setup can be found here:
[2010-01-08 14:45] >>> http://wiki.archlinux.org/index.php/Mkinitcpio
[2010-01-08 14:45] 
[2010-01-08 14:45] >>> Generating initial ramdisk, using mkinitcpio.  Please wait...
[2010-01-08 14:45] ==> Building image "default"
[2010-01-08 14:45] ==> Running command: /sbin/mkinitcpio -k 2.6.32-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
[2010-01-08 14:45] :: Begin build
[2010-01-08 14:45] :: Parsing hook [base]
[2010-01-08 14:45] :: Parsing hook [udev]
[2010-01-08 14:45] :: Parsing hook [autodetect]
[2010-01-08 14:45] :: Parsing hook [pata]
[2010-01-08 14:45] :: Parsing hook [scsi]
[2010-01-08 14:45] :: Parsing hook [sata]
[2010-01-08 14:45] :: Parsing hook [lvm2]
[2010-01-08 14:45] :: Parsing hook [filesystems]
[2010-01-08 14:45] :: Generating module dependencies
[2010-01-08 14:45] :: Generating image '/boot/kernel26.img'...SUCCESS
[2010-01-08 14:45] ==> SUCCESS
[2010-01-08 14:45] ==> Building image "fallback"
[2010-01-08 14:45] ==> Running command: /sbin/mkinitcpio -k 2.6.32-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
[2010-01-08 14:45] :: Begin build
[2010-01-08 14:45] :: Parsing hook [base]
[2010-01-08 14:45] :: Parsing hook [udev]
[2010-01-08 14:45] :: Parsing hook [pata]
[2010-01-08 14:46] :: Parsing hook [scsi]
[2010-01-08 14:46] :: Parsing hook [sata]
[2010-01-08 14:46] :: Parsing hook [lvm2]
[2010-01-08 14:46] :: Parsing hook [filesystems]
[2010-01-08 14:46] :: Generating module dependencies
[2010-01-08 14:46] :: Generating image '/boot/kernel26-fallback.img'...SUCCESS
[2010-01-08 14:46] ==> SUCCESS
[2010-01-08 14:46] upgraded kernel26 (2.6.32.2-2 -> 2.6.32.3-1)
[2010-01-08 14:46] upgraded zlib (1.2.3.3-3 -> 1.2.3.4-3)
[2010-01-09 03:18] synchronizing package lists
[2010-01-09 03:19] starting full system upgrade
[2010-01-09 03:44] warning: /etc/arno-iptables-firewall/firewall.conf installed as /etc/arno-iptables-firewall/firewall.conf.pacnew
[2010-01-09 03:44] upgraded arno-iptables-firewall (1.9.2g-1 -> 1.9.2h-1)
[2010-01-09 20:46] synchronizing package lists
[2010-01-09 20:47] starting full system upgrade
[2010-01-09 20:47] starting full system upgrade
[2010-01-10 03:06] synchronizing package lists
[2010-01-10 03:06] starting full system upgrade
[2010-01-10 03:08] In order to use the new nvidia module, exit Xserver and unload it manually.
[2010-01-10 03:08] upgraded nvidia (190.53-1 -> 190.53-3)
[2010-01-10 03:32] synchronizing package lists
[2010-01-10 03:32] starting full system upgrade
[2010-01-10 03:32] upgraded nvidia (190.53-3 -> 190.53-3)
[2010-01-10 16:05] synchronizing package lists
[2010-01-10 16:06] starting full system upgrade
[2010-01-10 22:50] synchronizing package lists
[2010-01-10 22:50] starting full system upgrade
[2010-01-10 22:50] starting full system upgrade
[2010-01-10 22:50] upgraded freeglut (2.4.0-4 -> 2.6.0-1)
[2010-01-10 22:51] upgraded kid3 (1.2-1 -> 1.3-1)
[2010-01-10 23:16] upgraded x264-git (20100107-1 -> 20100110-1)
[2010-01-10 23:20] upgraded ffmpeg-svn (21082-1 -> 21132-1)
[2010-01-10 23:27] upgraded mplayer-mt-git (20100107-1 -> 20100110-1)
[2010-01-10 23:39] upgraded amarok-git (20100107-1 -> 20100110-1)
[2010-01-10 23:39] upgraded depot_tools-svn (35767-1 -> 35900-1)
[2010-01-11 00:25] upgraded chromium-svn (35770-1 -> 35902-1)
[2010-01-11 02:19] installed speedcrunch (0.10.1-1)
[2010-01-11 06:01] synchronizing package lists
[2010-01-11 06:01] starting full system upgrade
[2010-01-11 15:12] synchronizing package lists
[2010-01-11 15:13] starting full system upgrade
[2010-01-11 15:14] upgraded x264-git (20100110-1 -> 20100111-1)
[2010-01-11 15:16] upgraded ffmpeg-svn (21132-1 -> 21152-1)
[2010-01-11 15:19] upgraded mplayer-mt-git (20100110-1 -> 20100111-1)
[2010-01-11 17:04] synchronizing package lists
[2010-01-11 17:04] starting full system upgrade
[2010-01-11 17:04] starting full system upgrade
[2010-01-11 17:04] upgraded qtcurve-gtk2 (1.0.0-1 -> 1.0.1-1)
[2010-01-12 15:32] synchronizing package lists
[2010-01-12 15:33] starting full system upgrade
[2010-01-12 15:33] starting full system upgrade
[2010-01-12 15:34] upgraded dhcpcd (5.1.3-1 -> 5.1.4-1)
[2010-01-12 15:34] upgraded live-media (2009.09.28-2 -> 2010.01.11-1)
[2010-01-12 15:34] upgraded strigi (0.7.0-1 -> 0.7.1-1)

Any ideas?

Offline

#2 2010-01-15 00:47:55

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

Does anyone have a clue about this?  My suspending is more or less broken with this bug.

Offline

#3 2010-01-15 23:43:42

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

One more bump...

Offline

#4 2010-01-16 01:03:06

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Resuming from suspend breaks function key on laptop

No, I'm sorry, I don't know why it's broken.

If you can find the command that initializes those keys (for example, however it is setup at boot time), then you can easily add code to disable just before the computer suspends, and add code to enable it again as soon as it wakes up.

If you can find an "/etc/rc.d/[file]" command that would disable and enable the keys, then it would be super duper easy. big_smile

Offline

#5 2010-01-17 15:50:43

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

Well I still haven't been able to fix it, but here's what I've figured out:

- Some of the buttons (for example brightness adjust and turn screen off) do not have keycodes.  They seem to work directly through the bios, not through the operating system.  Other buttons (like volume control) do have keycodes, and do work through the OS.
- If I unload the kernel module asus_laptop, the OS-dependent buttons stop working, but the others continue to work.
- When I suspend and resume, all the buttons stop working.
- Putting asus_laptop in SUSPEND_MODULES for pm-utils does not help.
- Using s2ram from uswsusp does not help.
- After a suspend and resume (so the buttons are all broken), when I press a button twice and start getting infinite presses of d, I get the following message in dmesg:

Jan 17 10:45:53 firefly kernel: atkbd.c: Unknown key released (translated set 2, code 0xe1 on isa0060/serio0).
Jan 17 10:45:53 firefly kernel: atkbd.c: Use 'setkeycodes e061 <keycode>' to make it known.

I tried running the suggested command using a keycode for a volume button, but it didn't help.  It did stop this message from coming up in dmesg for that particular button, but the other behaviors were the same.

I can't think of anything else to do to fix it.  Does this mean anything to anyone?

Offline

#6 2010-01-17 20:52:30

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

Some more information:

Using acpi_listen, before a suspend all the hotkeys produce acpi events.  After a suspend and resume, no events are detected.  It appears that some part of acpi is not properly reinitialized on resume.  I tested "acpi=off" in my kernel parameters, and though it messed up a number of things, one thing was it broke the hotkeys.  I checked dmesg after a resume but saw nothing relevant to acpi.

Offline

#7 2010-01-17 21:43:17

damjan
Member
Registered: 2006-05-30
Posts: 453

Re: Resuming from suspend breaks function key on laptop

try adding "button" module to SUSPEND_MODULES... or any of the other modules you have.
the output of "lsmod" might help here

Offline

#8 2010-01-17 23:24:50

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

Adding button to SUSPEND_MODULES doesn't work.  Or any acpi modules.  I've been examining lsmod extensively but there's not much there.  asus_laptop appears to be the only related module.  Moreover, lsmod is exactly the same after a suspend/resume as beforehand.

Offline

#9 2010-01-20 01:57:58

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

I still haven't been able to figure this out.  I've found various things that seem to be similar, but not the same problem.  None of it has helped.  I tried updating my bios, but it didn't help.

Should I file a bug report somewhere?

Offline

#10 2010-01-22 18:08:10

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

Still no progress here.  Here's a list of all the function keys, what they do, and if they're broken after suspend:

broken keys
---------------
Fn+F1 = sleep
Fn+F2 = wifi
Fn+F5 = decrease brightness
Fn+F6 = increase brightness
Fn+F7 = screen off
Fn+F10-12 = volume keys
Fn+Insert = num lock
Fn+Delete = scroll lock
Fn+Arrows = media keys

keys that still work
---------------------
Fn+F8 = tv out
Fn+Space,C,V = not sure
Fn+Numpad

I would be ok with simply rebinding the keys to something else, but unfortunately my brightness is NOT controlled through the OS.  The keys control it DIRECTLY.  So with the keys broken, I can't adjust my screen brightness at all!  Is there some way I can send acpi events, such as

hotkey ATKD 00000027 00000001

which I got from acpi_listen.

If anyone has even the slightest idea, PLEASE PLEASE say something.  I've been working with this for a week and I am no closer to a resolution.  Any help AT ALL would be greatly appreciated!

Last edited by noahsark1126 (2010-01-22 18:08:34)

Offline

#11 2010-01-22 23:17:52

damjan
Member
Registered: 2006-05-30
Posts: 453

Re: Resuming from suspend breaks function key on laptop

So with the keys broken, I can't adjust my screen brightness at all!

have you tried rmmod-ing „video" *before* suspend and modprobe-ing *after* resume

Offline

#12 2010-01-23 01:10:52

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

damjan wrote:

have you tried rmmod-ing „video" *before* suspend and modprobe-ing *after* resume

Video doesn't seem to be loaded.  I tried loading it after resuming, but it didn't do anything.  Should it give me some way to control the brightness?  Maybe I just don't know what it is...

I did notice this line in dmesg from boot time:

asus_laptop: Brightness ignored, must be controlled by ACPI video driver

Is that relevant?

Offline

#13 2010-03-13 11:50:35

bfo
Member
Registered: 2009-11-27
Posts: 44

Re: Resuming from suspend breaks function key on laptop

I confirm the same issue for ASUS-K50IN laptop.
kernel26: 2.6.32.9-1
xorg-server: 1.7.5.901-2.
Every possible solution already mentioned doesn't work on my hardware either.

Last edited by bfo (2010-03-13 11:53:12)

Offline

#14 2010-03-13 17:23:55

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

I also still have not found a solution.

Offline

#15 2010-03-23 16:19:26

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

So, I still have not solved this, but I have found a pretty good workaround.  The first thing to do is add

acpi_backlight=vendor acpi_enforce_resources=lax

to the end of your kernel line in grub.  This will allow you to control the brightness through a couple files in /sys.  Then copy this into an executable file

#!/bin/bash

adj_brightness () {
  cd /sys/devices/platform/asus_laptop/backlight/asus_laptop
  current=`cat brightness`
  max=`cat max_brightness`

  [[ "$1" == "up" && $current != $max ]] && echo $(( current+1 )) > brightness
  [[ "$1" == "down" && $current != 0 ]] && echo $(( current-1 )) > brightness
}

case $1 in
  up) adj_brightness up ;;
  down) adj_brightness down ;;
  *) exit 1 ;;
esac

Now edit your sudoers file and make this file passwordless.  Then bind some global keys to "sudo name_of_script.sh up" and "sudo name_of_script.sh down" (for example, I chose Meta+F5 and Meta+F6).

That should do the trick.  You could also bind new global keys for the volume/multimedia keys or whatever.  Personally, I made all the keys the same as before, except I press Meta instead of function.  That way I hardly even notice the difference.  Hope this helps.

Offline

#16 2010-03-23 17:07:07

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Resuming from suspend breaks function key on laptop

To those affected by this, have you tried to downgrade the kernel to the last working version?  If that fixes the issue, have a look around google for similar problems and, if necessary make a bug report/mailing list post about the issue upstream.  It's likely something in the latest kernel that broke.


thayer williams ~ cinderwick.ca

Offline

#17 2010-03-23 20:10:56

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

Downgrading to 2.6.31.6 fixes the problem.  No version of 2.6.32 works.  However I also had to downgrade nvidia due to dependency issues, so it's possible (though unlikely) that was the actual cause.

I can't find anything on google that seems related.  Where would be an appropriate place to file a bug report?

Offline

#18 2010-03-27 16:40:14

bfo
Member
Registered: 2009-11-27
Posts: 44

Re: Resuming from suspend breaks function key on laptop

To which version have you downgraded nvidia?

Offline

#19 2010-03-27 16:43:03

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

I went from 190.53 to 190.42.

Offline

#20 2010-04-01 16:37:47

bfo
Member
Registered: 2009-11-27
Posts: 44

Re: Resuming from suspend breaks function key on laptop

Downgrading kernel to 2.6.31.6 causes the loss of all input ability after wakeup. I give up. Maybe it's better to wait for 2.6.33.x to go into core.

Offline

#21 2010-04-01 18:29:29

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

Yea that's basically where I'm at too.

Offline

#22 2010-04-04 15:15:20

zoke
Member
Registered: 2010-03-15
Posts: 18

Re: Resuming from suspend breaks function key on laptop

Have you concluded that it is impossible for your Fn keys to work after resume ? I am experiencing the same problem on a Lenovo G550. It appears my keys are bios controlled like yours.

Offline

#23 2010-04-04 16:07:51

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: Resuming from suspend breaks function key on laptop

Yea, that's my problem too.

Offline

#24 2010-04-05 01:45:32

zoke
Member
Registered: 2010-03-15
Posts: 18

Re: Resuming from suspend breaks function key on laptop

noahsark1126, I on a whim went on [testing] right now and unfortunately the problem is not fixed either. So unfortunately there is no fix in .33. Does anyone know how to narrow down where the problem is so a proper bug report can be filed ?

EDIT: have you tried running the command 'vbetool vbefp getbrightness' ?

Last edited by zoke (2010-04-05 02:36:48)

Offline

#25 2010-04-05 21:54:34

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Resuming from suspend breaks function key on laptop

noahsark1126 wrote:

Yea, that's my problem too.

What about restaring HAL on resume?
http://wiki.archlinux.org/index.php/Pm- … _on_resume
It worked with extra keys on my HP dv2000.

Last edited by Leonid.I (2010-04-05 21:55:09)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB