Bug 448004

Summary: asus-laptop doesn't use the input layer to report events
Product: [openSUSE] openSUSE 11.1 Reporter: Matti Kukkola <matti.kukkola>
Component: KernelAssignee: Thomas Renninger <trenn>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dnascimento, jrobiso2, suse, trenn, werner.habel
Version: Beta 5   
Target Milestone: ---   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Results
lsmod
acpi_listen
[PATCH 01/02] Initial work to let ACPI buttons work over INPUT layer
[PATCH 02/02] Reworked input layer and add more keys
result of insmod
[PATCH 01/02] Initial work to let ACPI buttons work over INPUT layer (rebased)
[PATCH 02/02] Reworked input layer and add more keys (rebased)

Description Matti Kukkola 2008-11-23 15:52:16 UTC
I had this same error when I used Ubuntu before this. I have Fn-button and when I press this I can set my sound: F10 sound on/sound off, F11 volume down, F12 volume up. My laptop is Asus M6000 and keyboard is finnish qwerty. I don't have calculator number keys only local number keys. I know you need more data about my laptop. I don't find it because I haven't used SuSE-webpages very much. And I have to go to Win XP every time when I want to report a bug because wireless network doesn't work.
Comment 1 Timo Hoenig 2008-11-24 08:36:37 UTC
Matti, can you please post the output of

$ lshal -m

while pressing the hotkeys?

Do you use KDE or GNOME?

Please file a separate bug report for the wireless issue.

Thank you!
Comment 2 Matti Kukkola 2008-11-24 09:49:20 UTC
Created attachment 254665 [details]
Results

Hello,

I'm using KDE. Sounds worked sometimes when I load Desktop, sometimes not. KDE is messaging "changing HDA Intel to default" or something after it, when it didn't work. Sounds volume is very low and because of this I tried to set it.

You can see results Fn-button isn't recognized.

Regards Matti
Comment 3 Timo Hoenig 2008-11-24 09:51:06 UTC
Can you confirm that asus-laptop is loaded?

$ lsmod |grep asus-laptop
Comment 4 Matti Kukkola 2008-11-24 17:18:28 UTC
Created attachment 254894 [details]
lsmod

Hello,

Sorry, I had Thesis presentation. You can see I haven't got asus-laptop module if you check attachment.

Regards Matti
Comment 5 Timo Hoenig 2008-11-24 17:25:11 UTC
Ah, actually it's loaded (asus_laptop, not asus-laptop -- my fault).  I took a short look at the driver.  It doesn't seem to be prepared to use the input layer yet.

Can you please verify that you see events when running

$ acpi_list

and press the keys?
Comment 6 Matti Kukkola 2008-11-24 17:49:56 UTC
Created attachment 254901 [details]
acpi_listen

Hello, this is report.

Thank you

Matti
Comment 7 Timo Hoenig 2008-11-24 18:22:44 UTC
Thanks, Matti.

It really looks like the ASUS driver hasn't been adopted to use the input layer.  I guess this is an enhancement but I'll leave the severity untouched and and let the kernel developers decide on how to proceed.

Adjusting summary.
Comment 8 Timo Hoenig 2008-11-30 16:08:24 UTC
<verbal_mode="Hubert J. Farnsworth">Good news, everyone!</verbal_mode>

Daniel Oliveira Nascimento posted two patches on linux-acpi:

[PATCH 01/02] Initial work to let ACPI buttons work over INPUT layer
[PATCH 02/02] Reworked input layer and add more keys

I'll attach them shortly.

Is there a chance that we add those two patches to our tree?  They look quite good.  I'd be available for testing.
Comment 9 Timo Hoenig 2008-11-30 16:11:27 UTC
Created attachment 256791 [details]
[PATCH 01/02] Initial work to let ACPI buttons work over INPUT layer
Comment 10 Timo Hoenig 2008-11-30 16:11:58 UTC
Created attachment 256792 [details]
[PATCH 02/02] Reworked input layer and add more keys
Comment 11 Matti Kukkola 2008-11-30 17:10:09 UTC
Hello,

