You are not logged in.
Is there any way to keep the computer on when the screen is closed so it can play music and do other things?
Offline
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)
#!/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 0and 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.... ![]()
Last edited by mkrishnan (2007-11-13 11:21:13 am)
Offline
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
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:
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
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
whats the command so instead of standby it shuts the eeepc down?
Derek,
Offline
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.
Offline
turn off the main display with Fn and F5
it'll cycle between laptop laptop+external external only
Derek,
Offline
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.
Offline
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
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.
Offline
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
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
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"![]()
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)
Offline
Try this little bash script:
#!/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
fiOffline
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.
Offline
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...
Offline
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 0and 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....
What do you do to save your changes in the terminal?
Offline
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.
Offline
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
you can then just make a shortcut in simpleui.rc -
<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>
Last edited by n4sa (2007-12-19 6:56:30 pm)
Offline
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
try "./lid-close.sh" or "sudo bash ./lid-close.sh"
Offline
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.
#!/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 0Last edited by monouk (2008-01-04 6:02:03 pm)
Offline
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
If you use the method described by rs-px in post 3 above it is easy.
Alternatively, you can press Fn F1
Offline
aaahh, function F1...genius. thanks a lot man.
Offline