Showing posts with label hdmi. Show all posts
Showing posts with label hdmi. Show all posts

Monday, February 6, 2012

Make your GeForce GT 520 (or any Nvidia) video card sip power

I recently acquired an HP ProLiant Microserver N40L to replace my old giant mid-tower RAID box. Now that FreeBSD 9.0-RELEASE has integrated ZFS v28 for several months, I decided to migrate away from OpenIndiana 151a and enjoy FreeBSD's Linux binary compatibility, more up-to-date software selection, and a broader install base.

I imported my GeForce GT 520 video card into my new ProLiant microserver. The video card can be adapted to a "low profile" PCI slot by replacing the bracket in the front of the card. I disconnected the card's fan because it was loud, annoying, and making the dreaded "my bearings are out" screeeeeeeeching noise.

The GT 520 supports two digital monitors -- one connected via HDMI, and one via DVI. After enabling the commercially supported 'nvidia' driver by adding nvidia_load="YES" to /boot/loader.conf and generating a suitable xorg.conf file by running nvidia-xconfig, I was able to run nvidia-settings and watched my card idle at 85 degrees C. My power meter measured my system's idle consumption in X11 to be 80 watts. I also noticed that the PowerMizer showed that my card was operating at the maximum performance level.

After a bit of research, I discovered how to force the card into low-power mode. I added the following boldfaced lines into my /etc/X11/xorg.conf file:

Section "Device"
  Identifier     "Device0"
  Driver         "nvidia"
  VendorName     "NVIDIA Corporation"
  BoardName      "GeForce GT 520"
  Option  "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefaultAC=0x3"
EndSection
This tells the card to enable PowerMizer; 0x2222 stands for "fixed frequency on battery and on AC" (byte 0x22 is for fixed frequency, 0x33 is for adaptive frequency, MSB is for battery), and the default power profile on AC is the lowest level (0x3 is lowest power, 0x2 is medium power, and 0x1 is high power).

I rebooted, and measured my card's idle temperature at 48 degrees C and idle power consumption in X11 to be 70 watts. This is a ten-watt power savings -- and remember, I disconnected the GT 520's fan.

The GeForce GT 520 is a great choice for anyone wanting to attach one or more DVI monitors to a low-power or passively cooled workstation.

I do not recommend ATI cards because configuring them to dual-head in Solaris or BSD environments has been nothing but a headache for me.

Tuesday, June 1, 2010

Correct Modelines for Panasonic TC-P42G10

Getting the picture from my Linux media box to be centered and clocked properly on my Panasonic plasma display has been quite challenging. This is because the TC-P42G10 furnishes incorrect EDID data to my computer through the DVI interface (shame on you, Panasonic!) that resulted in an off-center display and a vertical refresh rate ever so close to 60.01 Hz.

Centering the image in the display was not terribly challenging. The big mystery occurred when the television would cleanly display my Linux desktop; however, once a full-screen video started playing, the screen would go blank. It took me many hours to figure out that rounding errors in the calculated pixel clock caused the video refresh rate to be greater than 60 Hz. This, in turn, would cause the television's firmware to treat the video as invalid input -- resulting in a blank screen and no sound.

Furthermore, the latest Linux kernel drivers for ATI cards employ a new interface called kernel modesetting, or KMS. This means that, instead of the X server, the Linux kernel handles the probing of EDID information and configuration of all video timings. Because KMS is a new interface, there is no way for the user to easily specify his or her own timing information to the Linux kernel. Therefore, booting with the kernel option nomodeset is required to disable KMS and allow Xorg to handle mode changes.

Here is the modeline for Xorg:
Mode "1920x1080p"
DotClock 145
HTimings 1920 2016 2060 2200
# (67.5 kHz)
VTimings 1080 1084 1096 1125 # 60 Hz.
Flags "-hsync" "+vsync"
EndMode
Using this in the /etc/x11/xorg.conf had changed a little bit since the last time I had to do x11 hacking. Here's how we do it in 2010:
Section "Device"
Identifier "Configured Video Device"
Driver "radeon"
Option "NoDDC"
Option "IgnoreEDID" "on"
EndSection

Section "ServerFlags"
Option "AIGLX" "off" # Enabling this option seems to screw up firefox
EndSection

Section "Monitor"
Identifier "Configured Monitor"
HorizSync 15-68
VertRefresh 32-61
Mode "Original"
DotClock 148.50
HTimings 1920 2008 2052 2200
VTimings 1080 1084 1089 1125
Flags "-hsync" "+vsync"
EndMode
Mode "1920x1080p" # <60 Hz.
DotClock 145
HTimings 1920 2016 2060 2200
VTimings 1080 1084 1096 1125
Flags "-hsync" "+vsync"
# <(67.5 kHz)
EndMode
Mode "1920x1080i"
DotClock 72.5
HTimings 1920 2016 2060 2200
VTimings 1080 1084 1096 1125
Flags "-HSync" "-VSync" "Interlace"
EndMode
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080p"
EndSubSection
EndSection
And there you have it.

Update: I found another test video that caused screen blanking, and had to back off the pixel clock even further to a value of "145."