I'll test it. How can I run diffs and what packages I use for it? I have forgotten this patch system.

regards Matti
Comment 12 Timo Hoenig 2008-11-30 17:18:33 UTC
Matti, if you want to give it a try please install the kernel source:

$ zypper in kernel-source

You will also need to install gcc and friends.

There's a nice readme located at /usr/src/linux/README.SUSE .

The section "BUILDING ADDITIONAL (EXTERNAL) MODULES" is most relevant for you.

Try to apply the patches on /usr/src/linux/drivers/misc/asus-laptop.c and rebuild the module as described in the README.SUSE.

I'll give you more help tomorrow if this is not sufficient.
Comment 13 Matti Kukkola 2008-12-01 08:16:40 UTC
Hello Timo,

I installed KDE RC1, but still I cannot use wireless network. So I think I can't use zypper. Or can I install these packages by installation cd?
Comment 14 Timo Hoenig 2008-12-01 09:30:24 UTC
Matti, I hope you've filed a bug for the wireless issue.

I think the DVD images should contain the mentioned packages.
Comment 15 Matti Kukkola 2008-12-02 15:01:11 UTC
Timo, I tested to put patches to asus-laptop.c and I compiled and installed modules in misc. But still I don't see any changes in screen when I press volume up / down -buttons. I'm not sure did I install too many modules. I followed straight instructions. There was acer, fujitsu-siemens and so on modules. I didn't compile kernel again. So do I have to do it, too? And change running kernel some way? This is difficult because I don't have any codecs.

Regards Matti
Comment 16 Matti Kukkola 2008-12-02 15:02:27 UTC
I mean sound testing is difficult.
Comment 17 Timo Hoenig 2008-12-02 15:08:24 UTC
Mikka:  You can verify if you've loaded the correct module by doing the following:

* check that the .ko file (asus-laptop.ko?) in /usr/src/linux/drivers/misc has a new time stamp (e.g. a time stamp when you ran the make command)
* make sure that you have unloaded the module:

   $ modprobe -r asus-laptop (or asus_laptop)

* load the _new_ module by running:

   $ insmod ./asus-laptop.ko (or asus_laptop.ko)

Then run 

   $ sleep 1 ; showkey -s

and hit the keys.
Comment 18 Timo Hoenig 2008-12-02 15:10:32 UTC
Regarding testing is difficult:  As long as you see events by running

 $ sleep 1 ; showkey -s

and

 $ lshal -m

We can verify that the events are being reported.  If this is the case, we have proven that the patches work fine.

In case this is true:  I'm still waiting on a comment from our kernel developers whether we can include this patch.  But I'll put my efforts in convincing them if they doubt that this patch is necessary.
Comment 19 Matti Kukkola 2008-12-02 16:28:01 UTC
Created attachment 257325 [details]
result of insmod

Hello, I could remove asus-laptop module and asus_laptop module, but I couldn't install ko-module. I hope you add these patches so I don't need to try fight with them.

Regards Matti
Comment 20 Timo Hoenig 2008-12-02 16:44:36 UTC
Hm, yah, I'll play with this.  Don't expect the fix to be part of the kernel shipping with the final of OS11.1, though.  If we get the patch in, it will likely be available with an update.

Until then you may use the kernel I'll build which will contain the two patches.
Comment 21 Timo Hoenig 2008-12-09 09:58:10 UTC
Created attachment 258851 [details]
[PATCH 01/02] Initial work to let ACPI buttons work over INPUT layer (rebased)
Comment 22 Timo Hoenig 2008-12-09 09:58:42 UTC
Created attachment 258852 [details]
[PATCH 02/02] Reworked input layer and add more keys (rebased)
Comment 23 Timo Hoenig 2008-12-09 10:10:27 UTC
Those are the rebased patches.  Just eliminating some offset.  Otherwise they applied cleanly.

