apcupsd on Windows 10 NOT shutting down on TIMEOUT

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

apcupsd on Windows 10 NOT shutting down on TIMEOUT

Phil Reynolds
I have just tested my qemu-kvm machines' performance under power
failure conditions - no problems at all with BSDs, Debian testing or
even ReactOS, but I have one running Windows 10 64-bit, and it is not
shutting down on expiry of timeout.

I have set them all to shut down after 60 seconds of running on
battery. I have seen ONBATT and ONLINE popups from apcupsd, but the
system was still not shutting down even two minutes after the power
went down.

Unless it's simply failing in some way when calling psshutdown, I
cannot work out why it would be failing. How do I go about testing this
further/correcting it? (Is there some other command I could call to
shut down Windows 10?)

--
Phil Reynolds
mail: [hidden email]
Web: http://phil.tinsleyviaduct.com/


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcupsd on Windows 10 NOT shutting down on TIMEOUT

Phil Reynolds
On Tue, 1 Nov 2016 17:10:13 +0000
Phil Reynolds <[hidden email]> wrote:

> I have just tested my qemu-kvm machines' performance under power
> failure conditions - no problems at all with BSDs, Debian testing or
> even ReactOS, but I have one running Windows 10 64-bit, and it is not
> shutting down on expiry of timeout.
>
> I have set them all to shut down after 60 seconds of running on
> battery. I have seen ONBATT and ONLINE popups from apcupsd, but the
> system was still not shutting down even two minutes after the power
> went down.
>
> Unless it's simply failing in some way when calling psshutdown, I
> cannot work out why it would be failing. How do I go about testing
> this further/correcting it? (Is there some other command I could call
> to shut down Windows 10?)
>

I think I know what's happening now, just not how to fix it. psshutdown
is an interactive service. I enabled these in the registry but it only
works when run as Administrator - no idea how to achieve that from
apccontrol.bat.

--
Phil Reynolds
mail: [hidden email]
Web: http://phil.tinsleyviaduct.com/


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcupsd on Windows 10 NOT shutting down on TIMEOUT

Phil Reynolds
On Tue, 1 Nov 2016 17:46:37 +0000
Phil Reynolds <[hidden email]> wrote:

> On Tue, 1 Nov 2016 17:10:13 +0000
> Phil Reynolds <[hidden email]> wrote:
>
> > I have just tested my qemu-kvm machines' performance under power
> > failure conditions - no problems at all with BSDs, Debian testing or
> > even ReactOS, but I have one running Windows 10 64-bit, and it is
> > not shutting down on expiry of timeout.
> >
> > I have set them all to shut down after 60 seconds of running on
> > battery. I have seen ONBATT and ONLINE popups from apcupsd, but the
> > system was still not shutting down even two minutes after the power
> > went down.
> >
> > Unless it's simply failing in some way when calling psshutdown, I
> > cannot work out why it would be failing. How do I go about testing
> > this further/correcting it? (Is there some other command I could
> > call to shut down Windows 10?)
> >
>
> I think I know what's happening now, just not how to fix it.
> psshutdown is an interactive service. I enabled these in the registry
> but it only works when run as Administrator - no idea how to achieve
> that from apccontrol.bat.

Nor can I get the Windows "Shutdown.exe" to actually succeed in the same
circumstances... though that one does work when I run it.

Being a VM, I want it to power off rather than just halt.

--
Phil Reynolds
mail: [hidden email]
Web: http://phil.tinsleyviaduct.com/


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcupsd on Windows 10 NOT shutting down on TIMEOUT

Ted Mittelstaedt-5
In reply to this post by Phil Reynolds
psshutdown is not an interactive service.  It has an interactive mode
maybe you are thinking of that?

https://technet.microsoft.com/en-us/sysinternals/bb897541

It's only real benefit over the regular shutdown command is that it
can take a userID and password on the command line so you can use it
to shut down remote windows boxes that have different userIDs
and passwords than what you are using to run the command.

If your shutdown is working when run as administrator but not as a
regular user then you need to adjust rights.  You can use Local
Security Policy if this is a windows pro system:

http://www.sevenforums.com/tutorials/128920-shut-down-computer-allow-prevent-users-groups.html

If it is a Windows Home system than you need to run everything under an
administrative account.  Frankly there's little point in running Windows
Home under a non-admin account.

If you must get it working on win home - you can TRY this powershell
solution:

First update to powershell 3 (needed for win 7, 10 probably has it):

https://www.microsoft.com/en-us/download/details.aspx?id=34595

Then download this:

https://gallery.technet.microsoft.com/scriptcenter/Grant-Revoke-Query-user-26e259b0

Use instructions are here:

http://superuser.com/questions/1107598/how-to-set-logon-user-rights-with-the-ntrights-exe-in-windows-1064-bit

And the privilege you want to grant is  SeShutdownPrivilege.

Let us know if that works.

Ted


On 11/1/2016 10:46 AM, Phil Reynolds wrote:

> On Tue, 1 Nov 2016 17:10:13 +0000
> Phil Reynolds <[hidden email]> wrote:
>
>> I have just tested my qemu-kvm machines' performance under power
>> failure conditions - no problems at all with BSDs, Debian testing or
>> even ReactOS, but I have one running Windows 10 64-bit, and it is not
>> shutting down on expiry of timeout.
>>
>> I have set them all to shut down after 60 seconds of running on
>> battery. I have seen ONBATT and ONLINE popups from apcupsd, but the
>> system was still not shutting down even two minutes after the power
>> went down.
>>
>> Unless it's simply failing in some way when calling psshutdown, I
>> cannot work out why it would be failing. How do I go about testing
>> this further/correcting it? (Is there some other command I could call
>> to shut down Windows 10?)
>>
>
> I think I know what's happening now, just not how to fix it. psshutdown
> is an interactive service. I enabled these in the registry but it only
> works when run as Administrator - no idea how to achieve that from
> apccontrol.bat.
>


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcupsd on Windows 10 NOT shutting down on TIMEOUT

Phil Reynolds
On Wed, 2 Nov 2016 04:10:48 -0700
Ted Mittelstaedt <[hidden email]> wrote:

> psshutdown is not an interactive service.  It has an interactive mode
> maybe you are thinking of that?
>
> https://technet.microsoft.com/en-us/sysinternals/bb897541

I'm not thinking of any interactive modes. I am judging by what I've
heard elsewhere when people can't run psshutdown as themselves.
 
> If your shutdown is working when run as administrator but not as a
> regular user then you need to adjust rights.  You can use Local
> Security Policy if this is a windows pro system:

psshutdown fails as regular user.
shutdown works as regular user.
There is no obvious effect when trying to call it via apccontrol.bat,
whichever is specified.

It is a Pro system.
 
> http://www.sevenforums.com/tutorials/128920-shut-down-computer-allow-prevent-users-groups.html

This has made psshutdown work as a regular user.

There is no change to the situation with apcupsd - I can't even prove
it's trying to call psshutdown. The same "nothing" occurs with
\apcupsd\bin\shutdown and \WINDOWS\System32\shutdown.

--
Phil Reynolds
mail: [hidden email]
Web: http://phil.tinsleyviaduct.com/


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcupsd on Windows 10 NOT shutting down on TIMEOUT

Phil Reynolds
On Wed, 2 Nov 2016 12:05:36 +0000
Phil Reynolds <[hidden email]> wrote:

> There is no change to the situation with apcupsd - I can't even prove
> it's trying to call psshutdown. The same "nothing" occurs with
> \apcupsd\bin\shutdown and \WINDOWS\System32\shutdown.
 
I added a "write to file" in the doshutdown section (a simple dir >
\apcupsd\run.txt) - and nothing was written! It seems that
apccontrol.bat is not being called - does TIMEOUT work on Win10? It
does work on ReactOS, so this seems to be some kind of Windows quirk.

--
Phil Reynolds
mail: [hidden email]
Web: http://phil.tinsleyviaduct.com/


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcupsd on Windows 10 NOT shutting down on TIMEOUT

Ted Mittelstaedt-5
On 11/2/2016 8:37 AM, Phil Reynolds wrote:

> On Wed, 2 Nov 2016 12:05:36 +0000
> Phil Reynolds <[hidden email]> wrote:
>
>> There is no change to the situation with apcupsd - I can't even prove
>> it's trying to call psshutdown. The same "nothing" occurs with
>> \apcupsd\bin\shutdown and \WINDOWS\System32\shutdown.
>  
> I added a "write to file" in the doshutdown section (a simple dir >
> \apcupsd\run.txt) - and nothing was written! It seems that
> apccontrol.bat is not being called - does TIMEOUT work on Win10? It
> does work on ReactOS, so this seems to be some kind of Windows quirk.
>

Can we get a clarification here, Phil?

Can you get your machine to shut down AT ALL?  Will it shut down but
just not shut down from timeout?  Or is it simply not shutting down
no matter what trigger you set in apcupsd.conf?

Ted

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcupsd on Windows 10 NOT shutting down on TIMEOUT

Phil Reynolds
On Thu, 3 Nov 2016 06:29:50 -0700
Ted Mittelstaedt <[hidden email]> wrote:

> On 11/2/2016 8:37 AM, Phil Reynolds wrote:
> > I added a "write to file" in the doshutdown section (a simple dir >
> > \apcupsd\run.txt) - and nothing was written! It seems that
> > apccontrol.bat is not being called - does TIMEOUT work on Win10? It
> > does work on ReactOS, so this seems to be some kind of Windows
> > quirk.
> >
>
> Can we get a clarification here, Phil?
>
> Can you get your machine to shut down AT ALL?  Will it shut down but
> just not shut down from timeout?  Or is it simply not shutting down
> no matter what trigger you set in apcupsd.conf?

It can be shut down by me by all normal methods.

It appears that the shutdown is never being called for by apcupsd. (now
tried with BATTERYLEVEL as well as TIMEOUT). (though it does work on a
ReactOS machine using the same version of apcupsd)

--
Phil Reynolds
mail: [hidden email]
Web: http://phil.tinsleyviaduct.com/


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: apcupsd on Windows 10 NOT shutting down on TIMEOUT

Phil Reynolds
On Thu, 3 Nov 2016 14:42:56 +0000
Phil Reynolds <[hidden email]> wrote:

> On Thu, 3 Nov 2016 06:29:50 -0700
> Ted Mittelstaedt <[hidden email]> wrote:
> >
> > Can we get a clarification here, Phil?
> >
> > Can you get your machine to shut down AT ALL?  Will it shut down but
> > just not shut down from timeout?  Or is it simply not shutting down
> > no matter what trigger you set in apcupsd.conf?
>
> It can be shut down by me by all normal methods.
>
> It appears that the shutdown is never being called for by apcupsd.
> (now tried with BATTERYLEVEL as well as TIMEOUT). (though it does
> work on a ReactOS machine using the same version of apcupsd)
>

I note there was no further word on this outstanding problem.

Unless something deep in Windows has changed since I last tested, this
still isn't working. I will do a test again next time I am using the
Windows VM, but what is the next step if it still fails to shut down as
intended?

--
Phil Reynolds
mail: [hidden email]
Web: http://phil.tinsleyviaduct.com/


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Loading...