Sunday, June 8, 2025

2025-06-08 - Power saving mode script for laptop with auto balanced-mode trigger

        I wanted to set up my Windows laptop so that it only switches to Power Saver mode when I say so, not automatically when I unplug it, and switches back to Balanced mode automatically only when it’s plugged in (or specifically without me having to remember to switch it back eventually--one less thing to worry about). I don’t want screen brightness or sleep settings changed — just the power plan switch. 

        This is a thing that happens like clockwork every Sunday. I have a zoom meeting that I stream and record to the cloud for later watching by those who missed the meeting. But to make things easier on myself, when I come to this meeting I only bring my laptop, mouse, a power bank and type c cord just incase (the power bank guarantees external power whether or not there's a wall jack to plug into), and I want to run down my battery somewhat on a regular basis but not every time I use it, so this meeting is that time that I do so. But sometimes I go to this meeting and then I need to do some work without being plugged in for a while. So I want the option to use power saving mode manually for when I know these events will happen. If I set it to automatically use power saving mode every time I'm on battery then I will lose performance even in times when I wont be on battery for long enough to worry about running out of power. So I don't want to use this all the time. 

        First, I checked existing power schemes with:

    powercfg /list

        I saw the Balanced and Power Saver plan. I duplicated the Power Saver scheme to keep a fresh copy:

    powercfg /duplicatescheme a1841308-3541-4fab-bc81-f71556f20b4a

        I switched to Power Saver with:

    powercfg /setactive <new-guid>

        (I replaced <new-guid> with the GUID returned from duplication)

        There is an easy way to determine the GUID numbers for both power saving and balanced modes or any of the modes you have on your machine:

    powercfg /list 

        Mine were:

    Balanced: 381b4222-f694-41f0-9685-ff5bb260df2e

    Power Saver: a1841308-3541-4fab-bc81-f71556f20b4a

        Next, I wanted to detect when the power source changes (plugged/unplugged) and automatically switch to Balanced mode only on plugging in. After trying it a few times, the following command worked and gave me a list of the past several times i either plugged in my laptop or unplugged it:

    Get-WinEvent -LogName System -FilterXPath "*[System[(EventID=105)]]" -MaxEvents 10 | Where-Object {$_.ProviderName -eq "Microsoft-Windows-Kernel-Power"} | Format-Table TimeCreated, Message -AutoSize

        This command showed “Power source change” events but didn’t specify plugged or unplugged. So what do I do? I want a script to manually activate efficiency or power saving mode, but then for the laptop to automatically switch back. I looked into whether task scheduler could do this. I had never used task scheduler before. It appeared that I could when I looked it up. As for whether there are better methods, I am not sure. But this one worked and it gave me an excuse to use Task Scheduler. 

        To automate the plan switch on plug-in, I created a PowerShell script, which listens for an event ID 105, checking for current power source status changes. If plugged in, set power plan to Balanced. Otherwise, do nothing, leaving Power Saver mode only when I manually activate it. I concluded that if I only get an indication of a power source change with the 105 log (yes, there are ways to check more specifically what the power source is), then I just need to set it to always change the power plan to Balanced since that is the only thing I want automated. That way the manually activated power saver script can work on its own, and it will automatically switch the second I get power. 

        Then I created a Task Scheduler task triggered on Event ID 105 to run this script with highest privileges.

        Press Windows key > type "Task Scheduler" > press Enter > In Task Scheduler window, click "Create Task" (not create basic task) on right panel > In General tab, name it "Power Source Switch" > check "Run with highest privileges" > Go to Triggers tab > Click "New..." > In Begin the task dropdown, select "On an event" > Set Log to "System" > Set Source to "Microsoft-Windows-Kernel-Power" > Set Event ID to "105" > Click OK > Go to Actions tab > Click "New..." > Action: "Start a program" > In Program/script, enter "powershell.exe" > In Add arguments, enter "-Command "powercfg /setactive 381b4222-f694-41f0-9685-ff5bb260df2e" (this is with my particular GUID number for Balanced mode > Click OK > Go to Conditions tab > make sure "Start the task only if the computer is on AC power" is checked > Click OK to save task.

        I tested the task I just scheduled by unplugging and switching to power saver mode in PowerShell with Administrator privileges using the following command:

    powercfg /setactive a1841308-3541-4fab-bc81-f71556f20b4a

        Then to verify it was in power saver mode and then again after it switched back to balanced mode, I used the following command:

    powercfg /list


        The asterisk indicated Power Saving mode. 

        Then I plugged power back in and after a few seconds, a blue screen appeared and disappeared, I ran the list command again, and the asterisk indicated it had been set to Balanced mode. Success!

        To make manual activation of Power Saver easy, I wrote a batch file with:

    @echo off
    powercfg /setactive a1841308-3541-4fab-bc81-f71556f20b4a
    exit

        I Saved the batch file somewhere else to keep my desktop clean, I held alt down and moved the file, which created a shortcut, and cut the shortcut, pasted it to my desktop, right clicked on the shortcut > properties > shortcut tab > Advanced > to clicked “Run as administrator" > applied all changes. 

        This way I can switch to Power Saver mode manually anytime, but plugging in always switches back to Balanced automatically. No screen dimming or sleep settings get messed with — just the plan. I haven't checked but I assume that anything like what happens when I close lid or what happens when I press the power button or specific sleep settings might have to be matched with what balanced have. 

        Enjoy controlling your power plans like a pro!

This has been Truncat3d 00000000111100010100110______________end of line

2025-06-08 - Configuring Zoom for Hymn Audio During Sacrament Streams on Windows 11

        Every Sunday, I stream our sacrament meeting using Zoom on my Windows 11 laptop. One ongoing issue has been making sure the microphone at the pulpit (connected via a USB audio interface) actually picks up the hymn singing clearly. Here's exactly what I did to get the audio working right, broken down into the same order I performed the steps. 

BEFORE THE STREAM STARTED

        1. Adjust Zoom Audio Settings (Advanced)

        Open Zoom Workplace app

        Click profile icon (top right) > Settings > Audio > Scroll down > Click "Advanced"

        In the Advanced section, I changed:

        Signal processing by Windows audio device drivers > Off (Windows raw audio)

        Windows system audio enhancements > Off

        Echo cancellation > Low

        Audio capture and playback API > Windows Audio Session

        Note: The option "Original Sound for Musicians" was not visible here yet.

 
DURING THE STREAM

        Once I started the Zoom stream, I went back into audio settings, and additional audio settings became visible.  
  
        2. Enable Music Audio Profile in Zoom

        In Zoom Workplace app while streaming:

        Click caret next to mic (lower left) > Audio Settings

        Inside Audio Settings (now during the stream):

        Found a new section labeled Audio Profile

        Enabled: @ Original sound for musicians (recommended for studio environments)

        Checked the box: Displays in-meeting toggle to switch between Zoom optimized audio and original sound for musicians

        Checked: High fidelity music mode

        Checked: Stereo audio

        Then, in the live meeting window:

        Clicked: "Original Sound for Musicians: Off" (top middle/right)

        It toggled to: "Original Sound for Musicians: On"

        Zoom auto-disabled noise suppression at that moment, which is expected and correct.

 
WINDOWS SETTINGS WORK
 
        3. Open Classic Sound Settings

        Press Windows key + R > Type: control mmsys.cpl sounds > Press Enter

        Inside the Sound window:

        Go to: Recording tab

        Identified which device was the pulpit mic (USB Audio Device) by tapping the mic and watching input level

        Right-click > Rename to "Pulpit Mic" for clarity

        Double-click pulpit mic > Levels tab

        Confirmed volume already at 100%

        "Microphone Boost" option was not available

        Also enabled mic monitoring:

        Double-click pulpit mic > Listen tab > Checked: Listen to this device

        Repeated the same for webcam mic, though it was secondary

        IMPORTANT!!! At the top of the Zoom stream window, there is essentially a toggle switch for the audio input, I guess this starts appearing in the streams when you enable Original Sound for Musicians. It won't look like a a toggle switch. It will just say "Original Sound for Musicians: off" located at the top of the screen, click the OFF word, and it turns ON. I learned this one twice over the course of four streams throughout a month only once a week. It is crucial to remember this or all of the rest of it is pointless.  


      Note: Despite good audio input in Zoom, the input level in the Windows Sound window was very low. This indicates the USB interface has fixed, likely line-level input gain, and cannot be boosted through Windows.

UNEXPECTED PROBLEM

        I didn't know why but the audio icon in the zoom stream window had a red exclamation point symbol and it made it hard to tell if I had properly muted the stream for certain situations, and that it was back up when those situations passed. Apparently this was linked to my input device being set to something other than my REALTEK audio output driver. So I set it back. No idea how this happened because thought I checked every time before switching the microphone input back and fourth. 

 
SUMMARY

        I preconfigured the Zoom Workplace advanced audio settings to disable signal processing and audio enhancements, selected low echo cancellation, and used the Windows Audio Session API. During the live stream, I accessed Zoom's full audio profile features to enable Original Sound for Musicians and its related high-fidelity audio features. Finally, I used the classic Windows Sound settings to monitor and identify the correct input device and confirmed volume levels. ALWAYS remember to toggle the Original Sound for Musicians switch in the stream window. 

        These combined steps allowed Zoom to finally pick up and transmit the hymns clearly from the pulpit mic during the sacrament stream.

This has been Truncat3d 00000000111100010100110______________end of line

2025-07-10 - BYU Wi‑Fi captive portal troubleshooting

  BYU Wi‑Fi Captive Portal Troubleshooting What happened I had used BYU Wi‑Fi just fine before, but at some point, the captive portal star...