views:

704

answers:

1

I have a strange bug somewhere in my system that causes the screen to move very fast when it occurs (I can't really describe it) and I learned to deal with it by putting my laptop to sleep then waking it up ..

I'm suspecting it's something with the display driver, and it gets fixed if the driver is restarted.

Is there a way to restart the display driver programatically?

I noticed sometimes in vista the screen blanks for 2 seconds and a ballon tip appears in the tray saying the display driver had to restarted due to something blah blah.
So I figured there must be a way to restart it in code.

What I want to do is write a command line tool that restarts the display driver so that I can launch it with a keyboard combination when I need to.

[ UPDATE (30/1/2009) I tried restarting the aero service as suggested, but it didn't solve the problem. ]

it seems the name of the display driver "service" is igfx, however, I can't stop it from the command line

C:\>net stop igfx
The requested pause, continue, or stop is not valid for this service.

More help is available by typing NET HELPMSG 2191.

C:\>NET HELPMSG 2191

The requested pause, continue, or stop is not valid for this service.
+1  A: 

There are two things you can try, which will restart various parts of the video stack.

Restart DWM (Aero/Glass) with:

net stop uxsms
net start uxsms

Change the resolution with a utility such as setres.exe

NicJ