Alec Robertson | 1 Mar 2008 17:19
Picon

how to get hotkeys working without /proc/acpi/events

Hi,

I just upgraded to the latest kernel 2.6.25-rc3 and compiled it without the
deprecated /proc/acpi stuff. As a consequence, acpid doesn't work (no
/proc/acpi/events) and the corresponding events in /etc/acpi/events (on debian
unstable) therefore do not fire.

I've seen mention of using the "input layer", "acpi netlink" or "evdev" in order
to process the new events. But how? Which programs should I be using?

Cheers,

Alec

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Picon
Favicon

Re: how to get hotkeys working without /proc/acpi/events

On Sat, 01 Mar 2008, Alec Robertson wrote:
> I just upgraded to the latest kernel 2.6.25-rc3 and compiled it without the
> deprecated /proc/acpi stuff. As a consequence, acpid doesn't work (no

Do compile it *with* the deprecated /proc/acpi stuff.  Chances of your
userspace being able to deal with the ACPI netlink interface are close to
zero.

> I've seen mention of using the "input layer", "acpi netlink" or "evdev" in order
> to process the new events. But how? Which programs should I be using?

The problem is that the X.org evdev driver is, basically (and to put it
nicely), not in a good state right now.  You could use it, and it will work
somewhat, but half the keycodes don't get through evdev, so you will have to
change thinkpad-acpi's keymap until you find keycodes that do.

--

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Chris Jones | 14 Mar 2008 12:18
Favicon
Gravatar

Re: Thinkpad ACPI

Hi

I have a new Thinkpad X300 and while much of the hardware works, there 
are some odd little issues (e.g. suspend doesn't quite work).
Here is some information Henrique suggested I send to the list. If 
anyone would like any more information about this machine, please feel 
free to ask :)

Henrique de Moraes Holschuh wrote:
> Then, please send a post to the mailing list with this information:
> 
> 1. dmidecode output, gzipped (please remove the serial number and UUID of
> 2. acpidump output, gzipped

see attached. I've noticed that a BIOS update has appeared. I'm somewhat 
wary of these things, but perhaps it would be worth applying.
Interestingly, lenovo's page for this model suggests the "initial 
release" for the X300 was firmware 1.02, but I have 1.00 in mine.
If I do decide to apply it I will repost the acpi/dmi details.

> 3. Any interesting data you could give us about the X300, like the output
>    of the following commands (as root):
>    lspci
>    lsusb  (without any extra USB devices plugged in)

Also attached.

>    also, your impressions about the thinkpad are always welcome :-) but
>    they are more on-topic on the linux-thinkpad mailinglist, with I urge

(Continue reading)

Fabien Crespel | 15 Mar 2008 00:41
Gravatar

Best practices to improve a laptop driver using ACPI (hotkeys, rfkill, kill switch...)

Hello,

as an ASUS laptop owner, quite new to Linux kernel driver programming but long
time programmer, I'm interested in improving the asus-laptop driver in several
ways, with anyone that might be interested in the process (and of course 
especially the maintainer, Corentin Chary).

But for this, I would first like to know what the "best practices" are, to avoid
design mistakes. So here I come with many questions and unclear points I'd like
to define a bit better. Sorry if some questions have already been answered
elsewhere, but if they haven't, maybe the resulting discussion will also be
useful for other laptop drivers :)

___ INTRODUCTION _______________________________________________________________

Before asking anything, let me explain quickly how things work on ASUS laptops:
- hotkeys use ACPI notifications catched by the driver with a notify handler.
- there are several "operation modes" in most DSDTs, controlled by the CWAP
method / WAPF variable:
   0 = no driver (behavior hardcoded in the DSDT),
   1 = half-driver, half-hardware (current default in asus-laptop),
   4 = pure driver mode (notifications only for most events)
- in all modes, the Bluetooth device and LED (if present) are tied together, i.e.
toggling the LED through an ACPI method (BLED) also toggles the device.
- the WLAN device and LED are more tricky depending on the mode:
   0 = tied together on some models,
   1 and 4 = only the LED can be toggled with an ACPI method (WLED).

The goals of the proposed driver enhancements are to move to "mode 4" (pure
driver mode) on all ASUS laptops, to support more modern ways of handling things
(Continue reading)

Henrique de Moraes Holschuh | 15 Mar 2008 06:59
Picon
Favicon

Re: Best practices to improve a laptop driver using ACPI (hotkeys, rfkill, kill switch...)

On Sat, 15 Mar 2008, Fabien Crespel wrote:
> Currently, hotkeys generate ACPI events (with acpi_bus_generate_proc_event) with
> the notification code, which are handled directly by acpid scripts or userspace
> programs like Lapsus. On some distros (like openSUSE 10.3 and probably Ubuntu),
> the acpi-keys daemon (from the hotkey-setup package) converts some of these
> events to keycodes.

My experience here is that you will get flak from the crowd when you finally
have to get rid of proc events, so introduce the input devices *early* and
make sure to make a fuss about the other ways being deprecated and not
guaranteed to still exist in an year.

For thinkpad-acpi, I tied the deprecation to one year or /proc/acpi/event
going away, whichever happens first.  I can always delay the removal when
the time comes to get rid of that code, if there is a compelling reason to.

But you do need to give people an input device first, and it will have to
stay around for some time before it is used (X.org's evdev driver being
busted beyond belief on some of the most interesting EV_KEY events doesn't
help any, here).

