2009/11/18 daid kahl <daid...@gmail.com>: > Hello, > > After some recent updates, my keyboard shows some strange and > undesirable behavior. It is a MacBook (no previous keyboard > problems), with US mapping and UTF-8 mode. >
It appears that the problem is some unholy alliance between hal-0.5.13-r2 and the 2.6.30 gentoo-sources. I was upgrading from a fairly outdated kernel (2.6.27). Somehow (perhaps because hal looks for configurations in /usr/src/linux), even my old kernel functionality for hotkeys was bungled by the new kernel. The old kernel functionality was regained by rebuilding tons of packages against the properly eselected kernel. However, I have now gotten the hot keys working again in the newer kernel as well. The only unresolved issue is the '@' sign at command prompt is still a line-delete (very queer), but I regained all hotkeys and other features. The basic problem resulted from a new kernel configuration for the Apple hotkeys. Previously it was called USB_HIDINPUT_POWERBOOK (up until at least 2.6.27), but as of 2.6.28 (and up to at least 2.6.30) this is now called HID_APPLE. Although this feature got enabled from doing oldconfig, somehow it 'missed' a dependency. So in the raw .config it's showing up as being activated, but it won't show up in menuconfig. Using the menuconfig search tool (/) then I could check the dependencies of HID_APPLE, which I was missing EMBEDDED (it also depends on HID_SUPPORT && HID && (USB_HID || BT_HIDP)). This is, I suppose, a problem because I didn't follow my own advice to avoid oldconfig from very different kernel versions, as it can result in funky half-baked transformation of rule-name changes like the above. Then once I loaded HID_APPLE as a module, I could add a module rule which I called /etc/modprobe.d/fn-key : options hid_apple fnmode=2 Function mode 2 means that the F1-12 keys should behave as normal function keys, and only act like special hotkeys if I press the 'Fn' key -- I expect most Linux users would want this behavior...unless you like making the claw-hand to Fn-Alt-F4 and close windows... Just for a full report (and Google hits for other unfortunates), in the past, this was done through the usbhid module like: options hid pb_fnmode=2 At some point the battery indicator in xfce4-battery-plugin was reading 0 (tested some other indicators such as the xfce4-power-manager and got the same results). I regained proper battery % display by taking out the battery, rebooting into Mac OS, putting the battery back in, and rebooting back to Gentoo; maybe just temporarily removing the battery alone or booting to Mac OS alone was good enough, but I just did both at once through intuition. It's not at all clear which package was responsible for this bungling, since I was variously upgrading and downgrading e2fsprogs, e2fsprogs-libs, util-linux (none of these three are recommended for switching versions, by the way -- you probably need the buildpkg feature enabled in portage), udev, xf86-input-evdev, hal, device-mapper, and lvm2. If I had to guess, I'd say it was udev since now when I pull the power cable the screen auto-dims, which sounds like a udev feature (but I didn't scan the udev rules.d directory yet) -- but it was almost certainly hal, udev, or evdev, since those were the upgrades when I noticed on reboot that the battery read 0%. pommed had to rebuilt as well to get back volume control features. This was somewhere in the annoyance with ALSA not doing things correctly for my volume. I didn't test it, but it's possible pommed hotkeys don't work correctly in the old kernel now, since alsa and the keyboard mapping changed a bit in the 3 kernel versions. Now that everything works in the new kernel, I don't care to test. I wish my report on the upgrade from 2.6.27 to 2.6.30 was more systematic, but after so much work to get things functional, I'm in no position to go break it all again and pin point exactly the issue. But it seems to have been almost entirely in the kernel. Regards, daid