Opened 18 years ago

Last modified 6 years ago

#2558 reopened Feature request

WM_POWERBROADCAST interaction needed

Reported by: cbargar Owned by:
Priority: normal Component: FileZilla Server
Keywords: Cc: cbargar, Tim Kosse
Component version: Operating system type:
Operating system version:

Description

I run a small (family) FTP server, and don't need (nor
want) the system powered on 100% of the time. Family
members use WakeOnLan to power it up. The system is
set to "Standby" after 20 minutes of inactivity.

Problem: Filezilla server time doesn't seem to count
as activity, and the server goes "Standby" even though
a user is logged on and actively transferring files.

I need the server to disallow the WM_POWERBROADCAST
message PBT_APMQUERYSUSPEND code if a user is logged on
when the message is received.

I've been a programmer for 25 years (mostly Mainframe
assembler), but have enough C++ and Windows under my
belt to make the change and submit it to the group if I
can get the server source. I'll even volunteer for
occasional projects to help clear the Feature Request
backlog. No compensation, as I'm employed as a
programmer, and that would be a conflict of interest -
have to keep this at the "hobby" level to be able to
participate.

Attachments (1)

powerreq.patch (747 bytes ) - added by Alex 6 years ago.
Patch for enabling ES_SYSTEM_REQUIRED while service is running.

Download all attachments as: .zip

Change History (8)

comment:1 by Tim Kosse, 18 years ago

Thanks for your offer.

You can get the server source from CVS. It is also included
in the setup executable.

comment:2 by cbargar, 17 years ago

Will do.
Need to setup CVS on my system first.
Probably have that done this weekend.

comment:3 by choas09, 14 years ago

I know it's three years later now, but is this feature in yet?

It seems that this scenario is deprecated in Win7 (and Vista...) and Server 2008:

You would need to call SetThreadExecutionState with the ES_SYSTEM_REQUIRED parameter.

See: http://stackoverflow.com/questions/629240/prevent-windows-from-going-into-sleep-when-my-program-is-running

comment:4 by fla_2, 12 years ago

This appears to be a duplicate of ticket:

#4707 Power Mangement, Standby, Suspend to disk

One of the tickets could be closed as a duplicate. I also vote for this feature being part of the server under Windows.

comment:5 by Kurt McKee, 7 years ago

Triage suggestion

I cannot confirm whether this has been fixed in FileZilla Server 0.9.60. However, this feature request is 11 years old.

I suggest closing this ticket as "wontfix".

comment:6 by Kurt McKee, 7 years ago

Resolution: wontfix
Status: newclosed

by Alex, 6 years ago

Attachment: powerreq.patch added

Patch for enabling ES_SYSTEM_REQUIRED while service is running.

comment:7 by Alex, 6 years ago

Resolution: wontfix
Status: closedreopened

I checked -- this has still not been addressed. However, I attached a simple patch that forces S0 power mode (i.e. "fully on") while the service is running. I considered doing it "while a transfer is taking place" or even "while a user is logged in" but realized it made more sense to have it while the service is active. Reason is you don't want system to go to sleep in between transfers, or even when user logs out. If it does, no new users will be able to log in, which is silly.

Please consider incorporating the attached patch.

You can quickly test its effectiveness with powercfg -requests in an elevated cmd prompt.

E.g.

C:\Windows\system32>powercfg -requests
DISPLAY:
None.

SYSTEM:
[SERVICE] \Device\HarddiskVolume2\Program Files (x86)\FileZilla Server\FileZilla Server.exe (FileZilla Server)

AWAYMODE:
None.
Last edited 6 years ago by Alex (previous) (diff)
Note: See TracTickets for help on using tickets.