Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: Roberto A. Foglietta on April 07, 2009, 10:34:43 AM

Title: exittc with suspend support
Post by: Roberto A. Foglietta on April 07, 2009, 10:34:43 AM
At this time suspend is not included into exittc gui, so here you are:

http://www.roberto.foglietta.name/pub/tinycore/exittc.tgz

Package contains stripped pre-compiled executable + fluid project + makefile.

If s2ram does not exist then simply it raises a warning popup and does not exit (anymore).
Title: Re: exittc with suspend support
Post by: roberts on April 07, 2009, 10:41:18 AM
This has been in QA for sometime. What we have found is that suspend does not work on all machines. I didn't want an option listed that could cause a machine to hang and therefore lose data.

When you target a specific machine it is great. When your target is from the very old to the latest it can problematic.

I will take a look, others should too.
Title: Re: exittc with suspend support
Post by: Roberto A. Foglietta on April 07, 2009, 10:49:16 AM
This has been in QA for sometime. What we have found is that suspend does not work on all machines. I didn't want an option listed that could cause a machine to hang and therefore lose data.
I will take a look.

The s2ram options could be set by environment (cfr. the script) and exittc suggest to make the backup before suspend the machine: it would be useful also if the battery discharge completely during the suspend time.  ;)
Title: Re: exittc with suspend support
Post by: tobiaus on April 07, 2009, 04:27:21 PM
it would be useful also if the battery discharge completely during the suspend time.

it would be useful as an option... i'd be pretty angry if the distro i used started guessing things like that. so long as it's all off unless you opt-in, okay.
Title: Re: exittc with suspend support
Post by: jpeters on April 07, 2009, 09:27:18 PM
I just use:

echo -n "mem" > /sys/power/state

I don't know if that works for all machines.
Title: Re: exittc with suspend support
Post by: Roberto A. Foglietta on April 08, 2009, 07:15:28 AM
it would be useful also if the battery discharge completely during the suspend time.

it would be useful as an option... i'd be pretty angry if the distro i used started guessing things like that. so long as it's all off unless you opt-in, okay.

Yes, it is an option like in "reboot" and "shutdown".
Title: Re: exittc with suspend support
Post by: Roberto A. Foglietta on April 08, 2009, 07:17:51 AM
I just use:

echo -n "mem" > /sys/power/state

I don't know if that works for all machines.

I will use it if s2ram is not  present on the system, but s2ram has more options.
Title: Re: exittc with suspend support
Post by: Roberto A. Foglietta on April 09, 2009, 06:23:13 PM
I just use:

echo -n "mem" > /sys/power/state

I don't know if that works for all machines.


I does not work for me:

Code: [Select]
tc@box:~/$ sudo echo -n "mem" > /sys/power/state
sh: can't create /sys/power/state: Permission denied
tc@box:~/$ cat /sys/power/state
standby mem disk

Title: Re: exittc with suspend support
Post by: ^thehatsrule^ on April 09, 2009, 11:14:12 PM
Your redirect does not have root privs (ie use a root session)
Title: Re: exittc with suspend support
Post by: jpeters on April 09, 2009, 11:51:26 PM
Your redirect does not have root privs (ie use a root session)

Yes...you can place the suspend script in /root and run it from there.  (eg, sudo /root/suspend )
Title: Re: exittc with suspend support
Post by: Roberto A. Foglietta on April 10, 2009, 05:44:33 AM
Your redirect does not have root privs (ie use a root session)

Yes...you can place the suspend script in /root and run it from there.  (eg, sudo /root/suspend )


Thanks both, I prefer to change exitcheck.sh in that way:

Code: [Select]
  suspend )     
    if ! sudo s2ram $SUSPEND_OPTS; then
       sudo sh -c 'echo -n "mem"  > /sys/power/state'
    fi                                               
  ;;     

I have updated coherently this tarball

http://www.roberto.foglietta.name/pub/tinycore/exittc.tgz