Aug 272019
 

Last updated on August 30th, 2019

A.K.A. Troubles With Power Management and Fastboot…!

Introduction

I’ve been trying to set up my windows desktop PC so that it:

  • Starts automatically at 22:30, the time when cheap electricity runs in the house.
  • Only runs for 30mins or so after starting up, unless I start work on it.  This is just to ensure it isn’t running all the time doing nothing.
  • (a side affect of the above two is that it makes the room warm which isn’t needed except in winter).
  • I also want wake-on-LAN (WOL) to work so that I can access the machine from other machines in the house.
  • Starts every six hours thereafter, so that I can access it from abroad occasionally without having to enable a dangerous firewall rule and dynamic DNS and force a WOL through the internet.  It’s just not safe.

  • I’ve tried getting task manager to run a none-program – this sort-of worked but unreliably.
  • I’ve fiddled with power settings in the BIOS.
  • I’ve twiddled and checked the power management settings in various devices in Device Manager, e.g. the network cards, keyboard & mouse and more.
Compaq Keyboard

Compaq Keyboard – RT235BTWUK

In the middle of my troubles (it just wouldn’t work as intended, reaaly, I tried….), I re-installed a clean Windows 10 as it was over 4 years since I’d installed it, and then, inexplicably, the house got hit by lightning with things like routers, power boards, the APC UPS blowing as well as a PCI network card and a DVI cable to a monitor….    The PC, after a fair bit of checking, is now working okay.   Though, I’ve had to:

  • Add a PCIe network card I had lying around
  • Turned off onboard graphics and installed an Radeon HD5700 PCIe graphics card from a few years back I had in an old PC.  I now use an HDMI & DVI output for my dual monitor setup.
  • I’ve used an old basic mouse instead of a new USB transceivered one.
  • I’m actually using a very old Compaq keyboard from our old BRS depot which closed in 2001 into a PS/2 socket.  It workes brilliantly!!  Weighs a ton!

My PC Basic Specifications

This is not a cutting edge machine but will be good for a few years yet I hope.  The screenshot shows it not actually busting a gut as I’m typing this….:-)  In fact, it’s almost asleep.  I have, in the past, run Prime95 on it to watch everything max out and the fans blast off, but that’s a different tale.

  • Win10 on 20190827

    Running the winver command

    Gigabyte mainboard – Z97X-UD5H-BK

  • Intel i7-4790k  Devils Canyon
  • Crucial Ballistix 16Gb
  • Crucial SSD 500Gb
  • A single Seagate Barracuda – 3TB
  • Running winver shows my OS as, Windows 10 version 1909 build 18362.295

What is the Answer?

My searches revealed things like, setting power management on devices, re-installing windows, rolling back or updating drivers, editting the registry, delving into gpedit (group editor), disabling devices, investigating every single BIOS entry, increasing the base voltage on the memory a tad and many more I’ve now forgotten….

Cutting a long story short and many hours and google searches, the solution that worked for me is as follows:

Turn Off Stuff in the BIOS

I disabled Fast Boot in my Gigabyte BIOS – highlighted in my phone shot.  You’ll see I have virtualisation enabled as well as WHQL driver signing and other security settings like execute disable bit.  These aren’t relevant.  Off screen, secure boot is set as well.

Turn off Fast Boot

Turn off Fast Boot

I let (or maybe force…?) Windows to take over all power management duties.

Platform Power Management Disabled

Platform Power Management Disabled as well as ErP

As well as turning off BIOS power management I also disabled ErP which is some sort of deep sleep malarkeyThis is one of many things I’ve found in my travails trying to unravel my problem.  I’m not listing everything everywhere that I went!!

You will notice the bit at the top called “Resume by Alarm”.  This is what some BIOSs call RTC wake or similar – RTC = real time clock.  It’s the bit I want to use to start the PC at 10:30pm every night.

Naturally, I used it to test that the BIOS wakeup worked by setting the time a few minutes ahead and shutting the machine down.  I did this twice, rebooting and force sleeping as appropriate, to test the wake up from full shutdown and sleep modes in the PC.

It worked each time….wahay!!   However….. It did NOT work until I’d done the following steps in Windows.

So….

Next, Into Windows.

Check the power management is working as intended in various devices in Device Manger.  This is one of the many settings in my network card that is important.

Network Card Power Management And WakeUp

Network Card Power Management And WakeUp

Network Card Power Management And WakeUp Tab

Network Card Power Management And WakeUp Tab

I also checked the mouse and keyboard and disks.  The interfaces are very similar so I won’t repeat.

Now Comes The Killer Bit That Makes it Work

In a nutshell, Hibernate and Fast Boot are Not What They Seem

Elevated Command Prompt

Elevated Command Prompt

You’ll need an elevated command prompt for this – so, right-click start button and hit Command Promt (Admin).  Keep that handy.

If you’re reseaching similar problems you may have read that the way to get sleep and hibernate to work properly, (if you have issues – sometimes stuff just works fine), is to turn off fast boot in the BIOS (as I’ve done above)and fast startup as in this screeshot.

Choose What Power Buttons Do

Choose What Power Buttons Do

You do this in your power options by first clicking the link circled BLUE here:

Disable Fast Startup

Disable Fast Startup

And then by selecting the “Change Settings that are currently unavailable” which I’ve arrowed in RED.

You then untick the  boxes I’ve arrowed in GREEN.

This is all fine and Dandy – except for me it Didn’t Work

Despite innumerable reboots and twiddling of all the various power settings all over the place it didn’t work as everyone said it should.  The trick lies in that elevated command prompt that you still have open, right?

When I said that “Hibernate and Fast Boot are Not What They Seem”, it’s exactly that……!  So just because a box is unticked does not, as far as I can tell from these experiences, mean that they are disabled.

As far as I can tell, despite unticking the boxes there’s a hidden amount of power usage which leaves some devices powered up so that the machine never shuts down enough to be able to start up again, unaided!  Bizarre I know, but that’s how it appears to me.  Unticking the boxes is not enough – they have to totally disappear.

Maybe it’s part of the Hybrid Sleep state in newer Windows?  I’m not sure.

Disable Hibernate

In your elevated command prompt copy and paste either of these two commands (they mean the same thing), then hit ENTER.

powercfg.exe /hibernate off
powercfg.exe -h off
Tick Boxes Gone

Tick Boxes Gone

After a reboot the Power Options screen will look like this and everything will work as it should.  It did for me.

All Power Management Systems Work as I Want

The PC now:

  • Locks the screen after a few minutes of inactivity
  • Goes to sleep after 30mins of inactivity.
  • Can be forced to sleep from the menu.
  • Can be forced to shutdown from the menu.
  • Wakes every 6 hours.
  • Wakes at 22:30 daily, regardless of its sleep or shutdown state.
  • Wakes from other machines in the house either by RDC or by file explorer.

 

Six-Hourly Wake Up

Quick Exit Command

Quick Exit Command From Task Scheduler

There are many websites that will show you how to get things to happens at certain times on a Windows machine.  Above shows the little .bat (batch) file I made that windows will run in Task Scheduler to wake it up if it’s asleep.  It’ll stay on screen as Windows starts for 10 seconds and then close itself down.

It is possible that in the end, and since many newer BIOSs don’t have a RTC alarm, that the Tssk Scheduler is all I need.  I’m keeping it as it’s my backup against weird things happening when I’m away from home.  Windows 10 may get all gnarly after an update or whatever, but at least the BIOS will force it to wake up which gives me a chance of a remote fix.

Does the Machine Boot Quickly Even Though The Quick Start Stuff is Disabled?

I’m asking the question for you.   It Does.  The SSD is the largest speed gain and compared to a spinning hard disk with all speed enhancements enabled there is no contest.  The SSD is it, however, saying this, I do have plans to boot from an M2 NVMe SSD since this Gigabyte mainboard has a slot and anyway, PCIe cards for just this purpose are plentiful now.  I’m guessing the boot time will drop to 75%, say, of this.

It’s under 30 seconds right now, with most of the wait being within the BIOS.  It’s only a few seconds once the Windows’ spinner takes over.  It’s good enough for me.

 

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

© 1977, Strangely Perfect.