Hibernate instead of shutdown after recording

Asked by stecklum on 2012-07-29

Hi, when running other applications I'd rather like to hibernate/suspend after recording. Since the shutdown is probably be done by a system call, I'd like to replace it in the source code. Can you point me to the corresponding part? Thanks, Bringfried.

Question information

Language:
English Edit question
Status:
Answered
For:
Me TV Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Frédéric Côté (frederic-cote) said :
#1

Hi,

You will find that in the file "scheduled_recording_manager.cc" arround the
line 525.

I used the command 'grep "shutdown" -R *' to find it.

Cheers,
Fred

On Sun, Jul 29, 2012 at 3:11 AM, stecklum <
<email address hidden>> wrote:

> New question #204464 on Me TV:
> https://answers.launchpad.net/me-tv/+question/204464
>
> Hi, when running other applications I'd rather like to hibernate/suspend
> after recording. Since the shutdown is probably be done by a system call,
> I'd like to replace it in the source code. Can you point me to the
> corresponding part? Thanks, Bringfried.
>
> --
> You received this question notification because you are an answer
> contact for Me TV.
>

--
"In a world without walls, who really needs Windows"
"Nothing is foolproof because fools are so ingenious"

Revision history for this message
stecklum (stecklum) said :
#2

Thanks, I changed the code but was no able to test yet. It would be nice if the
advanced section of the scheduled recording menu would offer the three system
shutdown options, aka suspend/hibernate/shutoff.

Frédéric Côté wrote:
> Your question #204464 on Me TV changed:
> https://answers.launchpad.net/me-tv/+question/204464
>
> Status: Open => Answered
>
> Frédéric Côté proposed the following answer:
> Hi,
>
> You will find that in the file "scheduled_recording_manager.cc" arround the
> line 525.
>
> I used the command 'grep "shutdown" -R *' to find it.
>
> Cheers,
> Fred
>
> On Sun, Jul 29, 2012 at 3:11 AM, stecklum <
> <email address hidden>> wrote:
>
>> New question #204464 on Me TV:
>> https://answers.launchpad.net/me-tv/+question/204464
>>
>> Hi, when running other applications I'd rather like to hibernate/suspend
>> after recording. Since the shutdown is probably be done by a system call,
>> I'd like to replace it in the source code. Can you point me to the
>> corresponding part? Thanks, Bringfried.
>>
>> --
>> You received this question notification because you are an answer
>> contact for Me TV.
>>
>
>

Revision history for this message
stecklum (stecklum) said :
#3

Dear Frédéric, I noticed that org.gnome.SessionManager only provides a shutdown method. Instead, org.freedesktop.PowerManagement has to be used. However, my attempts failed so far since the suspend/hibernate does not complete (normally works fine). I was able to REISUB from an hibernation but could not identify the reason of the failure yet. Maybe I'll just use a shell script which polls until me-tv terminated, and issues suspend/hibernate thereafter.

Revision history for this message
Frédéric Côté (frederic-cote) said :
#4

Hi,

It wasn't me who implement this part of the code. I did build the "action
after" part but it was the main developer who actually program the
"shutdown". So I can't help you much with that.

The "script" approach is not a bad idea at all. You can also call your
script from within me-tv (easier then changing the org.gnome.SessionManager
by org.freedesktop.PowerManagement).

Cheers,
Frederic

On Tue, Jul 31, 2012 at 12:45 PM, stecklum <
<email address hidden>> wrote:

> Question #204464 on Me TV changed:
> https://answers.launchpad.net/me-tv/+question/204464
>
> stecklum gave more information on the question:
> Dear Frédéric, I noticed that org.gnome.SessionManager only provides a
> shutdown method. Instead, org.freedesktop.PowerManagement has to be
> used. However, my attempts failed so far since the suspend/hibernate
> does not complete (normally works fine). I was able to REISUB from an
> hibernation but could not identify the reason of the failure yet. Maybe
> I'll just use a shell script which polls until me-tv terminated, and
> issues suspend/hibernate thereafter.
>
> --
> You received this question notification because you are an answer
> contact for Me TV.
>

--
"In a world without walls, who really needs Windows"
"Nothing is foolproof because fools are so ingenious"

Can you help with this problem?

Provide an answer of your own, or ask stecklum for more information if necessary.

To post a message you must log in.