> - thinkpad_acpi's with the keymap of known key scancodes defined in the driver,
> and only allowing to remap unknown keys.
> - sony-laptop's with a predefined keymap too, but only allowing the known keys to
> be remapped.

Thinkpads have a very long lived firmware APIs.  Lenovo is respecting that
for the most part, I can trust they won't do any stupid stunts.

Leaving these keys as KEY_UNKNOWN makes it easy for userspace to remap them
(Continue reading)

Chris Jones | 16 Mar 2008 04:14
Favicon
Gravatar

Re: Thinkpad ACPI

Hi

Chris Jones wrote:
>> 1. dmidecode output, gzipped (please remove the serial number and UUID of
>> 2. acpidump output, gzipped
> 
> see attached. I've noticed that a BIOS update has appeared. I'm somewhat 

On advice from Henrique I have applied the BIOS update, so here are the 
updated outputs.

The only change I've noticed so far is that when halting the machine, it 
reboots instead of switching off, but while I've not consciously changed 
anything, I can't guarantee that's not a bug in Hardy being exposed.

The most obvious problems seem to be:
  * lack of suspend
  * lack of audio (being fixed in ALSA bug tracker atm, which is why 
dmesg shows a local build of snd-hda-intel

Cheers,
--

-- 
Chris Jones
   cmsj@...
    www.tenshu.net
Attachment (acpidump.txt.gz): application/x-gzip, 60 KiB
Attachment (dmidecode.txt.gz): application/x-gzip, 3290 bytes
Attachment (lspci.txt.gz): application/x-gzip, 483 bytes
Attachment (lspci-vvnn.txt.gz): application/x-gzip, 2573 bytes
(Continue reading)

Jerone Young | 16 Mar 2008 07:42
Picon

Re: Thinkpad ACPI

Can you post the bugzilla link for the ALSA problem. I'm curious of
what sound chip is in the x300. Can probably help out with it. I'm
looking to buy one in the future :-)

On Sat, Mar 15, 2008 at 10:14 PM, Chris Jones <cmsj@...> wrote:
> Hi
>
>
>  Chris Jones wrote:
>  >> 1. dmidecode output, gzipped (please remove the serial number and UUID of
>  >> 2. acpidump output, gzipped
>  >
>  > see attached. I've noticed that a BIOS update has appeared. I'm somewhat
>
>  On advice from Henrique I have applied the BIOS update, so here are the
>  updated outputs.
>
>  The only change I've noticed so far is that when halting the machine, it
>  reboots instead of switching off, but while I've not consciously changed
>  anything, I can't guarantee that's not a bug in Hardy being exposed.
>
>  The most obvious problems seem to be:
>   * lack of suspend
>   * lack of audio (being fixed in ALSA bug tracker atm, which is why
>  dmesg shows a local build of snd-hda-intel
>
>
>
>  Cheers,
>  --
(Continue reading)

Jerone Young | 16 Mar 2008 07:47
Picon

Re: Thinkpad ACPI

Nevermind found the bugzilla:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3837

On Sun, Mar 16, 2008 at 1:42 AM, Jerone Young <jerone@...> wrote:
> Can you post the bugzilla link for the ALSA problem. I'm curious of
>  what sound chip is in the x300. Can probably help out with it. I'm
>  looking to buy one in the future :-)
>
>
>
>  On Sat, Mar 15, 2008 at 10:14 PM, Chris Jones <cmsj@...> wrote:
>  > Hi
>  >
>  >
>  >  Chris Jones wrote:
>  >  >> 1. dmidecode output, gzipped (please remove the serial number and UUID of
>  >  >> 2. acpidump output, gzipped
>  >  >
>  >  > see attached. I've noticed that a BIOS update has appeared. I'm somewhat
>  >
>  >  On advice from Henrique I have applied the BIOS update, so here are the
>  >  updated outputs.
>  >
>  >  The only change I've noticed so far is that when halting the machine, it
>  >  reboots instead of switching off, but while I've not consciously changed
>  >  anything, I can't guarantee that's not a bug in Hardy being exposed.
>  >
>  >  The most obvious problems seem to be:
>  >   * lack of suspend
>  >   * lack of audio (being fixed in ALSA bug tracker atm, which is why
(Continue reading)

Henrique de Moraes Holschuh | 16 Mar 2008 17:07
Picon
Favicon

Re: Thinkpad ACPI

On Sun, 16 Mar 2008, Chris Jones wrote:
> The only change I've noticed so far is that when halting the machine, it  
> reboots instead of switching off, but while I've not consciously changed  

I've heard reports of other X6* doing the same, but this time we have the
ACPI diff to try to track it down.

I think that's a Linux bug and not a problem in the Lenovo AML code, btw.
We are very probably doing something wrong when calling the ACPI shutdown
system.

--

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Yves-Alexis Perez | 17 Mar 2008 08:54
Picon
Favicon

thinkpad-acpi not working on -rc series

Hi,

I just wanted to know if there was a reason a patch was still needed
against 2.6.25-rc kernels. On ibm-acpi.sf.net there's a patch against
-rc4 (wich applies cleanly against -rc5 but not against -rc6). Without
it, thinkpad-acpi doesn't show any acpi event when I use the Fn keys. Is
there a reason the patch can be merged in rc kernels? Currently, it
seems the 2.6.25 thinkpad-acpi will be quite useless at least on T61.

Cheers,
--

-- 
Yves-Alexis
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@...
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

Gmane