Feature #201

Add Lenovo SL500 (2746F2G) support

Added by Anonymous 7 months ago. Updated 4 months ago.

Status:Resolved Start date:10/28/2011
Priority:Normal Due date:
Assignee:Corentin Chary % Done:

0%

Category:asus-laptop
Target version:-

Description

Hi,

AFAIK asus-laptop now have limited Lenovo SL support (commit). But I found that this module don't works as expected with Lenovo SL500 (model 2746F2G). Is it possible to add support for it?
Here is DSDT obtained with acpidump and dmidecode output

dmi.out.bz2 - dmidecode output (3.2 kB) Anonymous, 10/28/2011 12:47 pm

SL500-2746F2G.out.bz2 - DSDT dump (67 kB) Anonymous, 10/28/2011 12:47 pm

0001-asus-laptop-log-unknown-keys.patch (984 Bytes) Corentin Chary, 11/18/2011 09:14 am

keycodes.ods - keycodes as ODS (9.9 kB) Anonymous, 11/23/2011 07:14 pm

codes.csv - keycodes as CSV (425 Bytes) Anonymous, 11/23/2011 07:14 pm

asus-laptop.c (43.4 kB) Anonymous, 11/24/2011 10:55 am


Add

CC Addresses

History

Updated by Corentin Chary 7 months ago

  • Assignee set to Corentin Chary
Comment

Could you describe what is not working as expected ? What kernel are you using ?

Updated by Anonymous 6 months ago

Comment

I'm currently on Slackware 13.37 with standard kernel 2.6.37.6-smp.

I found that following keys don't work (tested with xev):
- Battery Status (Fn+F3)
- Screen Magnifier (Fn+Space)
- NumLock (Fn+Delete) works but produces no output in xev
And some keys, marked in commit as not enabled, works:
- KEY_SUSPEND (Fn+F4)

Also SysRq(Fn+Esc) and PrtSc(Fn+F6) produces same keycode.

P.S.: maybe you know about unofficial driver for SL laptops (currently not maintained by author). Is it possible to get some features from it (e.g. fan control) into asus-laptop driver?

Updated by Corentin Chary 6 months ago

  • Category set to asus-laptop
Comment

Ok, for Fn+F3 and Fn+Space, could you try to apply the following patch, press them, and look at dmesg ?
(If you don't build your own kernel, apply the patch to acpi4asus-dkms, and use that module).

For fan control, it's complicated since:
- some parts are already exported as a standard ACPI TZ (seems to be read only)
- I don't have the hardware
- the methods for doing that are really specific, probably not part of a really stable "API", and not part of the ACPI device handled by asus-laptop

So ... if I receive patchs I'll review them, and maybe merge them, but I don't think I'll work on that.

Updated by Anonymous 6 months ago

Comment

Corentin Chary wrote:

Ok, for Fn+F3 and Fn+Space, could you try to apply the following patch, press them, and look at dmesg ?
(If you don't build your own kernel, apply the patch to acpi4asus-dkms, and use that module).

Sorry for bothering, but where is this patch?

Updated by Corentin Chary 6 months ago

Comment

Oups... here it is

Updated by Anonymous 6 months ago

Comment

I apply this patch to the kernel, then build and install it. Here is results (csv and ods): first column is a button(s), second - keycode reported by xev, third - corresponding code from dmesg after applying patch. Fn+F3 and Fn+Space produces no output in both. Some keys that produces output in xev also produces output in dmesg.

Updated by Anonymous 6 months ago

Comment

Anonymous wrote:

I apply this patch to the kernel, then build and install it. Here is results (csv and ods): first column is a button(s), second - keycode reported by xev, third - corresponding code from dmesg after applying patch. Fn+F3 and Fn+Space produces no output in both. Some keys that produces output in xev also produces output in dmesg.

Hum this is very strange, keys that output in xev should not produce any event...

You're really getting "Unknown key 8 pressed" when pressing Fn+F8 ?
Can I take a look at your asus-laptop.c ?

Thanks,

Updated by Anonymous 6 months ago

Comment

Oh sorry, seems patch was applied not cleanly. After reviewing asus-laptop.c code and rebuilding kernel I think I get correct results:
Fn+F9 produces "Unknown key 9 pressed" in /var/log/messages and no output in xev
Fn+F12 produces "Unknown key 6d pressed" in /var/log/messages and no output in xev

All other keys produces no output in /var/log/messages and same output in xev as in previous attachment.
Also I found that Fn+Delete produces keycode 77 in xev only for first press. Second and other pressing gives no output, but seems it works.

Updated by Corentin Chary 6 months ago

Comment

Anonymous wrote:

Oh sorry, seems patch was applied not cleanly. After reviewing asus-laptop.c code and rebuilding kernel I think I get correct results:
Fn+F9 produces "Unknown key 9 pressed" in /var/log/messages and no output in xev
Fn+F12 produces "Unknown key 6d pressed" in /var/log/messages and no output in xev

All other keys produces no output in /var/log/messages and same output in xev as in previous attachment.
Also I found that Fn+Delete produces keycode 77 in xev only for first press. Second and other pressing gives no output, but seems it works.

Ok, so only Fn+F9 and Fn+F12 are producing messages ?
What do these keys represent ? (symbol on the key)

Updated by Anonymous 6 months ago

Comment

Corentin Chary wrote:

Ok, so only Fn+F9 and Fn+F12 are producing messages ?

Yes, only Fn+F9 and Fn+F12 gives output in /var/log/messages

Corentin Chary wrote:

What do these keys represent ? (symbol on the key)

Fn+F9 used to work with external devices, mainly dock station. In guide this button described as "Eject ThinkPad PC from Dock".
Fn+F12 is hibernate (sleep mode)

Updated by Anonymous 6 months ago

Comment

With this patch Fn+F9 works fine, producing keycode 157 in xev. But Fn+F4 (standby mode) and Fn+F12 (hibernate) are produce same keycode 150.

Updated by Corentin Chary 6 months ago

Comment

Anonymous wrote:

With this patch Fn+F9 works fine, producing keycode 157 in xev. But Fn+F4 (standby mode) and Fn+F12 (hibernate) are produce same keycode 150.

Yes ... that's not great but Linux does not have a specific key for hibernate at the moment.
Feel free to edit the driver and replace KEY_SLEEP with any key found in /usr/include/linux/input.h .

Updated by Anonymous 6 months ago

Comment

Thanks for clarification and your work.
I'll try to lear more about kernel modules and maybe in future will try to adopt some code from unofficial lenovo-sl-laptop driver. Thanks again

Updated by Corentin Chary 4 months ago

  • Status changed from New to Resolved

Also available in: Atom PDF