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

Re: Battery monitor and sound adjust short cut



On Sat, Jul 15, 2006 at 17:01:06 +0800, Rocky Ou wrote:
> On 7/13/06, Florian Kulzer wrote:
> 
> >Can any of you tell me how can I enable AC Adaptor and Control Method
> >> Battery please?
> >
> >As far as I remember, the ACPI stuff is compiled as modules in the stock
> >Debian kernels. (I have been using self-compiled kernels for a long
> >time, therefore I am not sure.) You can start by checking if the
> >following modules are loaded: ac, battery, power. If they are not loaded
> >try to modprobe them. If that works without errors you can try to change
> >the setting in the KDE control center again. ACPI support can still be a
> >problem, AFAIK it is broken in some BIOSes and I don't know how easy it
> >is to set it up on Dell laptops.
> 
> 
> I did it according the above instruction and I'm able to configure it in
> Control Center now. But the problem is how can I add the icons to my panel
> please? I tried Right click on panel-->Add Application / Applet to Panel.
> But I could not get it shown on the panel.

The battery monitor icon should show up if you select "Show Battery
Monitor" in the "Battery" tab of the "Control Center > Power Control >
Laptop Battery" menu. The "Start Battery Monitor" button on the bottom
of that tab should work as well.

It will not show up, however, if you (accidentally) disabled the system
tray of the panel. You can activate the system tray by right-clicking on
the panel and selecting "Add Applet to Panel... > System Tray". If the
system tray is already active it might be worth a try to remove it
("Remove From Panel > Applet > System Tray") and add it again. Still no
luck? Check your ~/.xsession-errors log for error messages which might
be related to the battery monitor.

> I> Secondly, under Window XP I can use Fn+Pg Up / Dn key combination to
> >adjust
> >> the volumn. But I do not know how to do in under Debian. Can anyone give
> >> some direction please?
> >
> >If that key combination is supported in the Linux ACPI routines it will
> >generate an ACPI event which you can use to trigger a short script to
> >change the volume by calling alsamixer. This is done by the acpi daemon.
> >You can install the "acpid" package and run "acpi_listen". Press the key
> >combination and check if an event/keycode is displayed. "man acpid" has
> >details on how to proceed from there and you can also have a look at the
> >event and action files which are already present in /etc/acpid.
> 
> 
> While, after I input acpi_listen I got the following infor
> 
> ########
> YUNNAN:/home/lover# acpi_listen
> ac_adapter AC 00000080 00000000
> battery BAT0 00000080 00000001
> processor CPU0 00000080 00000000
> battery BAT0 00000080 00000001
> battery BAT0 00000080 00000001
> ac_adapter AC 00000080 00000001
> battery BAT0 00000080 00000001
> processor CPU0 00000080 00000000
> battery BAT0 00000080 00000001
> battery BAT0 00000080 00000001
> #############

If you press the key combination while acpi_listen is running you should
see something like this:

hotkey ATKD 00000030 00000002

The "00000030" would be the keycode which you need; the other number is
a counter which is incremented every time the key combination is
pressed. I can post an example script here to help you set up the volume
control, but it will not be of any use to you if your system does not
recognize the ACPI event. Like I said before, many laptops offer only
partial ACPI support under Linux, thanks to the Windows-centric
manufacturers and their broken ACPI implementations. Upgrading to the
newest version of the BIOS can sometimes improve the situation. (Please
keep in kind that I have no specific knowledge of your particular laptop
model.)

-- 
Regards,
          Florian



Reply to: