WolfWings ShadowFlight (wolfwings) wrote,
WolfWings ShadowFlight

  • Mood:

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.

  • Windows?
    Volume buttons work.
    No LCD Brightness control.
    SDHC cards don't read.
    Bluetooth works at 1.0 specs.
    Video card supports dragging windows between >2 monitors.
  • Linux?
    LCD Brightness controls work.
    No volume buttons.
    SDHC cards work fine.
    Bluetooth works at 2.1 specs.
    Video card doesn't support dragging windows between >2 monitors.

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...

Tags: gentoo, linux, t61, thinkpad
  • Post a new comment


    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment