How to Automate Wi-Fi and Volume Mute for Connected Standby to save battery

markjjordan

New member
Jan 6, 2014
3
0
0
Visit site
I recently bought an HP Stream 7. One of the major problems I've had with it is battery drain when not in use. In older computers and operating systems, sleep mode was a heavy sleep; apparently sleep mode for today's computers and O/S's means light sleep, whereby the device can still execute some things, including Wi-Fi. This is great for those that want a table to function like a phone, but not for those like me that just want it for a reader and occasional use.

I was losing 50% or more of battery over the course of 8 hours over night… not cool. Research on the web showed that the 2 major causes of the drain were the Wi-Fi and the volume not being muted. So… my manual procedure for putting my device away was to disable the Wi-Fi and set the volume to mute. This worked greatly; yesterday evening I went to bed and unplugged my 100% charged HP Stream 7 after disabling the Wi-Fi and setting the volume to mute.

10 hours later, my battery was still at 100%... Yes, you read that correctly.

I keep testing this, and it still rings true… every time there is no more than 1% loss.

But how tedious is it to disable the Wi-Fi and set to mute when setting the device aside, and re-enabling when I resume use? Windows Task Scheduler and PowerShell to the rescue.

I created a couple of PowerShell scripts that will automate this for both scenarios. I also created a couple of task scheduler definitions that will execute the PowerShell scripts as a reaction to entering and exiting the connected standby mode.

So… now whenever my device goes into connected standby, either by pressing the power button or via timeout, the Wi-Fi will automatically get disabled and the volume set to mute. Conversely, when the unit comes out of connected standby mode, the Wi-Fi will automatically get enabled and the volume unmuted.

Following is a link to the ConnectedStandbyAutomation.zip that contains the PowerShell scripts, as well as the exports of my 2 task scheduler definitions. Just unzip the contents of the zip file to a folder called <c:\program files\ConnectedStandbyAutomation>, and import the task scheduler definitions to task scheduler.

1drv.ms/179rdI1 (paste into your browser's URL/address bar... apparently I don't have enough points to post URL's yet)

Hope this helps someone. I'm sure this could also be used on other tablets as well, such as the Dell Venue, with like results.
 
Last edited:

markjjordan

New member
Jan 6, 2014
3
0
0
Visit site
Many have asked for the URL... the URL is above... paste it into your browser's address / URL field. I've increase the size of it above so it can stand out more.
 

brad63

New member
Jan 1, 2015
6
0
0
Visit site
I find that just shutting down the tablet and restarting the stream it boots up quick enough that I am not having this problem.
 

os1019

New member
Apr 18, 2014
61
0
0
Visit site
Once this script is installed is there a way to uninstall it as well? I would love to do a compare and contrast.
 

Tilgado

New member
Jul 11, 2014
1
0
0
Visit site
It seems that you have to load the link in the desktop version of IE on the Stream 7 for the link to work not the IE on the start screen. Thank you and sorry for the pm.
 

tksuther

New member
Mar 17, 2015
1
0
0
Visit site
Mark,

Do I have to create the (sub)folder "ConnectedStandbyAutomation" under C:>Program files. I do not have an existing ConnectedStandbyAutomation folder.

Also, What happens with the PowerShell Scripts? Do I add only the .xml files to the task scheduler?
 
Last edited:

marthugh

New member
Mar 25, 2015
1
0
0
Visit site
Mark

decided to register just to say thanks. My new tablet was going completely flat in less than 6 hours. I installed the two tasks and over a 48 hour soak, sleeping with no power connected it only dropped from 97% to 56%.

Thank you for posting this.

MartHugh
 

dorelse

New member
Mar 25, 2011
886
0
0
Visit site
First, thanks for the scripts to help with battery life!

Do the scripts happen to take into account if the Stream is on AC power, that it wouldn't shut WiFi down? I kind of think that might be an ideal solution perhaps?

I've gotten used to shutting it down now, so that my still be my best option since boot times are so small...
 

alex_morris

New member
Mar 28, 2015
1
0
0
Visit site
Those scripts are fantastic, but I found they required one small tweak to work correctly on my Stream 7.

In line 2 of both scripts I had to change 'wi-fi' to 'WiFi' to reflect the name assigned to the wireless adapter on my tablet; Windows had called it "WiFi" instead of "wi-fi". Of course, I could have renamed the adapter from "WiFi" to "wi-fi"; either approach would work.
 

WhistlerQD

New member
Apr 5, 2015
1
0
0
Visit site
I'm having issues with this automated solution. The powershell scripts both work just fine. The problem is that the task which is meant to disable wifi and enable mute actually runs after the tabled is woken up. I have not messed with those tasks in any way.
Do any of you guys have similar problem?
 

nobb

New member
May 12, 2015
2
0
0
Visit site
I'm trying to use this on my Dell Venue 8 Pro which has the same problem. I've followed the instructions and successfully imported the scripts but it doesn't seem to work. Any ideas on how to troubleshoot?

Interestingly, I've actually made my own script a while ago using a simple .bat file to turn the wifi adapter on and off triggered by the same event IDs as per the OP. It works great, but once in a while the script doesn't get a chance to run before the computer goes to sleep even though the task priority has been set to the highest. So I'd like to try this Power Shell script to see if it might work better.
 

nobb

New member
May 12, 2015
2
0
0
Visit site
I think I found the answer to my problem above. It was a privilege problem. I would suggest you add the following argument to your .xml schedule file to bypass any issues with privileges:

-executionpolicy bypass

That fixed my problem.

I also removed the mute part of the script since I have a Dell Venue 8 Pro and I don't believe that really effects my tablet. Will have to test further to be able to confirm.

Lastly, I would also recommend in the .xml file to set the task priority from 7 (default) to 0 (the highest). This ensures the task will always run with high priority.
 

Matthew Hardgrove

New member
Jul 21, 2015
1
0
0
Visit site
I tried to install this on my Steam 7, it doesn't seem to be working at all. I put in the folder it asks for and imported both. My wifi and volume are not being muted or turned off when I put in idle mode. Can anyone help please? I have four files in the folder, imported both, but it isn't working and the battery drain is still terrible. I also tried shutting off all live tiles as well as disabling anything from running in the background. This thing is still guzzling the battery and when in idle mode still losing battery life by leaps and bounds.
 

Members online

Forum statistics

Threads
323,304
Messages
2,243,604
Members
428,055
Latest member
DrPendragon