The expanses of WolfWings' land
scratched on the wall for all to see

December 1st, 2008
December 1st, 2008
December 1st, 2008
December 1st, 2008
December 1st, 2008

[User Picture]04:42 am - Wow, the Linux ACPI interface is kinda half-borked.

Okay... so I've been working more and more under Linux, especially since Left 4 Dead appears to have a Linux client coming soon so the last game I'd been having some problems with under WINE (Steam in-game overlay issues under x64 w/ nVidia binary drivers) will be going away.

So, I started taking a hard look at what worked, and what didn't under Linux right now, versus the Windows XP Professional x64 install I've been dual-booting into.

Okay, the Linux side sounds easy to get up to snuff, right? Overall it's in the lead already. So... first task, the last of the multimedia hotkeys like the volume buttons.

There's a handy thinkpad_acpi module, links into the ThinkPad-specific CMOS and BIOS stuff to read status of all the fancy-nice buttons, great!

Problem: It feeds the volume up/down buttons back as keyboard scan codes it shoves into the keyboard-input stack. So there's no way to capture them outside of X on a console, I think.

But wait... there's that nifty ACPI 'button' interface in the kernel. Why isn't it using that?!? Then acpid could capture the event, small shell script, bam, done. Hell, why isn't it using that for ALL the hotkeys to allow for user-mode scripting to control the results?

Turns out, that 'button' interface doesn't let you define new buttons. If it's not a power, sleep, or lid switch, it won't talk to you or let you register that button. Whisker, Tango, Foxtrot?

More digging, turns out it's not supported because they're officially moving away from the /proc/acpi/events interface entirely. So they don't and won't support adding more features to it. Have to enable the 'hal' USE flag in Gentoo, recompile a dozen or so packages, and uninstall the acpid daemon. Time to go submit a Gentoo Bug requesting acpid gets a big warning saying it's not the right approach any longer, to go enable the 'hal' USE flag instead...

This feels a bit like the ugly forced migration from devfs to udev a couple years back that I still dislike, ham-handed and badly PRed. At least this time I can understand the technical reasons they're giving, which is to move everything to a unified event-based interface for all input devices, and I agree that these are definately input devices since they are keys on my keyboard.

I just hope the hal daemon can script these like I want... I'll update later today. This keeps up, I really need to just make a custom Gentoo profile for ThinkPads and upload it somewhere. Not te way I expected to spend my day off though...

1 commentLeave a comment

Log in

No account? Create an account