| Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind). |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-17-2006, 03:13 PM
|
#1
|
|
Member
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400
Rep:
|
'echo -n mem > /sys/power/state' Operation not permitted error
Status of /sys/power/state:
Code:
root@hb-130 ~ $ ls -l /sys/power/
total 0
-rwxrwxrwx 1 root root 0 2006-08-17 15:04 state
root@hb-130 ~ $ cat /sys/power/state
standby mem
root@hb-130 ~ $
My suspend script (many pointers found elsewhere in the forums:
Code:
#!/bin/sh
# discover video card's ID
ID=`lspci | grep VGA | awk '{ print $1 }' | sed -e 's@0000:@@' -e 's@:@/@'`
# securely create a temporary file
TMP_FILE=`mktemp /var/tmp/video_state.XXXXXX`
trap 'rm -f $TMP_FILE' 0 1 15
# switch to virtual terminal 1 to avoid graphics corruption in X
chvt 1
# write all unwritten data (just in case)
sync
# dump current data from the video card to the temporary file
cat /proc/bus/pci/$ID > $TMP_FILE
# unload modules
rmmod uhci_hcd
rmmod ehci_hcd
rmmod ipw2200
# suspend
echo -n mem > /sys/power/state
# wait
sleep 5
# restore video card data from the temporary file on resume
cat $TMP_FILE > /proc/bus/pci/$ID
# remove left-over dhcpcd pid
rm /etc/dhcpc/dhcpcd-eth*.pid
# reload modules
modprobe uhci_hcd
modprobe ehci_hcd
modprobe ipw2200
# switch back to virtual terminal 7 (running X)
chvt 7
# remove temporary file
rm -f $TMP_FILE
Output of script:
Code:
suspend.sh: line 25: echo: write error: Operation not permitted
Now I'm not sure what's holding it back...
Output of lsmod:
Code:
root@hb-130 ~ $ lsmod
Module Size Used by
ipw2200 73024 0
ehci_hcd 18952 0
uhci_hcd 13580 0
rtc 6580 0
i915 11264 1
drm 41236 2 i915
speedstep_centrino 4176 1
sg 18332 0
snd_seq_oss 19200 0
snd_seq_midi_event 3456 1 snd_seq_oss
snd_seq 29264 4 snd_seq_oss,snd_seq_midi_event
snd_seq_device 3596 2 snd_seq_oss,snd_seq
snd_pcm_oss 25248 0
snd_mixer_oss 10752 3 snd_pcm_oss
xt_tcpudp 2176 1
iptable_mangle 1408 0
ip_conntrack_ftp 3824 0
xt_state 1280 3
iptable_nat 3460 0
ip_nat 8492 1 iptable_nat
ip_conntrack 25056 4 ip_conntrack_ftp,xt_state,iptable_nat,ip_nat
iptable_filter 1408 1
ip_tables 8420 3 iptable_mangle,iptable_nat,iptable_filter
x_tables 6148 4 xt_tcpudp,xt_state,iptable_nat,ip_tables
nls_iso8859_1 3456 1
ntfs 165652 1
video 9732 0
thermal 7304 3
processor 12388 2 speedstep_centrino,thermal
fuse 21768 0
fan 2180 0
button 3344 0
battery 5764 4
ac 2308 0
b44 13964 0
mii 3072 1 b44
intel_agp 12572 1
agpgart 16332 3 drm,intel_agp
evdev 5376 1
joydev 5696 0
tsdev 3776 0
snd_hda_intel 8340 2
ieee80211 20680 1 ipw2200
ieee80211_crypt 2432 1 ieee80211
snd_hda_codec 99632 1 snd_hda_intel
snd_pcm 45572 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer 11908 2 snd_seq,snd_pcm
snd 26596 9 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer
soundcore 3936 3 snd
snd_page_alloc 4616 2 snd_hda_intel,snd_pcm
Also, why no 'disk' in /sys/power/state ?
Perhaps its a kernel issue?
Pointers welcome 
|
|
|
|
08-18-2006, 12:31 PM
|
#2
|
|
Member
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444
Rep:
|
I am not sure why you are giving the "-n" in the echo line. Try without it.
Also, I would recommend you to try out suspend2. It is not as complicated as it sounds like. Go to suspend2.net and download the proper patch - and get the latest stable kernel from kernel.org. apply the patches.
1. install hibernate script (from suspend2.net)
2. Test your suspend2.
Look in the wiki of suspend2 - it is written in detail. Suspend2 is NOT just fast but also reliable.
Alternatively, just install the hibernate script - try to suspend with hibernate script.
|
|
|
|
08-18-2006, 01:04 PM
|
#3
|
|
Member
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400
Original Poster
Rep:
|
I'll look into it, the 'echo' command gives the same result with or without -n
|
|
|
|
09-08-2006, 05:41 PM
|
#4
|
|
LQ Newbie
Registered: Sep 2006
Posts: 1
Rep:
|
'echo -n mem > /sys/power/state' Operation not permitted error
Did you forget the quote around mem?
# suspend
echo -n "mem" > /sys/power/state
|
|
|
|
10-06-2006, 07:06 AM
|
#5
|
|
Member
Registered: Mar 2003
Distribution: Slackware
Posts: 53
Rep:
|
Did you get a solution for this yet? I am having the exact same problem...
|
|
|
|
10-08-2006, 05:34 PM
|
#6
|
|
Member
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400
Original Poster
Rep:
|
Quote:
|
Originally Posted by patrickdepingui
Did you get a solution for this yet? I am having the exact same problem...
|
Unfortunately I ended up and still am stumped. On Slackware, Zenwalk (Slackware based) this problem persists.... Including Slackware 11.0, which was recently released. One thing I did not try is patching a vanilla kernel with suspend2 ( http://suspend2.net) and using that kernel.
However suspend/resume as well as hibernate work perfectly on my laptop under Fedora Core 5 and 6.
|
|
|
|
10-09-2006, 04:04 AM
|
#7
|
|
Member
Registered: Mar 2003
Distribution: Slackware
Posts: 53
Rep:
|
Quote:
|
Originally Posted by hollywoodb
Unfortunately I ended up and still am stumped. On Slackware, Zenwalk (Slackware based) this problem persists.... Including Slackware 11.0, which was recently released. One thing I did not try is patching a vanilla kernel with suspend2 ( http://suspend2.net) and using that kernel.
However suspend/resume as well as hibernate work perfectly on my laptop under Fedora Core 5 and 6.
|
Luckily I found a solution myself two days ago...
I have a Core Duo laptop, and chances are high you do as well. For hibernate and standby to work on a dual core system, the kernel needs support for "hotpluggable cpu's". I didn't had this enabled in my kernel config...
When patching the kernel with suspend2, they automatically select this option, but I believe that it is not necessary to suspend2 if you don't want to...
After adding the CONFIG_HOTPLUG_CPU option, I was able to write to /sys/power/state ...
Hopefully this works for you too...
|
|
|
|
10-09-2006, 02:45 PM
|
#8
|
|
Member
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400
Original Poster
Rep:
|
Quote:
|
Originally Posted by patrickdepingui
Luckily I found a solution myself two days ago...
I have a Core Duo laptop, and chances are high you do as well. For hibernate and standby to work on a dual core system, the kernel needs support for "hotpluggable cpu's". I didn't had this enabled in my kernel config...
When patching the kernel with suspend2, they automatically select this option, but I believe that it is not necessary to suspend2 if you don't want to...
After adding the CONFIG_HOTPLUG_CPU option, I was able to write to /sys/power/state ...
Hopefully this works for you too...
|
Like I said, I didn't try suspend2, although I suspect it would have worked based on the information I've seen regarding it.
Actually my system is a Pentium M 1.8GHz, single core, no hyper-threading or anything fancy like that.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:38 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|