Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run as daemon on Windows #25

Open
broizter opened this issue Aug 6, 2020 · 3 comments
Open

Run as daemon on Windows #25

broizter opened this issue Aug 6, 2020 · 3 comments

Comments

@broizter
Copy link

broizter commented Aug 6, 2020

Would be nice if there was a switch like "--daemon" to fork into the background on Windows, ideally it would go into the system tray.

@foucault
Copy link
Owner

foucault commented Aug 10, 2020

Hi! This would definitely be useful. Forking to the background should be possible relatively easily but I have no idea what would be required to make a tray icon for that as it needs binding into winapi. Even in the first case the "proper" way to do that would be to create a Windows service rather than fork. To be honest I'm not entirely sure how forking to background works on Windows. Need to read a bit on that. Maybe Shawl would be a good candidate to easily implement a service out of the windows executable?

@koitsu
Copy link

koitsu commented Dec 21, 2020

I'm giving a 👍 to this request, as it would more or less let me achieve the below.

What essentially I'm looking for is a bare-bones Windows application that, at boot or at login (e.g. via "Startup" folder), sets my NVIDIA GPU fan speeds to whatever value I want (either in percentage or RPM; would prefer percentage) and keeps them that way. (I would think that would be as easy as setting the values somehow, then exiting the application? Seems like a single API request would do it.).

I currently use EVGA Precision X1 to achieve this, but the program has terrible memory leaks in addition to performance-impacting problems.

I do not particularly care if something sits in the systray or not -- I would rather something just do what I tell it via CLI and go away afterwards. :)

I do not have interest in the response curve implementation or any kind of hysteresis model -- and yes I am quite familiar with such. I understand a lot of people benefit from that, and that's awesome, but I do not.

@theodrim
Copy link

theodrim commented Dec 24, 2020

sets my NVIDIA GPU fan speeds to whatever value I want

You already can do that with nvidiaInspector, eg nvidiaInspector.exe -setFanSpeed:0,80 -setFanSpeed:1,80 -setFanSpeed:2,80 - first digit after the colon will be gpu id, second one - fixed fan percent. You can write simple batch script that will do just that.

On the topic - probably this functionality can be had with NSSM or plain sc.exe to create service with needed arguments.

edit: can confirm that it run flawlessly using nssm as service creator. I've enabled tcp server to be able to confirm that changes taking place, and it seems so far working just right even after sleep / hibernate / hybrid sleep.

Using Windows 10 version 1903 build 18362.778, nvidia drivers 460.89 and gtx 1070.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants