UNSOLVED

anglete

updated

23 years ago

A

anglete

32 Posts

0

12868

December 12th, 2003 16:00

500m ACPI Standby

How do i get this to work?

i got it to blink, but it left the ahrd disk on, the screen on, and the cpu fan running.

I know i can make a script to turn off all of these components before i go into "standby", but i'm not sure what standby is if it doesnt do all of this by itself.

When i try standby (echo "1" > /proc/acpi/sleep) the power light blinks. That is opposed to in windows the power light fading in and out. I have a feeling theres another standby mode i'm missing...

Anybody get this to work right?
  • nos.feratu

    14 Posts

    563

    0

    Posted December 13th, 2003 22:00

    hello,

     

    i've exactly the same problem... have you solved it?

     

    thanks a lot,

     

    thomas

  • kozmic

    5 Posts

    563

    0

    Posted December 14th, 2003 16:00

    i nice set of bashscript for the 500m would be really great if someone could give it out, if someone has written it (im pretty sure someone has) (preferable for the 2.6.0 kernel since it has best support for the dell inspirion 500m laptop)
  • avle

    3 Posts

    563

    0

    Posted December 15th, 2003 16:00

    Hi,
    I have not found a perfect solution yet, power down works ok, in/out of S1 also using these scripts:

    in /etc/acpi/events I have two files, the power down configuration power.conf, and
    the "go to S1" script gotos1.conf

    [root@dill events]# pwd
    /etc/acpi/events
    [root@dill events]# cat power.conf
    # This is a sample ACPID configuration
    event=button/power.*
    action=/sbin/shutdown -h now
    [root@dill events]# cat gotos1.conf
    # send laptop into S1 ACPI mode by turning off screen, disk, etc.
    # still missing a way to turn off the fan, but not sure if that such a
    # good idea anyway...
    event=button/sleep.*
    action=/usr/local/sbin/dvale


    this script is primitive - don't have a way to determine which user sits at the console yet - so XAUTHORITY is hard coded... network card and fan wil still run
    but I think that is a feature of the S1 mode.

    [root@dill events]# cat /usr/local/sbin/dvale
    # !/bin/bash
    # suspend laptop - press power to awake
    export DISPLAY=:0.0
    export XAUTHORITY=/home/avle/.Xauthority
    xset dpms force off
    sync
    hdparm -y /dev/hda
    echo "1" > /proc/acpi/sleep
  • 563

    0

    Posted December 16th, 2003 11:00

    can you find out the name of the user logged into the console by checking ownership of /dev/console? Might work.

    I thought about checking an environment variable such as $USER, $LOGNAME or even $HOME, but that causes problems for cases where you've su'ed to another user.

    or check some other system device, which is set at login...

    just a thought
    cheers
  • avle

    3 Posts

    563

    0

    Posted December 16th, 2003 18:00

    if the user logs in via gdm/xdm I believe it is as easy as

    [avle@dill avle]$ cat /usr/local/sbin/gotos1
    # !/bin/bash
    # suspend laptop - press power to awake
    #
    export DISPLAY=:0.0
    X_USER=`w | grep ":0 " | awk '{ print $1 }'`
    export XAUTHORITY=/home/$X_USER/.Xauthority
    xset dpms force off
    sync
    hdparm -y /dev/hda
    echo "1" > /proc/acpi/sleep


    using owner of /dev/console fail if the user do not use gdm/xdm:
    log in as root first and start X from another console as normal user -
    then /dev/console will be owned by root... so there are many scenarios, one
    possible sol could be to replace the X_USER... line above with this check:

    if [[ `w | grep ":0 "`=="" ]] ; then
    X_USER=`ps -fC startx | grep startx | awk '{ print $1 }'` ;
    else
    X_USER=`w | grep ":0 " | awk '{ print $1 }'` ;
    fi

    but, again, this would fail if the user have two X sessions open simultaneously...
    anyway, since the fan,network and who knows what - is still on, it is maybe
    a good idea to wait for a proper S3 mode...

    Helge
  • nos.feratu

    14 Posts

    563

    0

    Posted December 21st, 2003 15:00

    sorry for the unspecified question. but the suspend to ram mode would be enougth for me. is it possible. do not know about the acpi modes...

    thanks a lot.

    ps.

    i've tried a "echo 3 > /proc/acpi/sleep". and the notebook turns into standby, the correct light blinks. all ok, it seems to be so. pressing the power button, awakes the maschine but the display stays black. after changing to console or restarting the x-server the machine is really on.

    how can i solve this problem?
  • nos.feratu

    14 Posts

    563

    0

    Posted December 21st, 2003 16:00

    adittionally, another thing. i've tried "echo "4" > /proc/acpi/sleep" and the machine shuts down correctly after writing the data into the swap. after starting and resume=/dev/hda11 (this is my swap), it displays the rewriting of data and then it reboots, as nothing was before.

    don't know what to to...

     

    any help can help,

     

    thanks a lot,

     

    yours nosferatu

  • avle

    3 Posts

    563

    0

    Posted December 22nd, 2003 07:00

    with ACPI you get different levels of standby, e.g. from S1 to S5 where S1 turns off the
    lcd, hard drive, etc. except the cpu. (this may be put into a low power mode), S2 turns
    off slightly more, S3 is what most call suspend to memory, S4 turns of even more, S5 is
    full suspend to disk.

    afaik only S1 is functional(/implemented?) in the ACPI levels in linux currently, so S2,S3,...
    will not work for most.
  • nos.feratu

    14 Posts

    563

    0

    Posted December 22nd, 2003 08:00

    oh, understanding is a good thing. but, so i try the scripts above the screen still stays on. i can't do anything, so the cpu seems to be asleep, or a thing. but the display has to be off, so i can close the lid, or connect these script with the closing lid script of acpi (i think, i know how to do this).

    thanks a lot,

    nos.feratu
  • nos.feratu

    14 Posts

    69

    0

    Posted December 27th, 2003 16:00

    so, i've compiled the new 2.6 kernel. except of a few warnings all is ok. my centrino 1.4 is recognized. speedstep is recognitzed too. acpi modules are installed. so my hopes grows. but i think, we are arrested at suspend mode 1, with a running fan and some other unsolved things.

     

    time has gone bye... am i wrong... has anybody found something new?

     

    thanks a lot,

     

    nos.feratu