Opened 13 years ago

Last modified 19 months 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:


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

Attachments (1)

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

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by Tim Kosse

Thanks for your offer.

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

comment:2 Changed 13 years ago by cbargar

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

comment:3 Changed 10 years ago by choas09

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.


comment:4 Changed 7 years ago by fla_2

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 Changed 2 years ago by Kurt McKee

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 Changed 2 years ago by Kurt McKee

Resolution: wontfix
Status: newclosed

Changed 19 months ago by Alex

Attachment: powerreq.patch added

Patch for enabling ES_SYSTEM_REQUIRED while service is running.

comment:7 Changed 19 months ago by Alex

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.


C:\Windows\system32>powercfg -requests

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

Last edited 19 months ago by Alex (previous) (diff)
Note: See TracTickets for help on using tickets.