Linux suspend application?

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7737
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Linux suspend application?

Post by Isaac »

I'm trying to figure out which application makes xubuntu go to sleep, because it's clearly the best.

Code: Select all


aio_suspend (3)      - wait for asynchronous I/O operation or timeout
pasuspender (1)      - Temporarily suspend PulseAudio
pm-action (8)        - Suspend or Hibernate your computer
pm-hibernate (8)     - Suspend or Hibernate your computer
pm-is-supported (1)  - Test whether suspend or hibernate is supported.
pm-suspend (8)       - Suspend or Hibernate your computer
pm-suspend-hybrid (8) - Suspend or Hibernate your computer
rt_sigsuspend (2)    - wait for a signal
sigsuspend (2)       - wait for a signal
usleep (3)           - suspend execution for microsecond intervals
usleep() is a function. It could be what my system uses.

I wish the comments said

Code: Select all

xxxxx - THIS IS WHAT YOUR COMPUTER USES TO SUSPEND!
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6539
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Re: Linux suspend application?

Post by Jeff250 »

Words like sleep and suspend are definitely overloaded. Ignore functions like sleep/usleep/nanosleep, which just cause the current process to not do anything for the specified time. Also ignore anything related to signal handlers or SIGSTOP (a signal used to suspend processes). pm-suspend looks like a candidate, but the best way to figure out if xubuntu calls it is to look at the source code.
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6539
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Re: Linux suspend application?

Post by Jeff250 »

Keep in mind that it's even possible that ubuntu and xubuntu use the same command/function to suspend but that it works better in xubuntu for some other reason, like maybe a lack of compiz.
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Re: Linux suspend application?

Post by fliptw »

the pm-* commands are what you are looking for.

everything else is system calls.
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7737
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

Re: Linux suspend application?

Post by Isaac »

ah ok! Thanks
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
Post Reply