You are not logged in.

#1 2012-10-03 04:27:26

DeletedUser210719
Banned
Registered: 2012-04-20
Posts: 68

Trouble with Laptop-Mode-Tools, AC Plug-In

I can't get Laptop-Mode-Tools to recognize when I plug my AC in, I have options for "AC_" as it says are allowed in the man page and ArchWiki, although there are no examples of just having the prefix "AC_".

However, it says it should behave in the same way as "BATT_" does, independant of the laptop-mode status.

I have LM enabled for AC in laptop-mode.conf, and acpi_listen has output for the AC in/out.   My current workaround is to have it as it is, with "LM_AC_*", but having entries for exclusively battery and AC is easier for me as I plan to always keep Laptop-Mode-Tools enabled.

Is there something I misconfigured, or may I have misunderstood the manual/wiki?

Alternatively, how would I go about debugging? I noticed there was a variable enabling debugging, but I couldn't find where the debugging output occurs.  I am a little new with regards to standard debugging practice.

Last edited by DeletedUser210719 (2012-10-03 06:23:05)

Offline

#2 2012-10-03 04:58:18

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Trouble with Laptop-Mode-Tools, AC Plug-In

You should really pay attention to the pacman output.  It clearly lists an optional dependency for acpid, which gives this function.  Though there are other methods to achieve this as well.

Offline

#3 2012-10-03 05:34:12

DeletedUser210719
Banned
Registered: 2012-04-20
Posts: 68

Re: Trouble with Laptop-Mode-Tools, AC Plug-In

It says on the acpid page that the optional dependancy is perl...I'm sorry, I guess I'm not fully understanding what you mean.  Specifically, I am not sure why this would impair the use of the AC_ when there is no mention in the info (manual/ArchWiki) on either acpid or laptop-mode-tools about installing perl.  Especially since BATT_ works as expected.  I did mention that acpi_listen gives me output for both pluggin in/out my AC, so it seemed to me as an issue more likely with Laptop-Mode-Tools than acpid.

I would greatly appreciate it if you could elaborate just a bit.

Last edited by DeletedUser210719 (2012-10-03 06:23:44)

Offline

#4 2012-10-03 05:41:19

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Trouble with Laptop-Mode-Tools, AC Plug-In

`--> pacman -Si laptop-mode-tools
Repository     : community
Name           : laptop-mode-tools
Version        : 1.61-2
...
Optional Deps  : acpid: ACPI support
                 bluez: bluetooth support
                 hdparm: hard disk power management
                 sdparm: SCSI disk power management
                 ethtool: ethernet support
                 wireless_tools: WiFi support
                 xorg-xset: DPMS standby support
...

acpid is an optional depend of laptop-mode-tools as shown above.  Use it to turn laptop-mode-tools on and off when you plug and unplug.  This can also be achieved by using other tools.  I think upower would do it and a udev rule would work as well.

Of course "BATT_ works as expected"... you started the damn daemon/service, right?  Now you just need something to turn it off when you plug in, and in turn, back on when you unplug.

Offline

#5 2012-10-03 05:59:18

DeletedUser210719
Banned
Registered: 2012-04-20
Posts: 68

Re: Trouble with Laptop-Mode-Tools, AC Plug-In

Yes, acpid.service and laptop-mode-tools.service are both enabled in systemd.

So there is no way to leave laptop-mode enabled while plugged in, for managing CPU frequencies, etc. while on AC?  It looked like there was an option in /etc/laptop-mode/laptop-mode.conf that says ENABLE_LAPTOP_MODE_ON_AC, I'm afraid I may have misunderstood its meaning.

The top of the same file added to my confusion, with the line "AC_something=value".  That led me to believe that, like BATT_, I was able to set options for AC independant of the state of laptop-mode.

So I have no little other choice than to rely on upower/udev?

Last edited by DeletedUser210719 (2012-10-03 06:30:18)

Offline

#6 2012-10-03 06:19:40

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Trouble with Laptop-Mode-Tools, AC Plug-In

I don't think we are having the same conversation here...

I don't use laptop-mod-tools, but I have looked into it before.  Things that say AC* are going to be set while on A/C, settings that say BATT* are going to be set while one battery.  To change between the two states you need to use acpid.  Don't necessarily expect to simply install acpid and ba-boom.... f*cking magic!  You have to set it up.

Take a look at the output of acpi_listen that you spoke of earlier.  Now take a look at /etc/acpid/handler.sh.  Now RTFM and make it do what you want.

Edit: BTW, I find your random, non-sensical use of bold to be rather irritating.

Last edited by WonderWoofy (2012-10-03 06:20:49)

Offline

#7 2012-10-03 06:40:57

DeletedUser210719
Banned
Registered: 2012-04-20
Posts: 68

Re: Trouble with Laptop-Mode-Tools, AC Plug-In

I'm terribly sorry, I fixed everything I had made bold.  I was trying to make the technical things stand out for people that were just glancing at the post. But you're absolutely right, I should have used more discretion.

As for the configuration, I did not expect it to magically do what I want.  I will provide a more concrete example of what I am talking about, if it helps.

In /etc/laptop-mode/conf.d/lcd-brightness.conf, I have BATT_BRIGHTNESS_COMMAND="echo 0".  This works: when I unplug AC, 0 gets output to /sys/class/backlight/acpi_video0/brightness.

However, when I attempt AC_BRIGHTNESS_COMMAND="echo 15" (less than /sys/class/backlight/acpi_video0/max_brightness, hopefully demonstrating my reading of laptop-mode.conf), it is unsuccessful.  Instead, I currently use LM_AC_BRIGHTNESS_COMMAND="echo 15" as a workaround.  BATT_BRIGHTNESS_COMMAND works without editing /etc/acpid/handler.sh, I was simply wondering why the AC counterpart does not.

I hope I have now supplied enough information now allows us to be on the same page, and I apologize again for the offensive formatting.

Offline

Board footer

Powered by FluxBB