Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2007-11-13 10:57:57 am

PickleHead
Member
Registered: 2007-10-29
Posts: 39

Bypass standby when screen is closed?

Is there any way to keep the computer on when the screen is closed so it can play music and do other things?

Offline

 

#2 2007-11-13 11:19:42 am

mkrishnan
Moderator
From: Chicago, IL, USA
Registered: 2007-11-06
Posts: 3433

Re: Bypass standby when screen is closed?

You could edit the /etc/acpi/lidbtn.sh script... (i.e. sudo pico /etc/acpi/lidbtn.sh) that script gets executed when the lid is closed. If you comment out the line in there that calls suspend2ram.sh (put a '#' at the beginning of the line)

Code:

#!/bin/sh
LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'`

if [ $LID_STATE = "closed" ] ; then
#        /etc/acpi/suspend2ram.sh
fi
exit 0

and then

sudo /etc/init.d/acpid restart

It should make it so nothing happens when you close the lid... you can remove the # and then do the restart command again to get it back.

Unlike a normal laptop, this should be innocuous (no magnetic HD to break), but be careful not to run the battery down.

I tried it just now and it works...of course, the speakers are in there, so.... wink

Last edited by mkrishnan (2007-11-13 11:21:13 am)


Mohan

Offline

 

#3 2007-11-13 11:23:33 am

rs-px
Senior Member
Registered: 2007-11-05
Posts: 146

Re: Bypass standby when screen is closed?

PickleHead wrote:

Is there any way to keep the computer on when the screen is closed so it can play music and do other things?

Open a terminal and type

Code:

sudo mv /etc/acpi/lidbtn.sh /etc/acpi/lidbtn.sh.moved

To restore the ability of your computer to suspend when the screen is closed:

Code:

sudo mv /etc/acpi/lidbtn.sh.moved /etc/acpi/lidbtn.sh

Note that the heat rising from the keyboard might damage the screen should the computer be closed and still running. This is said to have damaged a few Apple notebooks that operated in this manner.

Offline

 

#4 2007-11-13 11:55:31 am

PickleHead
Member
Registered: 2007-10-29
Posts: 39

Re: Bypass standby when screen is closed?

Thanks a lot! It seems as long as the vent is clear, the heat will get out, been running it for a while closed and the keyboard is still pretty cool! I need to stream some www.di.fm while I read this boring book :p

Offline

 

#5 2007-11-17 1:42:55 pm

LiquidGands
Member
Registered: 2007-11-14
Posts: 30

Re: Bypass standby when screen is closed?

whats the command so instead of standby it shuts the eeepc down?

Derek,

Offline

 

#6 2007-11-17 1:56:06 pm

Niel1952
Moderator
From: Cambridge, UK
Registered: 2007-11-02
Posts: 4802

Re: Bypass standby when screen is closed?

Will this still allow you to keep working using an external screen/keyboard and mouse?  I'd quite like to be able to (pseudo) dock my eec.  If I do so, are there things I can do to dissipate the heat effectively, other than balancing it on three toilet roll holders?  I was thinking of standing it on baking tray making a stand with a USB fan attached to suck/blow air to the bottom.

I assume the internal screen is still on when you do this because other threads have indicated that in Linux the internal and external screens mimic each other.


[Tweaking for] Absolute Beginners - A Guide to tweaking the Eee PC with wizards.
eeeuser Google Custom Search - THE eeeuser.com Search Tool

Offline

 

#7 2007-11-17 2:04:26 pm

LiquidGands
Member
Registered: 2007-11-14
Posts: 30

Re: Bypass standby when screen is closed?

turn off the main display with Fn and F5
it'll cycle between laptop laptop+external external only

Derek,

Offline

 

#8 2007-11-17 2:13:03 pm

Niel1952
Moderator
From: Cambridge, UK
Registered: 2007-11-02
Posts: 4802

Re: Bypass standby when screen is closed?

LiquidGands wrote:

