Results 1 to 5 of 5

Thread: using custom powersaving script

  1. #1

    Default using custom powersaving script

    Hi,

    I would like to run a few commands when my laptop is using battery power. I managed to write an ACPI script which is duly executed by acpid every time the AC adapter is connected/disconnected, but for some reason, my values are overwritten by something else.
    Same happened before when I was setting the values as default using an init script, the settings were correct until I plugged out the ac adapter or plugged it in. Every time I did that, the values reset to default.

    Can someone please hint me in the right direction to as what application might be overwriting my values on ac adapter events? No other ACPI script seems to touch anything of those values.

    These are the commands I'm trying to run, and _AT LEAST_ the /proc/sys/vm entries are overwritten by something else to default (500 and 0) every time an ac adapter event occurs.
    echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
    echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
    echo 5 > /proc/sys/vm/laptop_mode
    echo 7 > /sys/bus/pci/drivers/iwl3945/0000:03:00.0/power_level
    /usr/bin/hal-disable-polling --device /dev/scd0
    echo "disable" > /proc/acpi/ibm/bluetooth
    /sbin/hdparm -q -S 60 /dev/sda


    Help would be very much appreciated,
    Sincerely,


    Alex

  2. #2
    Join Date
    Jul 2008
    Location
    Ljubljana
    Posts
    522

    Default Re: using custom powersaving script

    If you're on KDE, then it's kpowersave: if you right-click on its icon in system tray and configure it, you'll see there's a default power saving scheme for "AC" and a default power scheme for "battery". They get invoked automatically each time you plug or unplug the power cord. You may be able to disable that or, alternatively, disable kpowersave altogether.
    http://stopsoftwarepatents.eu/
    Even if free software were ****, it should still get our preference over the non-free **** secreted by IT corporations.
    A free rephrasing of RMS

  3. #3

    Default Re: using custom powersaving script

    Quote Originally Posted by JosipBroz View Post
    If you're on KDE, then it's kpowersave: if you right-click on its icon in system tray and configure it, you'll see there's a default power saving scheme for "AC" and a default power scheme for "battery". They get invoked automatically each time you plug or unplug the power cord. You may be able to disable that or, alternatively, disable kpowersave altogether.
    Thanks for your answer, but I'm using GNOME, and I can't seem to find any settings in the gnome power manager about that.
    Any further ideas?

  4. #4

    Default Re: using custom powersaving script

    Nevermind,I just installed laptop_mode-tools which does pretty much everything I need and even more.
    The version shipping with openSUSE 11.1 is a bit outdated and hasn't as many "plugins" as the new version on the official page, so anyone who reads this might want to check out the official page.

    Sincerely,
    Alex

  5. #5

    Default Re: using custom powersaving script

    Sorry to bring up an old thread, but I read on the Thinkwiki site that if we are using Suse then it's not recommended to use laptop tools as powersaved already takes care of it.

    Any comments? I'd like to refine my power management but not sure what to do.
    IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSUSE Tumbleweed
    Dell XPS 13 9360 | openSUSE Leap 42.3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •