воскресенье, 18 января 2009 г.

Lenovo Thinkpad T61 modelines

I have spent this weekend configuring Linux on my new Lenovo T61. I copied my old Gentoo installation from Lenovo T43p. It worked without problems with proprietary nvidia drivers. Here is very usefull resource about Gentoo and T61: http://en.gentoo-wiki.com/wiki/Lenovo_Thinkpad_T61

Hardest problem I had was that nvidia drivers reported just 3 resolutions I could use: 1440x900 (native), 1024x768 and 512x384. I need atleast 640x480 to play StarCraft, so I spent some time searching for modelines on Internet and didn't find them. 'Gtf' command line tool didn't produce what I need, so I got the refresh rates with The XFree86 Modeline Generator using timings from Xorg.0.log:
(--) NVIDIA(0): Valid HSync Range : 46.3 kHz - 55.6 kHz
(--) NVIDIA(0): Valid VRefresh Range : 50 Hz - 60 Hz
(--) NVIDIA(0): EDID maximum pixel clock : 97.8 MHz

For the 'NVIDIA GPU Quadro NVS 140M (G86GL)' and lcd panel I made following mode lines:

# native mode with maximized refresh rate
Modeline "1440x900@55" 97.76 1440 1472 1840 1872 900 919 927 946

# 1024x768, height - constant, width - stretch to full the screen
Modeline "1224x768@60" 76.43 1224 1256 1544 1576 768 783 791 807

# 1024x768, vanilla, requires aspect-scaled FlatPanelProperties
Modeline "1024x768@60" 64.56 1024 1056 1296 1328 768 783 791 807

# Minimum supported mode using screen aspect ration (without doublescan)
Modeline "1176x735@60" 69.71 1176 1208 1472 1504 735 750 757 772

# 800x600, width - fixed, height adjusted to fit the screen
Modeline "800x500@52d" 53.31 800 832 928 960 500 510 515 526 doublescan

# 640x480, vanilla, maximized refresh rate
Modeline "640x480@54d" 43.54 640 672 752 784 480 490 495 505 doublescan

# 512x384, vanilla
Modeline "512x384@60d" 30.76 512 544 600 632 384 392 396 404 doublescan

# Minimum supported resolution with screen aspect ration
Modeline "584x365@60d" 32.72 584 616 672 704 365 372 376 384 doublescan

In device followiong option should be set to scale modes to full screen maintaining aspect ratio:
Option "FlatPanelProperties" "Scaling = aspect-scaled"

Also, put the modes to the Screen section:

Section "Screen"
Identifier "DefaultScreen"
Device "Nvidia"
Monitor "DefaultMonitor"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1440x900@55" "1224x768@60" "1024x768@60" "1176x735@60" "800x500@52d" "640x480@54d" "512x384@60d" "584x365@60d"
EndSubSection
EndSection

1 комментарий: