aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: Stop entering sleep mode while downloading  (Read 15555 times)

viciousvex

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
Stop entering sleep mode while downloading
« on: July 20, 2009, 09:22:51 PM »

Hi everyone,

seems like this forum is dead since 2006? (Edit: Just sorted wrongly and got posts from 2006 as actual posts... Nevermind.. ;)  If not I'd like to say thank you for this great application - I like amule very very much.. Great work guys!

As a feature I'd like to see a button in the preferences called something like "Stop computer from entering sleep mode while downloading". If this is enabled, then amule will cancel a sleep mode request from the system.

Why would I like to see this feature? Because it is somewhat annoying to see that you're still at 10% completion of a giant file after some days, simply because the Mac or PC was sent to sleep mode by the system. On a Mac you can use IORegisterForSystemPower() to get power events and IOCancelPowerChange() for stopping transission to sleep mode. I don't know how this is done on other systems.

Regards
vex
« Last Edit: July 20, 2009, 09:32:46 PM by viciousvex »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stop entering sleep mode while downloading
« Reply #1 on: July 21, 2009, 10:12:21 PM »

I think that's really out-of-scope for an all-platform app like aMule. It should be no problem to turn the standby off in your operating system yourself.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

lfroen

  • Guest
Re: Stop entering sleep mode while downloading
« Reply #2 on: July 21, 2009, 10:36:29 PM »

I think that's really out-of-scope for an all-platform app like aMule. It should be no problem to turn the standby off in your operating system yourself.

You wrong all over. It's no "out-of-scope". It's actually very useful feature that many applications implement (Transmission is good example).
Problem is, that each OS implement such thing differently (while Linux doesn't implement it at all IMHO). So, you can't do it "wx-way", but this have nothing to do with "all-platform".

Turning standby manually is annoying. FYI.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stop entering sleep mode while downloading
« Reply #3 on: July 21, 2009, 10:46:11 PM »

IRC client, File manager, kitchen machine
amule is an ed2k application. Period. If you want a file manager: There are plenty of them out there. If you want an IRC client the same applies. Let us just concentrate on our main task: Being the best ed2k application possible.
If you want a power management widget the same applies too.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

lfroen

  • Guest
Re: Stop entering sleep mode while downloading
« Reply #4 on: July 22, 2009, 12:06:44 AM »

Stop being ridiculous.

Ability to prevent entering standby mode have nothing todo with "power management widget" (WTF it is anyway). OS's have very specific API's for this very purpose; IIRC it's even specified in HIG guidelines.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Stop entering sleep mode while downloading
« Reply #5 on: July 22, 2009, 12:26:43 AM »

I agree with lfroen on this one: It would be OK to have this functionality. But somebody who actually owns a Mac should code it. ;)
Logged

lfroen

  • Guest
Re: Stop entering sleep mode while downloading
« Reply #6 on: July 22, 2009, 12:34:04 AM »

Mac? What, Linux and Windows doesn't have standby mode?

Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stop entering sleep mode while downloading
« Reply #7 on: July 22, 2009, 12:35:36 AM »

Well, Windows and Linux users are able to turn standby mode off themselves.  ;D
(ducking)
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 83
Re: Stop entering sleep mode while downloading
« Reply #8 on: July 22, 2009, 12:37:14 AM »

Problem is, that each OS implement such thing differently (while Linux doesn't implement it at all IMHO).

Are ACPI  and/or D-BUS APIs able to control power management in Linux systems? Anyway what's the point of having a suspend policy activated when you are running a 24x7 application? May be for occasional use, and in that case is it not enough to set a higher time to suspend?
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Stop entering sleep mode while downloading
« Reply #9 on: July 22, 2009, 12:40:59 AM »

Mac? What, Linux and Windows doesn't have standby mode?
If there's a standard way to do so, please feel free to implement this.

The best I found for Win is http://msdn.microsoft.com/en-us/library/aa373208(VS.85).aspx

I have no clue about Linux.
« Last Edit: July 22, 2009, 12:58:26 AM by wuischke »
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Stop entering sleep mode while downloading
« Reply #10 on: July 22, 2009, 12:43:50 AM »

OS's have very specific API's for this very purpose;

First a common abstraction needs to be made (platform-independent), and then implementation should go into PlatformSpecific.

For example, I'd need a working minimal example on OSX, MSW and Linux (if possible) to consider including it in aMule.
Logged
concordia cum veritate

lfroen

  • Guest
Re: Stop entering sleep mode while downloading
« Reply #11 on: July 22, 2009, 08:34:30 AM »

Next month I will have my Mac back and will provide a code for inclusion.

On Windows you just call SetThreadExecutionState() as already pointed out.

Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stop entering sleep mode while downloading
« Reply #12 on: April 15, 2010, 06:00:34 PM »

Well, Windows and Linux users are able to turn standby mode off themselves.  ;D
Linux users aren't either.  :P
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

yelo3

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
« Last Edit: June 16, 2010, 11:34:02 AM by yelo3 »
Logged

Morse

  • Full Member
  • ***
  • Karma: 6
  • Offline Offline
  • Posts: 105
Re: Stop entering sleep mode while downloading
« Reply #14 on: June 16, 2010, 01:19:47 PM »

Linux doesn't have system-wide power manager. Even acpi daemon can be not present. So for every DE there must be separate implementation.
Logged
Pages: [1] 2