Suspend Issue

hi everyone.
Im having some trobles with my suspend function.

  1. The Problem
    When my computer is idle for about 15 minuts it get supend and nothing in hell make it wake.

  2. The trys
    2.1 First i had try to configure KDE power manager to never sleep, hibernate at all. (issue continues)
    2.2 I’ve try to disable the acpid execution from yast (issue continues)
    2.3 I’ve search for every piace of configuration who tells about suspend or hibernate on kde and disabled it (issue continues)

after some working hours loss, i did guive up and build an small app who make a mouse moving every 1 minut, so i start this app when i get out from computer.

My intent is the computer never to suspend, becouse when i get out from it i have most of times something working, like a download or some scaning. So the point is - or it suspends when have nothing working on backgroud and when i come back computer can wake - - or it never suspend -.

I every used suse on my laptop and I never had this kind of problem, just got it now im using suse on Desktop. If someone can help me to get the oficial fix for this i wold be glad :slight_smile: - u know wold be nice have a wallpaper instead my mouse moving app :stuck_out_tongue: -

bellow Ill write my SO and Hardware Details, i belive it can helps.

S.O.: Linux 3.1.10-1.9-desktop x86_64 . openSUSE 12.1 (x86_64)
KDE 4.7.2 (4.7.2) “release 5”

Hardware
ASUS M5A88-V-evo
ATI RADEON 6950 x2 (crossFireX not actived)
AMD Phenom™ II X6 1075T Processor

On 2012-05-13 23:26, valtingojer wrote:

> after some working hours loss, i did guive up and build an small app
> who make a mouse moving every 1 minut, so i start this app when i get
> out from computer.
>
> My intent is the computer never to suspend, becouse when i get out from
> it i have most of times something working, like a download or some
> scaning. So the point is - or it suspends when have nothing working on
> backgroud and when i come back computer can wake - - or it never
> suspend -.

I think I may help there, I did it once.

In directory “/etc/pm/sleep.d/” create a file named, for example, 5inhibit
(and make it executable).


#!/bin/bash

.. /usr/lib/pm-utils/functions

RETVAL=0

case "$1" in
suspend)
RETVAL=1
#This does not abort.
touch $INHIBIT
#This does.
MESSAGE="Aborting suspend because it crashes system."
/bin/logger -t pm-utils -p syslog.warn $MESSAGE
echo "$MESSAGE  Touched $INHIBIT"
;;
hibernate)
;;
thaw|resume)
;;
*)
;;
esac
exit $RETVAL

# Idea for $INHIBIT in /usr/lib/pm-utils/sleep.d/30s2disk-check


This should work for a normal suspend, but I don’t know what will happen if
it is repeatedly called. Maybe you can also call your program that emulates
activity from inside that script - blinking a keyboard LED works, I think.

Caveat: I wrote that code adapted from a script of mine (that impedes
hibernation if there is an NFS share active), but I haven’t tested it.
Actually, I also put the same script in my system, but I’m not going to
test it right now, just in case my system does suspend - if it suspends it
does not recover, that I know.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Thanks the tip
Results
Code Only, Code + Link to application and make a file only with link to application named 00name.sh didint work.

Its system not even call thouse files.


Regards

On 2012-05-14 01:36, valtingojer wrote:
>
> Thanks the tip
> Results
> Code Only, Code + Link to application and make a file only with link to
> application named 00name.sh didint work.

Er… sorry, I don’t understand this paragraph. Could you explain again?

> Its system not even call thouse files.

Check the “/var/log/pm-suspend.log”. If there is nothing there, your system
is not suspending: it is the display going in blank mode. You need to set
DPMS off (xorg.conf). Someone else may help there.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

ok sory, my english is not so good.

re-explan:
I follow the steps by making a file with describle code and sugested name, making this file executable and so i let the computer idle>> result computer got suspended
after i made a link to my app on the file, testing if it will start and break the suspend, not worked too
after it i did a file only with link to my app and also didnt work

what i suposed to say is. “It was Like if the system dont call the files” <<<

the pm-suspend log says the suspend was sucefull

–log
/usr/lib/pm-utils/sleep.d/99info hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:

by looking at it, i got to /usr/lib/pm-utils/sleep.d/
and i did try the same 3 steps once sugested to /etc/pm/sleep.d/"

didnt work as well

for the last
i did modify my app to track the mouse position every 1 sec to detect if computer is idle.
if its idle for 8 minuts it makes a mouse moving, and i did put it to start with computer

i think that its not a bad solution for now.

as well tnx the trys :wink:

