WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: suspend-to-ram (STR) in dCore-5.13.11.06  (Read 9255 times)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
suspend-to-ram (STR) in dCore-5.13.11.06
« on: November 12, 2013, 02:30:51 AM »
hi friends,

did you succeed with suspend-to-ram?
after the resume i get a black screen and the system seems to be frozen:
no effect for key strokes like shift, num-lock.
this behavior or problem is often reported in the web community, especially with my i915-intel-card :(

one major problem seems to be that for /sys/power/state even root has no permission and some commands think that it doesn't exist (the file is there but with the editor of midnight-commander strange characters are in line2).

i tried pm-utils, uswswap and acpid with s2ram with different options...
and added the boot-code acpi_sleep=s3_bios.

do you think that the kernel has all needed options or do i need more modules loaded?
i know that it's a common problem, but i'm curious whether you succeeded.

thank you for your replies.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #1 on: November 12, 2013, 01:30:57 PM »
What about
Code: [Select]
cat /sys/power/state
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #2 on: November 12, 2013, 02:55:22 PM »
hi tinypoodle,

that's what i get:

tc@box:~$ cat /sys/power/state
mem disk

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #3 on: November 12, 2013, 03:12:07 PM »
This means basically your system has capabilities to suspend to RAM and/or disk; my guess is that it might not be the best idea then to use mc to peek at /sys files.
Generally speaking, behaviour of suspend depends to a big degree on hardware and BIOS; and probabilities of success are higher with STD compared to STR.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #4 on: November 12, 2013, 03:32:49 PM »
Quote
This means basically your system has capabilities to suspend to RAM and/or disk; my guess is that it might not be the best idea then to use mc to peek at /sys files.
yes, you're right that mc is not the best tool.
usually
tc@box:~$ echo mem >/sys/power/state
bash: /sys/power/state: Permission denied
should work.
 
Quote
Generally speaking, behaviour of suspend depends to a big degree on hardware and BIOS; and probabilities of success are higher with STD compared to STR.
with microcore 4.7.7 and xvesa i have no problem at all to suspend-to-ram.
i'm not sure whether xorg or the newer kernel causes this problem.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #5 on: November 12, 2013, 03:41:39 PM »
You need to be root to echo to /sys.
Easy to try if anything changes while Xorg is not running ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #6 on: November 12, 2013, 07:02:41 PM »
netnomad -

Does this also happen in regular Core 5.x, with the 3.8.10 kernel?

That would help narrow it down to kernel, which on searching google it appears to be kernel related for those cases.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #7 on: November 12, 2013, 07:04:54 PM »
hi tinypoodle,

after
tc@box:~$ sudo su
root@box:/home/tc# echo mem > /sys/power/state
the system falls immediately into sleep... it seems that there is no time to save the state.
when i try to wake up the system, only a white cursor in the left upper corner is blinking and no key stroke seems to give any feedback.
the system shows the same behavior, if i leave xorg and use the commands on the command line without xorg.
the main button is the only way to reboot the system, no ctrl-alt-delete or alt+print+RIESUB show any reaction :(

hi jason w,
sorry, but i didn't try the regular core 5.x with the 3.8.10 kernel yet.

thank you for your help.
« Last Edit: November 12, 2013, 07:07:52 PM by netnomad »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #8 on: November 12, 2013, 07:28:05 PM »
"leave xorg" is ambiguous, do you mean you just switched to a VT or you killed the Xorg PID?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #9 on: November 12, 2013, 11:17:20 PM »
I just now seen the same behavior in TC 5.x suspend to disk with Xvesa as well as dCore with a newer kernel suspend to RAM. Maybe the newer kernel, maybe not at this point.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #10 on: November 13, 2013, 01:24:34 AM »
"leave xorg" is ambiguous, do you mean you just switched to a VT or you killed the Xorg PID?
hi tinypoodle,

i did "Exit to prompt" with "TC Exit options", so i probably killed xorg pid.


Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #11 on: November 13, 2013, 01:27:39 AM »
I just now seen the same behavior in TC 5.x suspend to disk with Xvesa as well as dCore with a newer kernel suspend to RAM. Maybe the newer kernel, maybe not at this point.
hi jason w,

with 4.7.7 and some native debian-configurations i succeeded with a script like this:

#!/bin/sh

vt='/usr/bin/fgconsole'
sudo rmmod oss_ich
sudo rmmod oss_usb
sudo rmmod oss_hdaudio
sudo rmmod osscore
sudo s2ram --force --vbe_save
/usr/bin/chvt $vt
sleep 1
sudo modprobe osscore
sudo modprobe oss_hdaudio
sudo modprobe oss_usb
sudo modprobe oss_ich

the black-display-problem could be prevented with the change of the virtual terminal...
... the other lines are just for the sound modules
« Last Edit: November 13, 2013, 01:47:07 AM by netnomad »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #12 on: November 13, 2013, 06:33:29 AM »
Eh, not exactly same subtlety of methods...
Please try with s2ram with same parameters then, and stop OSS4 first, IIRC with Core you should first execute the script to stop OSS4 rather than directly rmmod'ing the modules.
I suggest you try manually issuing one command after the other and not using scripting until you got it to work.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #13 on: November 13, 2013, 06:42:50 AM »
hi tinypoodle,

i don´t use this script for testing in dCore,
i use it only in microcore 4.7.7 and it works properly on my and many different further hardware-environments.

in my testing with dCore i just try single commands in xterm (or after "Exit to prompt" with "TC Exit options") like

s2ram
s2ram -f
s2ram -f -p -m

but it´s always the same result :(

what do you think about this approach?
https://ubuntuforums.org/showthread.php?t=1978290
« Last Edit: November 13, 2013, 06:48:58 AM by netnomad »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: suspend-to-ram (STR) in dCore-5.13.11.06
« Reply #14 on: November 13, 2013, 07:10:30 AM »
I wouldn't know about that link, but if it works for you with 4.7.7 you should first try the exact same steps, and preferably test with regular Core 5.x as Jason W suggested in Reply #6 for a diagnostic conclusion.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)