Kodi Community Forum

Full Version: [Windows] Rescanning hardware, to get display back
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A well known problem that I had was that if I booted my htpc without having my receiver at the right channel, I got no image on the tv when I switched to the htpc channel.
This might also occur when just using a TV that is not on the correct HDMI channel when booting the htpc.

The solution is to rescan hardware, to detect your display.
Normally this is done by right clicking your computer and select properties, going to Device Manager, and then clicking "Scan for hardware changes" button (or pressing F5), but this is hard to do when blind (without TV)

So I downloaded the DevCon.exe tool from microsoft:
http://support.microsoft.com/kb/311272

Unpacked it to my windows dir, and set a button on my remote to launch:
c:\windows\devcon.exe rescan

This works great, and restores my display every time.

If you want to run it hidden, so it wont appear if you accidentally press the button, you can use a Visual Basic Script, like this:

Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Windows\devcon.exe rescan",0

Save it to RescanHardware.vbs, and point the button on your remote to execute that file.


You may also have to change windows default resolution in regedit to prevent the display from defaulting to 1024x768 when rescanning hardware.

Start -> Run -> regedit

Navigate to: "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Video" and find your video adapter (just lots of numbers, but you'll find out!)
On some systems this is located elsewhere: "HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\VIDEO"
Inside the folder that has a string called HardwareInformation.AdapterString that is set to a name that matches your graphics card, find the two settings:

DefaultSettings.XResolution and DefaultSettings.YResolution

This might also be located in a subfolder of the folder you are in, if so, change both places to be sure!

Change it to your preferred resolution, but remember to check the DEC box when inputting the values.

e.g.
DefaultSettings.XResolution = 1280
DefaultSettings.YResolution = 720