The xorg xvideo extension is commonly used for video playback. It exposes different types of hardware video support using a common API by making available "Adaptors" and "ports". You can see and manipulate these using the "xvinfo" and "xvattr" tools. For example, on my Intel 945GM, I have:
$ xvinfo | grep Adaptor Adaptor #0: "Intel(R) Textured Video" Adaptor #1: "Intel(R) Video Overlay" (one or both of these may not work for you depending on the version of xorg and the i810/intel driver you have. I had to update to a git snapshot of the driver to get the Video Overlay to work. See http://gitweb.freedesktop.org/?p=xorg/driver/xf86-video-intel.git). There are minor differences in playback quality between these (for example, textured video exhibits tearing while the overlay doesn't), but of interest to this list is that there is a large difference in power consumption between the two when playing fullscreen video. I played a short fullscreen video using each xvideo output while running on battery and sampling the discharge rate from /proc/acpi/battery/BAT0/state every 4 seconds. With vlc, this resulted in: $ ./pt --xvideo-adaptor 0 using vlc --xvideo-adaptor 0 present rate: 1477 mA present rate: 1477 mA present rate: 1641 mA present rate: 1641 mA present rate: 1641 mA present rate: 1641 mA present rate: 1652 mA present rate: 1652 mA present rate: 1652 mA present rate: 1652 mA $ ./pt --xvideo-adaptor 1 using vlc --xvideo-adaptor 1 present rate: 1508 mA present rate: 1508 mA present rate: 1508 mA present rate: 1508 mA present rate: 1482 mA present rate: 1482 mA present rate: 1482 mA present rate: 1482 mA present rate: 1479 mA present rate: 1479 mA That's a mean of 1613 vs 1492 mA, or 7.5% power savings when using the overlay. The difference is reproducable - here's another run, this time with mplayer and a more demanding video: $ ./pt -vo xv:port=73 using mplayer -vo xv:port=73 present rate: 1402 mA present rate: 1402 mA present rate: 1402 mA present rate: 1673 mA present rate: 1673 mA present rate: 1673 mA present rate: 1673 mA present rate: 1719 mA present rate: 1719 mA present rate: 1719 mA $ ./pt -vo xv:port=89 using mplayer -vo xv:port=89 present rate: 1370 mA present rate: 1370 mA present rate: 1370 mA present rate: 1495 mA present rate: 1495 mA present rate: 1495 mA present rate: 1495 mA present rate: 1502 mA present rate: 1502 mA present rate: 1502 mA Those average out to 1606 vs 1460, or 9.1% power savings. That's enough to be the difference between being able to watch an entire dvd on one battery charge or not. I don't know that powertop can do much about this, as you won't typically run it while watching video. But it would be nice to point out in the Tips & Tricks part of the website that most video players seem to simply grab the first xvideo adapter available, not necessarily the best. Both vlc and mplayer default to adapter 0, which is inferior both in terms of output quality and power consumption. (I wonder if use of the overlay actually looks worse to powertop - I think the reason the overlay doesn't have tearing is that it syncs to the vblank interrupt. So I imagine powertop would show it as a bigger source of wakeups, when in reality only rendering video frames as often as necessary could save a lot of cpu power). Jason _______________________________________________ Power mailing list [email protected] http://www.bughost.org/mailman/listinfo/power