On 2012-05-14 04:26, valtingojer wrote:
>
> ok sory, my english is not so good.
>
> re-explan:
> I follow the steps by making a file with describle code and sugested
> name, making this file executable and so i let the computer idle>>
> result computer got suspended
> after i made a link to my app on the file, testing if it will start and
> break the suspend, not worked too
> after it i did a file only with link to my app and also didnt work
>
> what i suposed to say is. “It was Like if the system dont call the
> files” <<<

Mmm.

> the pm-suspend log says the suspend was sucefull
>
> --log
> /usr/lib/pm-utils/sleep.d/99info hibernate hibernate: success.
> Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:
> –

Do you see if the script is called, in the log?

Did you check the date and time of the log, at the top?

> by looking at it, i got to /usr/lib/pm-utils/sleep.d/
> and i did try the same 3 steps once sugested to /etc/pm/sleep.d/"

No, that directory is wrong for us.

> for the last
> i did modify my app to track the mouse position every 1 sec to detect
> if computer is idle.
> if its idle for 8 minuts it makes a mouse moving, and i did put it to
> start with computer
>
> i think that its not a bad solution for now.

You are lucky that you have the knowledge to apply that solution.

> as well tnx the trys :wink:

Welcome


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I did the chech about the time log and if the script is being called.
>The time was from many weeks ago, and has no calling from the created script
So i cleaned up the suspend log, side by it I see the Powersave.log
i cleaned it too.

So i let the computer Idle, after it crash the system i got a look on thouse log files.

the suspend log was clean, and powersave had some log.

So i used the xorg tip, i went to the xorg.conf

i searched for all DPMS lines, all of they was set to true. 5 lines with that configuration (\I ask here, is that normal? 5 lines?//). I set all of them to false.

After the next idle the system crashed again.

So i went to powersave log
i used the folder it indicates
/usr/lib/pm-utils/power.d/

so i put inside it 3 scripts

  1. the 5inhibit original script
  2. the 5inhibit modified script calling the mouse moving
  3. a simple script calling the mouse moving

at the next log, the 5inhibit is not initialized.
the script calling the mouse moving is initialized but crash with no such file or directory

i tested the script and it works using the pronpt. I did not undertend why it cant execute when calls at the system (hibernate/suspend) process.

anyway, i did try to clean up the folder /usr/lib/pm-utils/power.d/ i moved all scripts inside it to an tmp_bkp folder, i thoght if have no script it cant do anything.

fail thoght << it crashed again and the new log is using another folder
/usr/lib/pm-utils/sleep.d/

inside that folder i arledy had all 3 scripts we using(5inhibit, 5inhibit modified, script calling mouse moving)

but in this case none of they are being called.

from now i dunno how to name this process, hibernate or suspend or anything else for now im just naming it as system process, so…
at this point the crash continues and im thinking…
all thouse sistem process scripts are being call from somewhere, coldnt we disable this function from the script source who call this function?

actualy i have no idea where to do it and if it cold work, but its just an idea.

even a bit stress its an nice expirience trying to fix it :slight_smile:
i have no much experience on linux, i use it at a considerable time, but every with simple tasks on the laptop. Im work as PHP programmer so all I need is netBeansPHP and Mysql + Apache. Its nice to experience something different and search for a fix with the community :smiley:

regards

On 2012-05-14 22:36, valtingojer wrote:
>
> I did the chech about the time log and if the script is being called.
>> The time was from many weeks ago, and has no calling from the created
> script
> So i cleaned up the suspend log, side by it I see the Powersave.log
> i cleaned it too.
>
> So i let the computer Idle, after it crash the system i got a look on
> thouse log files.
>
> the suspend log was clean, and powersave had some log.

Ok, so either the machine is not suspending, or it crashing before it has a
chance to run the scripts, which would be rare indeed. Suspending can be
initiated in different manners (one by writing something in /proc, I don’t
remember where), or by calling pm-suspend as root or “powersave -u” as
user; but at some point it reaches a point where those scripts are called
in succession (I don’t remember by what), and then calls s2ram which does
the final job. Removing s2ram would avoid suspending, I think.

But, as your log is not altered, I think there is nothing of this, it is
“simply” xorg blanking the machine. One issue I had once was that I had set
a random screensaver, and a few of them crashed the machine because 3D
accel was broken.

And the best manner I know of impeding this nonsense is indeed emulating
keyboard activity. The xine-ui software flips on-off one of the keyboard
leds while it runs - moving the mouse is similar - so you are not the first
to try to block this and had to use such a trick.

You could call it from .xinitrc, perhaps. Would work for all desktops of
that user. Or if there is a global one, it could be
“/etc/X11/xinit/xinitrc”, dunno.

If the bad event happens a bit later, disabling dpms should work, I guess.
But you said you tried… dunno.

Don’t delete those scripts, put them back. They don’t trigger hibernation,
they do things that change it to be safer. Hibernation will happen even if
you remove them.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)