WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: exittc with suspend support  (Read 6824 times)

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
exittc with suspend support
« 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).
« Last Edit: April 07, 2009, 10:36:49 AM by robang »

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: exittc with suspend support
« Reply #1 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.
« Last Edit: April 07, 2009, 10:47:12 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: exittc with suspend support
« Reply #2 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.  ;)

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: exittc with suspend support
« Reply #3 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.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: exittc with suspend support
« Reply #4 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.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: exittc with suspend support
« Reply #5 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".

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: exittc with suspend support
« Reply #6 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.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: exittc with suspend support
« Reply #7 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


Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: exittc with suspend support
« Reply #8 on: April 09, 2009, 11:14:12 PM »
Your redirect does not have root privs (ie use a root session)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: exittc with suspend support
« Reply #9 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 )

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: exittc with suspend support
« Reply #10 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