I have put them into the OBS:

  https://build.opensuse.org/project/show?project=home%3Athoenig%3Akernel-asus

Matti, in case you don't have a build service account:  Please be wait until the build is finished and the RPMs have been synced to:

  http://download.opensuse.org/repositories/home:/thoenig/

Pick openSUSE 11.1 or FACTORY and install the kernel RPMs.

I'll have a look for a ASUS laptop myself to test them, too.
Comment 25 Timo Hoenig 2008-12-09 12:54:20 UTC
The patches work find on my test system (ASUS M6NE).

Most of the hotkeys now report proper events and get handled by the desktop environment (here: GNOME).  The driver doesn't do any damage when being rmmod'ed/insmod'ed (e.g. the input interfaces appear and go).  No problems observed.  ASUS owners will love it.

Matti: can you please give it a go on your system?  Just to be sure.

Thomas: will you please take care of reviewing/submitting the patches?

Thanks.
Comment 26 Thomas Renninger 2008-12-09 14:31:08 UTC
Timo: Has this already been submitted mainline? Is this eventually already from a git commit?
As soon as this is mainline, I'd have not much of a problem with it. Need to double check, but this should only get active on ASUS BIOSes having this special ASUS ACPI device.

I doubt this will be taken for stable, but Greg knows better.
Comment 27 Greg Kroah-Hartman 2008-12-09 15:15:45 UTC
If these patches are in Linus's kernel tree, then I'll consider adding them to the -stable tree.

What are the git commit ids for them?
Comment 28 Matti Kukkola 2008-12-09 17:28:25 UTC
Hello, How can I test factory if I don't have internet in laptop? I think I can connect it to wired network, but what about wireless problems? Is it needed more data in bug 446835?

Regards Matti
Comment 29 Timo Hoenig 2008-12-09 18:13:30 UTC
Thomas, Greg:  I don't know if the patches are in mainline yet.  I've seen them crossing linux-acpi and that is where I grabbed them.  But I have no idea if someone has taken care of the patches from there.

Matti:  It seems that the build service hasn't synced the RPMs to download.opensuse.org yet.  I'll put them on another server tomorrow and will give you the exact URL.  You may try to get them either via a wired connection or via another computer with access to the Internet (copy to a USB stick for example) and then install them.

Please handle the wireless issue in the given bug, I have no idea if any information is missing there.
Comment 30 Timo Hoenig 2008-12-10 08:35:28 UTC
Matti:  The patched kernel has been synced.


Please get all kernel related RPMs (kernel*.rpm) for either 11.1 or Factory -- matching to your architecture (i586/x86_64).

11.1
====

i586:
http://download.opensuse.org/repositories/home:/thoenig:/kernel-asus/openSUSE_11.1/i586/

x86_64:
http://download.opensuse.org/repositories/home:/thoenig:/kernel-asus/openSUSE_11.1/x86_64/

Factory
=======

i586:
http://download.opensuse.org/repositories/home:/thoenig:/kernel-asus/openSUSE_Factory/i586/

x86_64:
http://download.opensuse.org/repositories/home:/thoenig:/kernel-asus/openSUSE_Factory/x86_64/

When installing you might get conflicts with already installed KMP packages.  Given you do the test on a non-production machine, I advice you to install the RPMs with:

$ rpm -Uhv --oldpackage *.rpm

After that, reboot and hit the volume up/down keys.  At least with GNOME you should get a on-screen-display showing the sound volume adjustment.
Comment 31 Matti Kukkola 2008-12-10 09:10:59 UTC
Hello Timo,

volume up and volume down is working. Volume mute is not working. I have to add I have now wireless connection working. I have to only start if manually every time when I log in and if I'm out of computer too long, wireless will be disconnected. I attach info

