Pause folding when on UPS

If you're new to FAH and need help getting started or you have very basic questions, start here.

Moderators: Site Moderators, FAHC Science Team

Post Reply
targaryenturtle
Posts: 3
Joined: Tue Apr 08, 2025 7:36 pm

Pause folding when on UPS

Post by targaryenturtle »

Hello all!
I finally got a headless FaH client running in an LXC on my main Proxmox machine but I've got a small issue in that folding significantly reduces the runtime of my UPS. So, I figured, what if I just stop folding while the power is out? What I want to know is, is it possible to stop and start folding (the actual folding, not the folding client) using the CLI so I can have it stop folding when the power goes out and resume folding once the power has come back on? My only other idea right now is to shut down the folding client or LXC if the power goes out and restart it when the power comes back, but that would mean I would have to restart the folding manually.
Joe_H
Site Admin
Posts: 8103
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Studio M1 Max 32 GB smp6
Mac Hack i7-7700K 48 GB smp4
Location: W. MA

Re: Pause folding when on UPS

Post by Joe_H »

There is a machine setting to not run on battery. It is present in both v7 and v8 clients. It depends on your OS detecting the on battery state, usually through an USB connection. Folding should pause when the system is on battery, it has worked for me in the past on both desktop and laptop systems.

I haven't tried the v8 On Battery detection personally, it was not working in versions prior to v.8.3.2.
Image
targaryenturtle
Posts: 3
Joined: Tue Apr 08, 2025 7:36 pm

Re: Pause folding when on UPS

Post by targaryenturtle »

Joe_H wrote: Mon Apr 21, 2025 2:52 pm There is a machine setting to not run on battery. It is present in both v7 and v8 clients. It depends on your OS detecting the on battery state, usually through an USB connection. Folding should pause when the system is on battery, it has worked for me in the past on both desktop and laptop systems.

I haven't tried the v8 On Battery detection personally, it was not working in versions prior to v.8.3.2.
I do see that option in the control panel, but I'm not sure that it will work in my situation.

A couple things I really should have clarified in my post:
1. I am running the FaH client in a Debian 12 LXC on Proxmox.
2. The Debian LXC is headless. It has no GUI and the FaH client is setup using the config.xml file.
3. My UPS is connected to Proxmox and is connected to a Network UPS Tools (NUT) server.
4. I tried adding the NUT client to the Debian LXC and while I am able to connect to the NUT server, the FaH client does not report the machine as having a battery.
5. I'd like to be able to manually start and stop folding if possible as I'd like to do things like pause folding when on battery, when the UPS runtime is too low, or when the load on the UPS is too high.

My only other idea right now is to use the NUT client to start and stop the FaH client / LXC and manually restart folding.
muziqaz
Posts: 1661
Joined: Sun Dec 16, 2007 6:22 pm
Hardware configuration: 9950x, 7950x3D, 5950x, 5800x3D
7900xtx, RX9070, Radeon 7, 5700xt, 6900xt, RX 550 640SP
Location: London
Contact:

Re: Pause folding when on UPS

Post by muziqaz »

sudo systemctl stop fah-client
sudo systemctl start fah-client
These might be of help. Otherwise, your system is too specific with too many obstacles for the dev to even consider implementing something you could use. I mean, not only you are on proxmox, but headless and also you are using UPS as battery on top of that.
FAH Omega tester
Image
calxalot
Site Moderator
Posts: 1476
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: Pause folding when on UPS

Post by calxalot »

fahctl -h
targaryenturtle
Posts: 3
Joined: Tue Apr 08, 2025 7:36 pm

Re: Pause folding when on UPS

Post by targaryenturtle »

calxalot wrote: Tue Apr 22, 2025 8:20 pmfahctl -h
Thank you! This is exactly what I was looking for! I needed Pip to install websocket-client to get it working, but I can now stop and start folding from the command line. I have modified my NUT config so it should run "fahctl pause" when the system goes on battery and, once power has been restored, waits 5 minutes before running "fahctl fold".
Going to have to wait till I get home to pull the plug and test it.

Will try to report back once I know if it works.
Post Reply