Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 55

Thread: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

  1. #21
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    Quote Originally Posted by SaintDanBert
    Favux, do you know how one obtains the thinkpad_acpi.txt file from the build tree as described on the ThinkWiki pages?
    I asssume you are talking about the source code for the thinkpad_acpi?

    Download the kernel source code:
    Code:
    apt-get source linux-image-`uname -r`
    Then thinkpad_acpic.c will be in /drivers/platform/x86. Looks like some of the relevant code (for IdanSuper at least) is this:
    Code:
    /* HKEY events */
    enum tpacpi_hkey_event_t {
    	/* Hotkey-related */
    	TP_HKEY_EV_HOTKEY_BASE		= 0x1001, /* first hotkey (FN+F1) */
    	TP_HKEY_EV_BRGHT_UP		= 0x1010, /* Brightness up */
    	TP_HKEY_EV_BRGHT_DOWN		= 0x1011, /* Brightness down */
    	TP_HKEY_EV_VOL_UP		= 0x1015, /* Volume up or unmute */
    	TP_HKEY_EV_VOL_DOWN		= 0x1016, /* Volume down or unmute */
    	TP_HKEY_EV_VOL_MUTE		= 0x1017, /* Mixer output mute */

  2. #22
    Join Date
    Jan 2012
    Beans
    71

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    Well I didn't understand anything .. There are a big mess .. Can anyone explain step by step noobs like me what to do .. Thank you!

  3. #23
    Join Date
    Oct 2008
    Location
    Austin, TX
    Beans
    492
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    There is a kernel document Thinkpad ACPI Details that reads, in part:
    Code:
    The driver will generate events over the input layer for hot keys and
    radio switches, and over the ACPI netlink layer for other events. The
    input layer support accepts the standard IOCTLs to remap the keycodes assigned to each hot key.
    
    The hot key bit mask allows some control over which hot keys generate
    events.  If a key is "masked" (bit set to 0 in the mask), the firmware will handle it.  If it is "unmasked", it signals the firmware that thinkpad-acpi would prefer to handle it, if the firmware would be so kind to allow it (and it often doesn't!).
    
    Not all bits in the mask can be modified.  Not all bits that can be
    modified do anything.  Not all hot keys can be individually controlled by the mask.  Some models do not support the mask at all.  The behaviour of the mask is, therefore, highly dependent on the ThinkPad model.
    
    The driver will filter out any unmasked hotkeys, so even if the firmware doesn't allow disabling an specific hotkey, the driver will not report events for unmasked hotkeys.
    
    Note that unmasking some keys prevents their default behavior.  For
    example, if Fn+F5 is unmasked, that key will no longer enable/disable
    Bluetooth by itself in firmware.
    
    Note also that not all Fn key combinations are supported through ACPI
    depending on the ThinkPad model and firmware version.  On those
    ThinkPads, it is still possible to support some extra hotkeys by
    polling the "CMOS NVRAM" at least 10 times per second.  The driver
    attempts to enables this functionality automatically when required.
    I'll keep reading and report back once I discover the setting, clearing, masking, details. Hopefully, they will be in the rest of the document.

    ~~~ 8d;-/ Dan
    "All government spending, regardless of the motives, uses YOUR money."

  4. #24
    Join Date
    Oct 2008
    Location
    Austin, TX
    Beans
    492
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    I found this page ThinkWiki ACPI Discussion that reads, in part:
    Code:
    Hotkeys
    
    To view which hotkeys are active you can use "acpi_listen", but that is deprecated. A better way is to use "lsinput" and "input-events" commands to look at the output of the thinkpad-acpi input device(s).
    One important difference from ibm-acpi for those who wish to enable all possible hot keys, is that thinkpad-acpi automatically enables them. One should not need to do anything to get the best possible thinkpad-acpi configuration for his ThinkPad (as long as he is using the latest thinkpad-acpi).
    
    In particular, old documentation that tells you to "echo enable,0xffffffff >/proc/acpi/ibm/hotkey", or to give thinkpad-acpi any hotkey= module parameters to enable hot keys by default, is likely incorrect.
    
    The thinkpad-acpi driver has detailed documentation, which is shipped inside the Linux kernel sources, as "Documentation/thinkpad-acpi.txt" or as "Documentation/laptops/thinkpad-acpi.txt". If you feel a need to change the hot key mask manually, it is probably best to look at that documentation first to understand the full side effects of any changes.
    I added the emphasis.
    Notice that things are supposed to be enabled by default. That said, I suspect that, as pointed out in the previous posting, enabled sometimes blocks the desired behavior.
    My Thinkpad X220t reports the following:
    Code:
    prompt$ ls /sys/devices/platform/thinkpad_acpi/
    
    bluetooth_enable     hotkey_poll_freq         modalias
    cmos_command         hotkey_radio_sw          power
    driver               hotkey_recommended_mask  rfkill
    hotkey_all_mask      hotkey_report_mode       sound
    hotkey_bios_enabled  hotkey_source_mask       subsystem
    hotkey_bios_mask     hotkey_tablet_mode       uevent
    hotkey_enable        input                    wakeup_hotunplug_complete
    hotkey_mask          leds                     wakeup_reason
    and
    Code:
    prompt $ ls /sys/devices/platform/thinkpad_hwmon/
    
    driver  fan1_input  hwmon  modalias  name  power  pwm1  
    pwm1_enable  subsystem  uevent
    Cheers,
    ~~~ 0;-Dan
    "All government spending, regardless of the motives, uses YOUR money."

  5. #25
    Join Date
    Oct 2008
    Location
    Austin, TX
    Beans
    492
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    My previous post contained:
    To view which hotkeys are active you can use "acpi_listen", but that is deprecated. A better way is to use "lsinput" and "input-events" commands to look at the output of the thinkpad-acpi input device(s).
    (emphasis added)
    In my case, lsinput was not installed and required that I add the package 'input-utils' from the repositories. That done, I get the following:
    Code:
    prompt $  sudo lsinput
    
    ...
    /dev/input/event6
       bustype : BUS_HOST
       vendor  : 0x17aa
       product : 0x5054
       version : 16641
       name    : "ThinkPad Extra Buttons"
       phys    : "thinkpad_acpi/input0"
       bits ev : EV_SYN EV_KEY EV_MSC EV_SW
    ...
    I got no response at all (other than "timeout") to:
    Code:
    prompt$ sudo input-event 6  #notice -- just the number not the name
    when I tried any of the buttons on the bezel.

    REMINDER (spoken from behind a thick wall) Win-dose obeys these buttons.

    "What next?" he asks plaintivly,
    ~~~ 0;-/ Dan

    Edit: Follow-up
    The driver will report HKEY events in the following format:

    ibm/hotkey HKEY 00000080 0000xxxx

    Here are codes for some Thinkpad Events:

    Events that are not propagated by the driver, except for legacy
    compatibility purposes when hotkey_report_mode is set to 1:

    0x5001 Lid closed
    0x5002 Lid opened
    0x5009 Tablet swivel: switched to tablet mode
    0x500A Tablet swivel: switched to normal mode
    0x7000 Radio Switch may have changed state

    Events that are propagated by the driver to userspace:

    0x2313 ALARM: System is waking up from suspend
    because the battery is nearly empty
    0x2413 ALARM: System is waking up from hibernation
    because the battery is nearly empty
    0x3003 Bay ejection (see 0x2x05) complete, can sleep again
    0x3006 Bay hotplug request (hint to power up SATA link when
    the optical drive tray is ejected)
    0x4003 Undocked (see 0x2x04), can sleep again
    0x4010 Docked into hotplug port replicator (non-ACPI dock)
    0x4011 Undocked from hotplug port replicator (non-ACPI dock)
    0x500B Tablet pen inserted into its storage bay
    0x500C Tablet pen removed from its storage bay
    0x6011 ALARM: battery is too hot
    0x6012 ALARM: battery is extremely hot
    0x6021 ALARM: a sensor is too hot
    0x6022 ALARM: a sensor is extremely hot
    0x6030 System thermal table changed
    0x6040 Nvidia Optimus/AC adapter related (TO BE VERIFIED)

    So far, I have not found an event for the bezel "orientation" button listed in recent Thinkpad documentation.
    Last edited by SaintDanBert; February 2nd, 2012 at 11:36 PM.
    "All government spending, regardless of the motives, uses YOUR money."

  6. #26
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    Since you know that the buttons should report through "ThinkPad Extra Buttons" which is on event6 you should also be able to test button/key function with:
    Code:
    sudo evtest /dev/input/event6
    Then press the button/key you are interested in. You may have to install evtest, I forget.

  7. #27
    Join Date
    Oct 2008
    Location
    Austin, TX
    Beans
    492
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    I get the following:
    Code:
    prompt$  sudo  evtest  /dev/input/event6
    
    Input driver version is 1.0.1
    Input device ID: bus 0x19 vendor 0x17aa product 0x5054 version 0x4101
    Input device name: "ThinkPad Extra Buttons"
    
    Input device name: "ThinkPad Extra Buttons"
    Supported events:
      Event type 0 (Sync)
      Event type 1 (Key)
        Event code 113 (Mute)
        Event code 114 (VolumeDown)
        Event code 115 (VolumeUp)
        Event code 142 (Sleep)
        Event code 148 (Prog1)
        Event code 152 (Screen Lock)
        Event code 191 (F21)
        Event code 194 (F24)
        Event code 205 (Suspend)
        Event code 212 (Camera)
        Event code 224 (Brightness down)
        Event code 225 (Brightness up)
        Event code 227 (Switch Video Mode)
        Event code 228 (Kbd Illum Toggle)
        Event code 236 (Battery)
        Event code 238 (WLAN)
        Event code 240 (Unknown)
        Event code 372 (Zoom)
        Event code 466 (Fn F1)
        Event code 475 (Fn F10)
        Event code 476 (Fn F11)
      Event type 4 (Misc)
        Event code 4 (ScanCode)
      Event type 5 (Switch)
        Event code 1 (Tablet Mode)
        Event code 3 (RFKILL)
    Testing ... (interrupt to exit)
    I notice the types #0, #1, #4, and #5 are reported while #6 is not.
    Either they are not available or are otherwise not yet turned on.

    What next,
    ~~~ 0;-Dan
    "All government spending, regardless of the motives, uses YOUR money."

  8. #28
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    Just to be sure, since you aren't reporting anything after:
    Code:
    Testing ... (interrupt to exit)
    I am assuming none of the buttons you are interested in gave a response when tested i.e. pressed?

    I don't think you've enumerated which tablet PC buttons and their functions aren't working for each of your tablet PCs. I believe we know at least for the X61t's all of the buttons were working at one point from the Thinkwiki.org.

  9. #29
    Join Date
    Jan 2012
    Beans
    71

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    all the FN works fine for me...... only the volume/mute keys aren't. they was worked on XP without needs to click the FN key.. and now on Lubuntu 11.10 they aren't work.. and it doesn't matter even if I click on FN.. what I need to do? thanks.. and again my Thinkpad model is:IBM G40..

  10. #30
    Join Date
    Jan 2012
    Beans
    71

    Re: How can I set up ACPI/Advanced keyboard buttoms to work on my thinkpad G40?

    You think I have to update my bios? Now is the version 1.20 and I saw that 1.21 .. And change is in Function update .. I never updated version of the BIOS and I even a little scared to do it .. Do you think it will solve my problem? Should I try to update .. It has no ramifications? Thank you!

Page 3 of 6 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •