Skip to Content »

online discount medstore
advair diskus for sale
buy advair diskus without prescription
allegra for sale
buy allegra without prescription
aristocort for sale
buy aristocort without prescription
astelin for sale
buy astelin without prescription
atarax for sale
buy atarax without prescription
benadryl for sale
buy benadryl without prescription
buy clarinex without prescription
clarinex for sale
buy claritin without prescription
claritin for sale
buy flonase without prescription
flonase for sale
buy ventolin without prescription
ventolin for sale
amoxil for sale
buy amoxil without prescription
augmentin for sale
buy augmentin without prescription
bactrim for sale
buy bactrim without prescription
biaxin for sale
buy biaxin without prescription
buy cipro without prescription
cipro for sale
buy cleocin without prescription
cleocin for sale
buy dexone without prescription
dexone for sale
buy flagyl without prescription
flagyl for sale
buy levaquin without prescription
levaquin for sale
buy omnicef without prescription
omnicef for sale
amaryl for sale
buy amaryl without prescription
buy cozaar without prescription
cozaar for sale
buy diabecon without prescription
diabecon for sale
buy glucophage without prescription
glucophage for sale
buy glucotrol without prescription
glucotrol for sale
buy glucovance without prescription
glucovance for sale
buy micronase without prescription
micronase for sale
buy prandin without prescription
prandin for sale
buy precose without prescription
precose for sale
buy cialis professional without prescription
cialis professional for sale
buy cialis soft without prescription
cialis soft for sale
buy cialis super active without prescription
cialis super active for sale
buy cialis without prescription
cialis for sale
buy levitra without prescription
levitra for sale
buy viagra professional without prescription
viagra professional for sale
buy viagra soft without prescription
viagra soft for sale
buy viagra super active without prescription
viagra super active for sale
buy viagra super force without prescription
viagra super force for sale
buy viagra without prescription
viagra for sale
buy celebrex without prescription
celebrex for sale
buy colcrys without prescription
colcrys for sale
buy feldene without prescription
feldene for sale
buy imitrex without prescription
imitrex for sale
buy inderal without prescription
inderal for sale
buy indocin without prescription
indocin for sale
buy naprosyn without prescription
naprosyn for sale
buy pletal without prescription
pletal for sale
buy robaxin without prescription
robaxin for sale
buy voltaren without prescription
voltaren for sale

Tech Life of Recht » archive for 'nvidia'

 DVI adapter with Macbook Pro and Linux

  • December 29th, 2007
  • 2:36 am

I recently discovered that using the DVI adapter with the Macbook Pro wasn’t as easy as I thought. The MBP comes with a DVI connector, which is great, and it works just fine when you plug a DVI monitor into it. However, when doing presentations, you almost always have to use a regular VGA connector. Even though the driver (nvidia) could see the screen, it refused to display anything.
Now I’ve finally worked out a solution, and luckily it’s not that complicated. The trick is that even though the monitor is recognized, it is still treated as a DVI monitor. In order to get the driver to treat it as a normal VGA monitor, add this to xorg.conf:
[code]
Section “Device”

Option “ConnectedMonitor” “DFP-0,DFP-1,CRT-0”
Option “MetaModes” “DFP-0: 1440×900, DFP-1: 1680×1050; DFP-0: 1440×900, CRT-0: 1280×1024”
EndSection
[/code]

Of course, the modes should be adjusted according to the setup. The MetaModes line should contain the valid combinations, separated by ;. In this case, I’ve specified that the internal display should always run at 1440×900, and then I either have a DVI monitor connected at 1680×1050 or a VGA monitor at 1280×1024. Of course, it’s also possible just to specify one monitor if you’re not using TwinView.

The trick now is that when running in X, xrandr can be used to switch between the monitors. When running xrandr, it should display something like this:
[code]
Screen 0: minimum 1280 x 900, current 1440 x 900, maximum 2720 x 1024
default connected 1440×900+0+0 (normal left inverted right) 0mm x 0mm
1440×900 50.0* 51.0 54.0
2720×1024 52.0 50.0
2464×900 53.0
1280×1024 55.0
[/code]

The tricky part now is that the nvidia driver “hides” the monitor configuration in the refresh rate. For example, the 1280×1024 resolution has only one rate, which means that this resolution is unique to one monitor. Switching to this mode with ‘xrandr -s 1280×1024’ will enable the VGA monitor and disable the internal display.
However, the mode 2720×1024 has two refresh rates, 52 and 50. Unfortunately there’s no easy way of telling it, but the 52 rate is with the internal display and the VGA monitor on, while the 50 is with only the internal display on (and a larger desktop, something you probably don’t want to use). Switching on the VGA monitor then requires two arguments: xrandr -s 2720×1024 –rate 52.

This isn’t the easiest to work with, so I’ve created a small Perl script which can query the nvidia driver directly to find the available modes, and then call xrandr. Download the script here. To use it, the X11::Protocol Perl package must be installed, and of course xrandr and the nvidia driver. To use the script, simply call it without any arguments to get a list of the supported resolutions and monitors. Select a configuration by calling the script with -s where id is one of the numbers in the first column. That’s about as simple as it gets.