Menu

#16 cpufreq doesn't execute commands when booted off battery

open
5
2006-06-30
2006-06-30
james
No

My setup is set to execute "xset dpms 0 0 15" whenever
my laptop is switched to battery, and "xset dpms 0 0 0"
whenver it's on AC. However, if I boot off the
battery, the screen won't turn off like it's supposed
to. I suspect that the command is run too early and
that when x.org loads, it's overrides that. If you
could think of a solution for this, that would be great.

Thanks for a good program!

Discussion

  • Mattia Dongili

    Mattia Dongili - 2006-07-01

    Logged In: YES
    user_id=584271

    Hello.
    You are right, probably the "xset" command is invoked too
    early when even the X display is missing (needed for xset to
    work).

    I can see to solutions:
    - move X initscript to run early enough and cpufreqd's late
    enough so that this dependency is satisfied
    - write a simple rule like
    [Rule]
    ac=off
    programs=X
    #(or programs=your_window_manager or similar)
    profile=the_same_as_the_simple_ac-off
    exec_post=xset dpms 0 0 0
    #or even put the exec_post in the Profile itself
    [/Rule]
    This may "do the trick" and trigger the command again when X
    runs, does it?

    -- mattia

    PS: doh, I just noticed the exec plugin is undocumented...
    <scribble scribble, now in CVS>

     
  • james

    james - 2006-07-07

    Logged In: YES
    user_id=460995

    I do not think the second part worked.

     
  • Mattia Dongili

    Mattia Dongili - 2006-07-08

    Logged In: YES
    user_id=584271

    can you post the log of cpufreqd with verbosity 7 (-V7) with
    the evidence of it not working and you configuration?

    thanks

     
  • SeventhGuardian

    SeventhGuardian - 2007-04-26

    Logged In: YES
    user_id=1067152
    Originator: NO

    What do you mean by "booting off battery"? Do you mean booting with only the battery or booting without the battery?

    I believe I have a similar problem, that is when cpufreqd is started with the battery disconnected it is unable to read its value from that time on (that is, you get "medium battery life -1%" in the logs). On the other hand if you start cpufreqd with the battery on and then disconnect it then cpufreqd will not update the battery anymore (that is, its capacity will remain as if the battery was connected).

    If required I can submit another bug report..

     
  • Mattia Dongili

    Mattia Dongili - 2007-04-27

    Logged In: YES
    user_id=584271
    Originator: NO

    yes, please. post a different bugreport with some logs from cpufreqd -V7 if possible and your configuration.
    Thanks a lot
    Mattia

     

Log in to post a comment.