linux-2hft:/home/mattik # sleep 1 ; showkey -s
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0xe0 0x20 0xe0 0xa0
0xe0 0x2e 0xe0 0xae
0xe0 0x30 0xe0 0xb0
linux-2hft:/home/mattik #
is Fn+F10(volume on/off),Fn+F11(volume down),Fn+F12(volume up)

Same order the next:

linux-2hft:/home/mattik # lshal -m

Start monitoring devicelist:
-------------------------------------------------
11:08:46.393: computer_logicaldev_input_2 condition ButtonPressed = mute
11:08:53.121: computer_logicaldev_input_2 condition ButtonPressed = volume-down
11:08:56.277: computer_logicaldev_input_2 condition ButtonPressed = volume-up
^C
linux-2hft:/home/mattik #

Thank you :)

I agree this because I can mute by volume down. But customers maybe want it succesful working.

Regards Matti
Comment 32 Timo Hoenig 2008-12-10 09:27:49 UTC
Matti, thanks for testing.

The mute button actually works fine as you can see by the output of "lshal -m".  If you don't get the actual mute functionality sounds like an KDE issue.  You may verify this by running GNOME (e.g. via a live CD).

Thomas:  Can you please take it from here?

I guess that I've done everything on my side to get the support for ASUS laptops for SLE11 (we have patches, they are re-based for our kernel, they have been tested).

I have just sent mail to acpi-linux as a reply to the original submission, maybe that helps.

Comment 33 Matti Kukkola 2008-12-12 10:26:21 UTC
Hello.

Is it possible to install gnome with kde? I installed needed packages, but if I select Gnome in login screen I get only KDE Desktop. And mute doesn't work.
Comment 34 Timo Hoenig 2008-12-12 18:00:59 UTC
Matti, please file another bug if switching sessions doesn't work as expected.  This report is not suitable for anything as the (already solved) issue regarding the hotkeys.

Regarding mute:  As you get the mute event (cf. comment 31) it will definitely work in GNOME.  If KDE has problems, please file bugs against the component KDE.

Thank you!
Comment 35 Daniel O. Nascimento 2008-12-22 22:16:17 UTC
Timo,

I tried to resend the patches in linux-acpi kernel list again, now, including a copy to Len Brown. Since it already has almost a week and I didn't receive any answers and until now. It seems that the patches are not applied yet and I'm giving up trying, because I'm a little lost about how to get their attention. I think the kernel guys are a little unkind with kernel newbies :).

Feel free to follow the list and to do anything you need to get them applied, I wish you good luck, as I expect to get this feature working out of the box with openSuSE.

Thanks!
Comment 36 Matti Kukkola 2009-01-05 19:11:05 UTC
Thank you! :)

I'm now selling this laptop. So I cannot use openSUSE more with it. I use it only my Desktop Computer and maybe sometimes I get new laptop.

Regards Matti
Comment 37 Werner Habel 2009-01-06 22:28:03 UTC
will those patches be integrated to the kernels available at
http://download.opensuse.org/update/11.1/

and for all architectures, including pae?

Before that, i will keep using the hotkey-setup workaround.

thanks for the great effort you put into this!

Werner
Comment 38 Timo Hoenig 2009-01-13 13:34:15 UTC
*** Bug 461288 has been marked as a duplicate of this bug. ***
Comment 39 Timo Hoenig 2009-01-26 08:57:47 UTC
Len has merged an updated patch last week.  Thomas, I'll pass this bug to you.
Comment 40 Thomas Renninger 2009-10-16 14:02:41 UTC
Can someone confirm that this is fixed for 11.2.
I don't have time to add anything to 11.1. Let's make sure things are fixed for mainline and 11.2.

Hmm, reporter said:
I'm now selling this laptop. So I cannot use openSUSE more with it.

-> I am closing this won't fix for 11.1 now. Please upgrade if you have problems.