turn off the main display with Fn and F5
it'll cycle between laptop laptop+external external only

Doh! Of course...

Thanks for that.


[Tweaking for] Absolute Beginners - A Guide to tweaking the Eee PC with wizards.
eeeuser Google Custom Search - THE eeeuser.com Search Tool

Offline

 

#9 2007-11-29 7:35:12 pm

Niel1952
Moderator
From: Cambridge, UK
Registered: 2007-11-02
Posts: 4802

Re: Bypass standby when screen is closed?

I have now connected my eee to my desktop PC using the Belkin Omniview KVM that I bought on eBay on Tuesday for £7.00-odd and which arrived today. 

I have used the code given by re-px above, namely

Code:

sudo mv /etc/acpi/lidbtn.sh /etc/acpi/lidbtn.sh.moved

to stop the eee suspending when the screen is closed and Fn F5 as suggested by LiquidGands to blank the eee screen and switch to the big monitor.  This means I can now shut my eee lid and flick between my eee and my desktop PC using my big monitor, keyboard and mouse on both.  I still have two usb ports free to plug in various peripherals.  Although the fan on the eee comes on the unit does not seem to be getting excessively hot.

Now that I know this works, I regret not having bought the Belkin Omniview KVM with audio support

I would be very grateful if someone with Linux experience could show me how to write a script that can toggle between the two states suggested by LiquidGands and show me how to put a shortcut on the desktop or toolbar in advanced mode.


[Tweaking for] Absolute Beginners - A Guide to tweaking the Eee PC with wizards.
eeeuser Google Custom Search - THE eeeuser.com Search Tool

Offline

 

#10 2007-11-29 8:06:46 pm

dcjohn
Member
Registered: 2007-11-26
Posts: 20

Re: Bypass standby when screen is closed?

As someone who's also new to Linux, I'd also appreciate seeing how to (a) make a script for these commands and (b) to create an alias for these scripts that can go on the desktop (and/or perhaps a keyboard shortcut).

