0

My computer suffers from the dreaded no sound upon wake-up from sleep (on my HDMI connection) on Windows 10 using the Integrated graphics, Intel HD Graphics 530. I don't know the exact reason for why this is happening, but I understand it as the handshake between monitor and computer is not properly established after wakeup, and thus the audio device is not recognized.

This is confirmed by viewing the available sound devices in Windows.

Apparently this is a common problem, and I tried the following solutions:

  1. Pin-19 trick: Which consist of blocking pin 19, which prevents detection of when monitor goes to sleep. This did not work for me, and I got just a blank screen.
  2. EDID trick: Which involves passing the missing information always on-demand so it doesn't have to try to get the data from the handshake.

Neither solution worked, and the only consistent thing I found working was going to Device Manager, and right clicking the computer, and choosing "Scan for hardware changes".

Is there a way to replicate that with a Windows shortcut on the desktop?

Perhaps a tiny C# program that gets executed every time it wakes up from sleep? Anyone with some Windows programming skills know how to do this?

newbsie
  • 115
  • 7

1 Answers1

0

It's possible to subscribe to an event that's fired when the computer is resuming from sleep.

SystemEvents.PowerModeChanged += OnPowerChange;

Inside the event you can check for the PowerMode and run code depending on which one it is. Resume is the one that tells you the computer is waking up from sleep.

private void OnPowerChange(object s, PowerModeChangedEventArgs e) 
{
    switch ( e.Mode ) 
    {
        case PowerModes.Resume: 
            ScanForHardwareChanges(); // Your own method
            break;

        // Possibly hand other power modes too
    }
}

Regarding your question about running the hardware scan programmatically, here's a thread that has multiple examples and links that'll help you:

Is there an API call to start a scan for hardware devices?

Community
  • 1
  • 1
Timo Salomäki
  • 7,099
  • 3
  • 25
  • 40