[ltp] How are hotkey and ACPI events handled on newer Thinkpads (2010+) with 3.x kernels?

Jonas Camillus Jeppesen linux-thinkpad@linux-thinkpad.org
Mon, 21 Jan 2013 10:09:52 +0100


This is a multi-part message in MIME format.
--------------030700050107040303070506
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Thank you for your input Ethan.

I will look at your configurations this afternoon. To keep the 
"discussion" going I will however add this right away:

>     Right now only brightness up/down (fn+home/end) works if I choose
>     not to launch gnome-settings-daemon (i.e. toggle touchpad, volume
>     etc. does not work).
>
>
> Nothing reported by xev? there are lower level ways of defining 
> hotkeys which can be tried. it may take some work but even in cases 
> where there was absolutely no response I've been able to eventually 
> assign proper behaviors to most hotkeys on this and other thinkpads. 
> I'd be happy to detail the methodology as best I can that I used to 
> sort this out in the past.
xev registers all fn+fx events and fn+end/home both with and without 
gnome running. xev does not register the dedicated volume up/down and 
mute keys.

A thing that puzzles me is that the brightness up/down keys 
(fn+end/home) works both with and without gnome whereas other keys 
(toggle tuochpad for example) does not (they are captured by xev but 
nothing happens). What makes the brightness keys special and what 
handles those keys compared to what handles all the other keys? Whatever 
handles the brightness keys seem to be running independent of gnome 
whereas what ever handles the other keys is somehow dependent on gnome. 
Any ideas?

Best regards
Jonas C. J.