I suspect there are lots of Linux newbies to the Eee who would like to know how to do this in general, not just for this handy application, and it certainly seems like a wiki-worthy how to make executable scripts (I think of 'em as batch files b/c of my DOS background).

Offline

 

#11 2007-11-29 9:24:27 pm

pounce
Member
Registered: 2007-11-20
Posts: 11

Re: Bypass standby when screen is closed?

If you are running XP just go into:

Settings>Control Panel>Power Options>Advanced>Power buttons>When I close the lid of my portable computer

Set the value to "Do nothing".

Offline

 

#12 2007-12-03 6:03:13 am

snailofsatan
Member
From: Berkshire
Registered: 2007-11-14
Posts: 10

Re: Bypass standby when screen is closed?

i'd love a little script to toggle between these two states too.. that would be amazing.. i've done the code changes as above and all works fine.. but i want to be able to turn off this mode easily when i want to work on an external monitor only.. and have this on when i'm on the 7"

smile

when i'm listening to some internet radio (bassdrive atm!) the audio cuts off at the same time as it turns the screen off. this is whe it's going through my external monitor and then back to my amp. (looks sweet in 1680 x 1050 though!)

Last edited by snailofsatan (2007-12-03 6:06:19 am)


Black 4GB/512MB 701 | Full Desktop Mode

Offline

 

#13 2007-12-03 7:18:36 am

flinch
Member
Registered: 2007-11-27
Posts: 52

Re: Bypass standby when screen is closed?

Try this little bash script:

Code:

#!/bin/bash

# when file .moved exists, revert to original state else move file.
# this shoult toggle the state...
# start script with super user privileges, i.e. sudo scriptname

if [ -e /etc/acpi/lidbtn.sh.moved ]; then
    mv /etc/acpi/lidbtn.sh.moved /etc/acpi/lidbtn.sh
else
    mv /etc/acpi/lidbtn.sh /etc/acpi/lidbtn.sh.moved
fi

black 4g with beryl on default xandros & ubuntu 7.10 on external harddrive

Offline

 

#14 2007-12-03 8:19:22 am

Niel1952
Moderator
From: Cambridge, UK
Registered: 2007-11-02
Posts: 4802

Re: Bypass standby when screen is closed?

Thanks, flinch

I will try that tonight.  However, I think you will find that a lot of us are still so new to Linux that we don't know how to (a) make that exectuable and (b) put a link to that executable on the desktop.  I will try to work this out but if anyone wants to make it easier for me by posting simple instructions here, it would be much appreciated.


[Tweaking for] Absolute Beginners - A Guide to tweaking the Eee PC with wizards.
eeeuser Google Custom Search - THE eeeuser.com Search Tool

Offline

 

#15 2007-12-03 1:42:17 pm

flinch
Member
Registered: 2007-11-27
Posts: 52

Re: Bypass standby when screen is closed?

In a hurry: try "chmod a+x scriptname" to make it executable and call it through "./scriptname" - About linking to the desktop: I don't know, will get my eee in january as far as I know...


black 4g with beryl on default xandros & ubuntu 7.10 on external harddrive

Offline

 

#16 2007-12-03 6:58:00 pm

mwg3c
Senior Member
Registered: 2007-10-11
Posts: 122

Re: Bypass standby when screen is closed?

mkrishnan wrote:

You could edit the /etc/acpi/lidbtn.sh script... (i.e. sudo pico /etc/acpi/lidbtn.sh) that script gets executed when the lid is closed. If you comment out the line in there that calls suspend2ram.sh (put a '#' at the beginning of the line)

Code:

#!/bin/sh
LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'`

if [ $LID_STATE = "closed" ] ; then
#        /etc/acpi/suspend2ram.sh
fi
exit 0

and then

sudo /etc/init.d/acpid restart

It should make it so nothing happens when you close the lid... you can remove the # and then do the restart command again to get it back.

Unlike a normal laptop, this should be innocuous (no magnetic HD to break), but be careful not to run the battery down.

I tried it just now and it works...of course, the speakers are in there, so.... wink

What do you do to save your changes in the terminal?

Offline

 

#17 2007-12-04 9:05:19 am

flinch
Member
Registered: 2007-11-27
Posts: 52

Re: Bypass standby when screen is closed?

mwg3c wrote:

What do you do to save your changes in the terminal?

If you are using pico as an editor (sudo pico):

Type CTRL+O to save the file and then CTRL+X to close the program.


black 4g with beryl on default xandros & ubuntu 7.10 on external harddrive

Offline

 

#18 2007-12-11 10:05:28 pm

drware
New member
Registered: 2007-12-10
Posts: 7

Re: Bypass standby when screen is closed?

I added to flinches script to print out the current status  and ask if you want to toggle it:


#!/bin/bash

# when file .moved exists, revert to original state else move file.
# this shoult toggle the state...
# start script with super user privileges, i.e. sudo scriptname

if [ -e /etc/acpi/lidbtn.sh ]; then
    echo "

    Eee is set to sleep when the lid is closed"
else
    echo "



    Eee is set to stay awake when the lid is closed"
fi

echo -n "

    Do you want to toggle this state?   

  (y/n/quit):"
read -e ANSW

# Read answer
if [ $ANSW = y ]; then

if [ -e /etc/acpi/lidbtn.sh.moved ]; then
    sudo -H mv /etc/acpi/lidbtn.sh.moved /etc/acpi/lidbtn.sh
    clear
    echo "



    Closing lid will now cause the Eee to sleep

"
else
    sudo -H mv /etc/acpi/lidbtn.sh /etc/acpi/lidbtn.sh.moved
    clear
    echo "



    Closing lid will now do nothing

"
fi

sleep 2

else
sleep 1
exit 0
fi
exit 0

Last edited by drware (2007-12-12 11:33:27 am)

Offline

 

#19 2007-12-19 6:51:45 pm

n4sa
Member
From: Brisbane, Australia
Registered: 2007-12-11
Posts: 37

Re: Bypass standby when screen is closed?

you can then just make a shortcut in simpleui.rc -

Code:

<parcel simplecat="Settings" extraargs="/home/user/lcdstate.sh"
    icon="full_desktop_norm.png"
    selected_icon="full_desktop_hi.png">
    <name lang="en">Lid Toggle</name>
    <name lang="zh_TW">Lid Toggle</name>
    <name lang="zh_CN">Lid Toggle</name>
    <desc lang="en">Toggles between stay on and sleep mode</desc>
</parcel>

http://i103.photobucket.com/albums/m144/n4sa/snapshot1.jpg

Last edited by n4sa (2007-12-19 6:56:30 pm)

Offline

 

#20 2007-12-31 1:07:58 pm

utkcito
Member
Registered: 2007-12-30
Posts: 30

Re: Bypass standby when screen is closed?

Hi! I copied drware's text and pasted into nano, named it "lid-close.sh", put it on the desktop and gave it executable status using chmod. but how do i run it???? I tried (through the console) lid-close, lid-close.sh, sudo lid-close, sudo lid-close.sh, and it always gives me the same answer: command not found! (I always do it while being in the correct directory, desktop - if is type ls, i can see the file).

The file is on my desktop, how do i make it so that if i double click (or click + enter) on the file it runs?

Any suggestions for a DOS/windows guy wetting his feet in Linux's ocean?

Thanks,

Uriel.

Offline

 

#21 2008-01-04 12:56:18 am

flinch
Member
Registered: 2007-11-27
Posts: 52

Re: Bypass standby when screen is closed?

try "./lid-close.sh" or "sudo bash ./lid-close.sh"


black 4g with beryl on default xandros & ubuntu 7.10 on external harddrive

Offline

 

#22 2008-01-04 6:00:58 pm

monouk
New member
Registered: 2008-01-04
Posts: 4

Re: Bypass standby when screen is closed?

Is this what you guys wanted? Heres my lidbtn.sh
(sudo nano /etc/acpi/lidbtn.sh, paste, ctrl+x, y)

Close the lid: switch to CRT output
Open the lid: switch to LCD output

I havent tested it very much with external devices so let me know how it works.

Code:

#!/bin/sh
LID_STATE=`cat /proc/acpi/button/lid/LID/state | awk '{print $2 }'`

if [ $LID_STATE = "closed" ] ; then
#    /etc/acpi/suspend2ram.sh
        /bin/su user -c "/usr/bin/xrandr --output VGA --mode 800x600 --output LVDS --off"
fi
if [ $LID_STATE = "open" ] ; then
        /bin/su user -c "/usr/bin/xrandr --output LVDS --preferred --output VGA --off"
fi
exit 0

Last edited by monouk (2008-01-04 6:02:03 pm)

Offline

 

#23 2008-01-15 12:14:23 am

evilgenius
Member
Registered: 2008-01-11
Posts: 69

Re: Bypass standby when screen is closed?

if you shut off the suspend mode when u close the lid, is there another way to suspend or standby the eee pc in xandros full desktop mode?

Offline

 

#24 2008-01-15 1:51:38 am

Niel1952
Moderator
From: Cambridge, UK
Registered: 2007-11-02
Posts: 4802

Re: Bypass standby when screen is closed?

If you use the method described by rs-px in post 3 above it is easy.

Alternatively, you can press Fn F1


[Tweaking for] Absolute Beginners - A Guide to tweaking the Eee PC with wizards.
eeeuser Google Custom Search - THE eeeuser.com Search Tool

Offline

 

#25 2008-01-15 9:40:04 am

evilgenius
Member
Registered: 2008-01-11
Posts: 69

Re: Bypass standby when screen is closed?

aaahh, function F1...genius. thanks a lot man.

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson