Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Keyboard mappings



On Tue, 23 Jan 2007 09:11:04 +0900
Dave M G <martin@example.com> wrote:

> I do have acpid running as a daemon. And looking in /etc/acpi, there's a 
> whole bunch of shell scripts.
> 
> dave@example.com:~$ cd /etc/acpi
> dave@example.com:/etc/acpi$ ls
> ac.d lid.sh power.sh stopbtn.sh...
In debian there is a package called acpi-support containing these
scripts. I assume it's the same in ubuntu (with possible modifications).

> There's one in there called "sleep.sh", which I assume is the one being 
> called (?).
Debug it then. Put a "touch /sleep.sh_called" in the top and see if the
file gets created if you suspend/resume.
For me, there are some *.d directories (suspend.d, resume.d etc)
containing a bunch of scripts.

You should also figure out what program locks your X. Most likely it is
xscreensaver (or xlockmore). Try to simply remove these packages (though
there is a chance that the X/gnome desktop packages depend on it). If
these binaries are not available, the suspend/resume acpi scripts will
not call them.
If you cannot remove the package due to dependencies, try to identify the
responsible script in /etc/acpi/*.d and remove that.

> At this point I realized that maybe having additional functions like 
> putting the hard drives to sleep and whatnot are a good thing.
That's what those scripts are for in the *.d directories. 

> 2. Map one of the buttons on my remote control to do the exact same 
> action as the "Sleep" button on the keyboard.
If you are using lirc, there should be a dozen howtos that tell you
how to do this. `echo mem >/sys/power/state` does the trick, you just
need to bind this action to your remote's button.

> 3. Map one of the buttons on my remote control to do the exact same 
> action as the "Wake Up" button on the keyboard.
This will be the hard part. What kind of remote do you have? Is it
connected to the tv tuner card or it's some irda thing?
Depending on the power saving mode, the responsible device might not have
enogh power to detect and process the signal. For example in
suspend-to-disk mode, you can only power up with the power button (of the
case) AFAIK. In other power saving states, it depends on the BIOS setup
(which interrupts can trigger a wake event) and a bunch of other factors.

> What I've done so far:
> My remote works, and I have two buttons mapped to do the following:
> xset dpms force off
> xset dpms force on
If you did these, then you should be able to map the command I gave
above. You can use these: âstandbyâ (Power-On Suspend),
âmemâ (Suspend-to-RAM), and âdiskâ (Suspend-to-Disk).
 
HTH.


Attachment: signature.asc
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links