Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Hibernate Type Of Stop doesn't hibernate computer #89

Open
@robotics13

Description

@robotics13

When I configure WinNUT to Hibernate my computer the Shutdown GUI will display when the NUT Server sends the FSD signal. The Shutdown GUI will perform the countdown and then hang. When configured to Shutdown instead of hibernate, the shutdown process executes properly.

Steps to reproduce:

  1. Configure WinNUT Shutdown Options as follows
  • Type of Stop = Hibernate
  • Delay to SHutdown (sec) = 15
  • Shutdown on Nut's FSD Signal = Checked
  1. Disconnect UPS from AC power, wait for NUT Server to send FDS
  2. Shutdown GUI will appear, wait for counter to reach zero
  3. Shutdown GUI will hang and computer will stay powered on

I suspect this has something to do with the calls to SetSystemPowerState in the Select Cast statement at line 979 in WinNUT.vb. It looks a bit odd passing a Boolean value when the function is declared as expecting an integer. https://www.tek-tips.com/viewthread.cfm?qid=1086465 talks about similar code only passing integers 1 and 0 instead of Booleans. It has been years since I messed with VB.Net so passing a Boolean could be valid, it just looks off.

My computer is running Windows 10 21H1, NUT Server is the built in Synology NUT server, running latest version of WinNUT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions