aMule Forum
English => Feature requests => Topic started by: viciousvex 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
-
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.
-
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.
-
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.
-
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.
-
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. ;)
-
Mac? What, Linux and Windows doesn't have standby mode?
-
Well, Windows and Linux users are able to turn standby mode off themselves. ;D
(ducking)
-
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?
-
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.
-
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.
-
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.
-
Well, Windows and Linux users are able to turn standby mode off themselves. ;D
Linux users aren't either. :P (http://bugs.amule.org/view.php?id=1592)
-
Linux gnome users can use gnome-session inhibitors.
http://live.gnome.org/GnomePowerManager/FAQ#How_do_I_make_my_application_stop_the_computer_auto-suspending.3F
http://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Inhibit
-
Linux doesn't have system-wide power manager. Even acpi daemon can be not present. So for every DE there must be separate implementation.
-
Most power managers offer a dbus interface to interact with. So if wx provides dbus connections, ~90% of all case could be covered at once.
-
Quote from wx site
Yes, definitely, we don't want to integrate DBUS as is even though we may want to provide some high level API which could be implemented on top of DBUS in wxGTK (e.g. I'd really like to be able to catch power events such as suspend or resume in wxGTK and this should be done using DBUS).
so there rather will be API for disabling the sleep mode then for some DBUS requests
-
I implemented it for Mac and Win32 in the current SVN. However, to protect the network's health, when enabled it will only allow to go into sleep mode if you uploaded at least as much data as you downloaded.
-
What's the point? I thought the idea was to prevent sleep mode unconditionally. If this is what the user wants, the feature is useless for him.
-
It prevents sleep mode while downloading. That's not a problem. However, if it's set to allow sleeping after the downloads are done, it will only do so if your session ratio is at least 1. This is to discourage leeching. Or do you want to stop uploading when downloads are done? We have rejected every single implementation related to this (close when downloads finish, shutdown computer when downloads finish, etc) for network health reasons before.
-
The other way round. If someone wants to share only, and can't do it because his computer goes into standby (and he can't find the energy settings), then this feature won't help him. That's my point.
... I think I'm finally getting it. Something like the "turn off computer after burning" option some of the CD recording progs have? Well...
Should be easy to write a cron script that checks the temp dir every 5min and shuts down the computer when it's empty.
Wait until the first user complains "I was uploading and suddenly my computer shut down".
Do the OS functions you call prevent standby, or encourage/force standby?
-
Prevent