a67a Thinkpad ACPI and devd - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Desktop Usage > Mobile Computing

Mobile Computing This forum discusses issues related to running FreeBSD on notebooks, laptops, and other mobile equipment.

Reply
 
Thread Tools Display Modes
  #1  
Old May 15th, 2011, 22:30
wildtollwut wildtollwut is offline
Junior Member
 
Join Date: May 2011
Posts: 24
Thanks: 1
Thanked 1 Time in 1 Post
Default Thinkpad ACPI and devd

Hi,

A problem I encountered when configuring FreeBSD 8.2 on my Thinkpad X61 is the configuration of extra keys like volume up/down, mute and backlight up/down. So far, I figured that volume up/down and the various multimedia keys are handled by ACPI/Kernel?/X11? directly since they are available for example in xev as XF86VolumeUp etc.

Strangely enough, the mute key representation is nowhere to be found but seems to trigger an ACPI event nevertheless (dev.acpi_ibm.0.mute is changed when pressing). Trying to make use of other keys light backlight up, I followed the acpi_ibm documentation closely.

The module is loaded at boot and the event mask is set properly. I have set up /etc/devd.conf as follows:
Code:
notify 10 {
  match "system"      "ACPI";
  match "subsystem" "IBM";
  action "/home/me/print.sh $notify";
};
print.sh is executable and contains:

Code:
echo "$1" >> foo.txt
xbacklight -10
The first line is being executed and the corresponding event is written to foo.txt. However, the xbacklight -10 command is ignored. When omitting the echo line xbacklight is ignored as well. I also tried executing a different shell script (again echoing some string) which works. It only doesn't seem to accept my xbacklight -10 :|

And even funnier: it all works when restarting devd or starting it in debug mode without changing anything else at all.

Any ideas? Thanks a lot!

Last edited by DutchDaemon; May 16th, 2011 at 01:29. Reason: re-read: proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #2  
Old May 15th, 2011, 23:52
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,850
Thanks: 444
Thanked 1,827 Times in 1,494 Posts
Default

Commands run by devd(8) run as root. Use su(1) to run a command as a specific user. You may also have to set the DISPLAY environment variable.

Code:
...
action "su wildtollwut -c '/usr/local/bin/xbacklight -10'";
Reply With Quote
  #3  
Old May 16th, 2011, 20:27
wildtollwut wildtollwut is offline
Junior Member
 
Join Date: May 2011
Posts: 24
Thanks: 1
Thanked 1 Time in 1 Post
Default

Ah, setting DISPLAY fixed it. Thanks!
Now if I only could get some event from the mute button, but I think this is a driver or hardware issue.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make devd automount USB storage devices? irkkaaja Peripheral Hardware 6 April 11th, 2011 16:57
[Solved] devd and da* devices manefesto Peripheral Hardware 4 February 21st, 2011 05:52
8.0 snd_hda & ACPI on my thinkpad SL400 ! miniqq Mobile Computing 1 January 15th, 2010 16:24
ThinkPad: problems with HAL w1k0 Mobile Computing 9 October 30th, 2009 22:11
7.2 on Thinkpad w500? cipher Mobile Computing 5 June 2nd, 2009 13:24


All times are GMT +1. The time now is 01:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0