Workaround for Media Center Black Screen of Death

I’ve come up with somewhat of a workaround for the Media Center Black Screen of Death as discussed here:

My current solution, until either Microsoft or ATI comes up with a fix, is to attach a “task” to one of the events that the ATI drivers log in the system event log. All the task does kill the Media Center process when the ATI driver logs that the video device is no longer connected. Since Media Center is no longer running when the television is turned on, the Black Screen of Death doesn’t appear.

First download this zip package, which contains two files: (1.52 kb) 

And extract the files to some temporary location.

Next you need to make sure your ATI driver is properly logging events. I’ve only tested this with the driver that ships on the Windows 7 DVD, which is version 8.632.1.2000 and this version seems to have event logging enabled by default. If you’re using a different version, double click on the “EnableATILogging.reg” file that you extracted to import the registry entries into your system’s registry.

At this point you might want to test to make sure the ATI driver is properly logging events so go ahead and reboot, run Media Center, play a video and then turn off your television while the video is playing. Wait 10 seconds or so, turn the TV on, close out Media Center using your favorite method of keyboard or mouse hackery and then load up the Windows Event Viewer by hitting the Start button and typing “event viewer” into the search area. Click on the arrow next to Windows Logs to expand the Windows Logs branch and finally click on System.

The event Source you are looking for is “atikmdag” and the Event ID is “43029”. There should be four of them near the top of the log but if you’re having trouble finding one, in the right column is an Action called “Find…”. Click on that and type in “display is not active”. If no events were found, something is wrong. Either the registry key wasn’t imported properly or the ATI driver on your system isn’t logging properly. You can try re-importing the key and rebooting and repeating the previous steps to generate log messages but if you’re still not seeing Source “atikmdag” with Event ID “43029” messages then give up now because this workaround requires the ATI driver to be logging properly.

The final step is to attach a custom task to the 43029 event so hit Start and type in “Task Scheduler” to bring up the Windows Task Scheduler. In the Action column on the right, click on “Import Task…” and then navigate to the temporary folder where you extracted “System_atikmdag_43029.xml”. Select that file and click on Open. This will import the Task I exported from my Media Center machine into your machine. The next dialog box will let you customize the task and the only thing you should have to change is the user account that the task runs under. In the “General” tab, click on “Change User or Group…” and type in the username of the user that Media Center runs as. Generally this will be the user you’re logged in as to complete this workaround. Finally click on “OK” to complete the importing of the Task and then reboot your machine just to make sure all the changes took hold.

Although this workaround does effectively let you enjoy Media Center using only remotes, since there is no event logged when the display becomes available again, you have to run Media Center manually each time the television is turned on. This isn’t much of an issue since you can just push the Start button on your Media Center remote, but it’s better than digging out a keyboard and/or mouse and manually trying to figure out how to close Media Center. Seeing the Windows desktop each time the television is turned on doesn’t have a very set-top-boxy feeling so I’m still actively searching for a solution to run Media Center when the display becomes available.

One possible solution for starting Media Center could revolve around “sleep mode”. If the user always wakes the computer up from sleep when they turn the television on, a task attached to the log message generated when the computer resumes could be set to run Media Center. The current issue I’m having, however, is with “Away Mode”. If Media Center is currently recording something and the user pushes the power button on the remote, the computer won’t go into sleep mode, instead it goes into away mode. Away mode isn’t a real sleep mode, the computer just turns off the video giving the user the illusion that the “box” has been turned off or put to sleep. Unlike, sleep, exiting away mode has logs no event so there’s nothing to attach a task to.

Ironically turning the television on triggers “device disconnected/connected” sounds in Windows but doesn’t seem to generate any type of “video device connected” logs anywhere in “Windows Logs” or “Applications and Services Logs”. Applications and Services Logs even has a category for “Hardware”, which is suspiciously empty. And despite “Microsoft\Windows” having like a zillion subcategories, I wasn’t able to find a single event that could be used as a reliable way of running Media Center when the television is turned on. Also, ironically, despite having an EnergyStar logo and unlike a normal computer monitor, the television here doesn’t go into standby mode when the HDMI signal is removed. Instead it just shows a scary blue screen.

Anyway, hopefully this half-of-a-solution will help some of you get back to enjoying Media Center without spending money on extra hardware to fix this issue. Meanwhile, let’s keep bugging ATI and Microsoft to get out a fix for this because it seems like it should be something that’s simple to fix, just remove any code that puts of a black overlay in front of Media Center! Why there’s even code to do something like this is beyond me.