On 21-01-2013 02:38, Ethan Schoonover wrote:
> On Sun, Jan 20, 2013 at 5:01 PM, Jonas Camillus Jeppesen 
> <wuhtzu@gmail.com <mailto:wuhtzu@gmail.com>> wrote:
>
>     I am trying to understand how hotkeys (special keys, thinkpad
>     extra keys, fn-combinations) and ACPI events are handled on newer
>     Thinkpads (lets say from 2010 and onwards. I am hoping to cover my
>     own T420) when they run Linux with a 3.x kernel. The reason being
>     that I would like to use no established desktop environment, but
>     just a window manager and status bar (xmonad+xmobar).
>
>
> I'm using xmonad and xmobar exclusively with my own 
> power/display/system management, acpi and hotkey scripts. No desktop 
> environment.
>
> My acpi handler is as minimal as possible as I currently prefer to 
> deal with most keys via xmonad directly. Here it is: 
> https://gist.github.com/4582988
>
> My xmonad config is here 
> https://github.com/altercation/es-etc/blob/master/xorg/.xmonad/xmonad.hs - 
> See the "keysMedia" and "keysSystem" and "keysSystemCodes" functions 
> for how I handle them (including the battery key which, in this case, 
> doesn't have a functioning symbol).
>
> This is all on Arch Linux, 3.6 kernel .
>
> If useful, you can see my "system" "displays" and "power" bash scripts 
> in this repo: https://github.com/altercation/es-bin They are all from 
> scratch, minimal bash scripts to handle almost everything a normal 
> desktop environment does, specific for my thinkpad, but relatively 
> adaptable to other makes/models.
>
>
>     Right now only brightness up/down (fn+home/end) works if I choose
>     not to launch gnome-settings-daemon (i.e. toggle touchpad, volume
>     etc. does not work).
>
>
> Nothing reported by xev? there are lower level ways of defining 
> hotkeys which can be tried. it may take some work but even in cases 
> where there was absolutely no response I've been able to eventually 
> assign proper behaviors to most hotkeys on this and other thinkpads. 
> I'd be happy to detail the methodology as best I can that I used to 
> sort this out in the past.
>
> Best,
> Ethan Schoonover
>
> http://ethanschoonover.com/solarized


--------------030700050107040303070506
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Thank you for your input Ethan.<br>
      <br>
      I will look at your configurations this afternoon. To keep the
      "discussion" going I will however add this right away:<br>
      <br>
      <blockquote type="cite">
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Right
          now only brightness up/down (fn+home/end) works if I choose
          not to launch gnome-settings-daemon (i.e. toggle touchpad,
          volume etc. does not work).<br>
        </blockquote>
        <div><br>
        </div>
        <div style="">Nothing reported by xev? there are lower level
          ways of defining hotkeys which can be tried. it may take some
          work but even in cases where there was absolutely no response
          I've been able to eventually assign proper behaviors to most
          hotkeys on this and other thinkpads. I'd be happy to detail
          the methodology as best I can that I used to sort this out in
          the past.<br>
        </div>
      </blockquote>
      xev registers all fn+fx events and fn+end/home both with and
      without gnome running. xev does not register the dedicated volume
      up/down and mute keys.<br>
      <br>
      A thing that puzzles me is that the brightness up/down keys
      (fn+end/home) works both with and without gnome whereas other keys
      (toggle tuochpad for example) does not (they are captured by xev
      but nothing happens). What makes the brightness keys special and
      what handles those keys compared to what handles all the other
      keys? Whatever handles the brightness keys seem to be running
      independent of gnome whereas what ever handles the other keys is
      somehow dependent on gnome. Any ideas?<br>
      <br>
      Best regards<br>
      Jonas C. J.<br>
      <br>
      On 21-01-2013 02:38, Ethan Schoonover wrote:<br>
    </div>
    <blockquote
cite="mid:CAK3eu+RZy60WCHRggLexj-UfvPt4Yn3a7SuXywy27pZixNWPJA@mail.gmail.com"
      type="cite">
      <div dir="ltr">On Sun, Jan 20, 2013 at 5:01 PM, Jonas Camillus
        Jeppesen <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:wuhtzu@gmail.com" target="_blank">wuhtzu@gmail.com</a>&gt;</span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I
              am trying to understand how hotkeys (special keys,
              thinkpad extra keys, fn-combinations) and ACPI events are
              handled on newer Thinkpads (lets say from 2010 and
              onwards. I am hoping to cover my own T420) when they run
              Linux with a 3.x kernel. The reason being that I would
              like to use no established desktop environment, but just a
              window manager and status bar (xmonad+xmobar).<br>
            </blockquote>
            <div><br>
            </div>
            <div style="">I'm using xmonad and xmobar exclusively with
              my own power/display/system management, acpi and hotkey
              scripts. No desktop environment.</div>
            <div style=""><br>
            </div>
            <div style="">My acpi handler is as minimal as possible as I
              currently prefer to deal with most keys via xmonad
              directly. Here it is: <a moz-do-not-send="true"
                href="https://gist.github.com/4582988">https://gist.github.com/4582988</a></div>
            <div style=""><br>
            </div>
            <div style="">My xmonad config is here <a
                moz-do-not-send="true"
href="https://github.com/altercation/es-etc/blob/master/xorg/.xmonad/xmonad.hs">https://github.com/altercation/es-etc/blob/master/xorg/.xmonad/xmonad.hs</a> -
              See the "keysMedia" and "keysSystem" and "keysSystemCodes"
              functions for how I handle them (including the battery key
              which, in this case, doesn't have a functioning symbol).<br>
            </div>
            <div style=""><br>
            </div>
            <div style="">This is all on Arch Linux, 3.6 kernel .</div>
            <div style=""><br>
            </div>
            <div style="">If useful, you can see my "system" "displays"
              and "power" bash scripts in this repo: <a
                moz-do-not-send="true"
                href="https://github.com/altercation/es-bin">https://github.com/altercation/es-bin</a> They
              are all from scratch, minimal bash scripts to handle
              almost everything a normal desktop environment does,
              specific for my thinkpad, but relatively adaptable to
              other makes/models.</div>
            <div style=""><br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
              Right now only brightness up/down (fn+home/end) works if I
              choose not to launch gnome-settings-daemon (i.e. toggle
              touchpad, volume etc. does not work).<br>
            </blockquote>
            <div><br>
            </div>
            <div style="">Nothing reported by xev? there are lower level
              ways of defining hotkeys which can be tried. it may take
              some work but even in cases where there was absolutely no
              response I've been able to eventually assign proper
              behaviors to most hotkeys on this and other thinkpads. I'd
              be happy to detail the methodology as best I can that I
              used to sort this out in the past.</div>
            <div><br>
            </div>
            <div>Best,</div>
            <div style="">Ethan Schoonover</div>
            <div style=""><br>
            </div>
            <div style=""><a moz-do-not-send="true"
                href="http://ethanschoonover.com/solarized">http://ethanschoonover.com/solarized</a></div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------030700050107040303070506--