[opensuse] s2ram -f works -- but only for root -- why?
Listmates, I had never tried suspend to ram before this last thread came across the list. I thought I would give it a try on my relatively new Toshiba Satellite P205D. So following http://en.opensuse.org/S2ram I issued: s2ram -f and I got the following message: 18:42 alchemy~/linux/apps/phoronix-test-suite> s2ram -f fgconsole: getconsolefd: Invalid argument Switching from vt-1 to vt1 chvt: VT_ACTIVATE: Bad file descriptor VT_WAITACTIVE: Bad file descriptor Segmentation fault That looked terrible, so I thought, well, why not try it as root: sudo s2ram -f the screen goes dark and the computer appeared to go to sleep perfectly (little orange blinking light as expected) I wait a few seconds and push the power button, and the system comes right back as it should with the following on the screen: 03:27 alchemy~/linux/apps/phoronix-test-suite> sudo s2ram -f Switching from vt7 to vt1 fbcon fb0 state 1 fbcon fb0 state 0 switching back to vt7 That's excellent. Now why do I have to be root to do it? What permissions can I change so I can suspend it without root privileges? Thanks in advance for any help. -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
David C. Rankin wrote:
sudo s2ram -f
the screen goes dark and the computer appeared to go to sleep perfectly (little orange blinking light as expected) I wait a few seconds and push the power button, and the system comes right back as it should with the following on the screen:
03:27 alchemy~/linux/apps/phoronix-test-suite> sudo s2ram -f Switching from vt7 to vt1 fbcon fb0 state 1 fbcon fb0 state 0 switching back to vt7
That's excellent. Now why do I have to be root to do it? What permissions can I change so I can suspend it without root privileges? Thanks in advance for any help.
Well, s2ram permissions are root only. What you want to do is go through the "official" channels and create and edit the file. Mine is as follows: S2RAM_OPTS="-f --acpi_sleep 1" Just place the appropriate parameters that work for you (in this case only -f) in there. Now when you choose Suspend-to-RAM from the shutdown menu it will use these param to suspend. See http://en.opensuse.org/Pm-utils for full instructions. Manne -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Manne Merak wrote:
David C. Rankin wrote:
sudo s2ram -f
the screen goes dark and the computer appeared to go to sleep perfectly (little orange blinking light as expected) I wait a few seconds and push the power button, and the system comes right back as it should with the following on the screen:
03:27 alchemy~/linux/apps/phoronix-test-suite> sudo s2ram -f Switching from vt7 to vt1 fbcon fb0 state 1 fbcon fb0 state 0 switching back to vt7
That's excellent. Now why do I have to be root to do it? What permissions can I change so I can suspend it without root privileges? Thanks in advance for any help.
Well, s2ram permissions are root only. What you want to do is go through the "official" channels and create and edit the file. Mine is as follows: S2RAM_OPTS="-f --acpi_sleep 1" Just place the appropriate parameters that work for you (in this case only -f) in there. Now when you choose Suspend-to-RAM from the shutdown menu it will use these param to suspend. See http://en.opensuse.org/Pm-utils for full instructions.
Manne
Thanks Manne, That is exactly the info I needed! -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Manne Merak wrote:
Well, s2ram permissions are root only. What you want to do is go through the "official" channels and create and edit the file. Mine is as follows: S2RAM_OPTS="-f --acpi_sleep 1" Just place the appropriate parameters that work for you (in this case only -f) in there. Now when you choose Suspend-to-RAM from the shutdown menu it will use these param to suspend. See http://en.opensuse.org/Pm-utils for full instructions.
Manne
Manne, All is not well in the world of s2ram. Manually s2ram -f seems to work OK restoring the wireless network. However using shutdown->suspend to ram seems to leave the wireless dead, unable to be restored. Normally, the following devices: 18:29 alchemy~> sudo ifconfig ath0 Link encap:Ethernet HWaddr 00:1B:9E:7C:F6:E7 inet addr:192.168.6.102 Bcast:192.168.6.255 Mask:255.255.255.0 inet6 addr: fe80::21b:9eff:fe7c:f6e7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1454 errors:0 dropped:0 overruns:0 frame:0 TX packets:799 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:832274 (812.7 Kb) TX bytes:80129 (78.2 Kb) eth0 Link encap:Ethernet HWaddr 00:1B:38:AF:36:B8 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:252 Base address:0x8000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:63 errors:0 dropped:0 overruns:0 frame:0 TX packets:63 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5637 (5.5 Kb) TX bytes:5637 (5.5 Kb) wifi0 Link encap:UNSPEC HWaddr 00-1B-9E-7C-F6-E7-00-00-00-00-00-00-00-00-00-00 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6155 errors:0 dropped:0 overruns:0 frame:327 TX packets:1239 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:280 RX bytes:938195 (916.2 Kb) TX bytes:124931 (122.0 Kb) Interrupt:19 After the s2ram from the menu, the wifi0 is absent and unable to be restored with rcnetwork stop/start or restarting knetwork manager. This makes little sense in light of the same command being executed each time. In light of your message, I created: 18:32 alchemy~> sudo cat /etc/pm/config.d/s2ram S2RAM_OPTS="-f" Any ideas of other tweaks that would help? -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
David C. Rankin wrote:
After the s2ram from the menu, the wifi0 is absent and unable to be restored with rcnetwork stop/start or restarting knetwork manager. This makes little sense in light of the same command being executed each time. In light of your message, I created:
18:32 alchemy~> sudo cat /etc/pm/config.d/s2ram S2RAM_OPTS="-f"
Any ideas of other tweaks that would help?
Well, running suspend from the menu is bit different from running s2ram. s2ram will just force the PC/laptop into suspend, from the menu pm-utils are used, so other scripts are also executed (to restore video on some machines, or recover the network, etc). In your case the hardware seems not to care to be forced into suspend. That said, check your dir and report back if there are any other scripts and check what they do. Also, check/post your and some detail of your wireless hardware. Manne -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Manne Merak wrote:
David C. Rankin wrote:
After the s2ram from the menu, the wifi0 is absent and unable to be restored with rcnetwork stop/start or restarting knetwork manager. This makes little sense in light of the same command being executed each time. In light of your message, I created:
18:32 alchemy~> sudo cat /etc/pm/config.d/s2ram S2RAM_OPTS="-f"
Any ideas of other tweaks that would help?
Well, running suspend from the menu is bit different from running s2ram. s2ram will just force the PC/laptop into suspend, from the menu pm-utils are used, so other scripts are also executed (to restore video on some machines, or recover the network, etc). In your case the hardware seems not to care to be forced into suspend. That said, check your dir and report back if there are any other scripts and check what they do. Also, check/post your and some detail of your wireless hardware.
Manne
/etc/pm/{sleep,config,power} are all empty except for the s2ram script I created. I did create the /sleep/66dummy script: #!/bin/bash case $1 in hibernate) echo "Hey guy, we are going to suspend to disk!" ;; suspend) echo "Oh, this time we're doing a suspend to RAM. Cool!" ;; thaw) echo "oh, suspend to disk is over, we are resuming..." ;; resume) echo "hey, the suspend to RAM seems to be over..." ;; *) echo "somebody is calling me totally wrong." ;; esac Just for log testing purposes. I'll check the logs and report back. -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
David C. Rankin
-
Manne Merak