Multi-monitor support with Randr 1.3 and NVidia’s proprietary driver

I just got a second monitor at home and wanted to configure the two monitors with my NVidia graphics card. You can set up TwinView in the Nvida Settings application, however I did not like that solution: the next time I restarted X, all the settings were lost and the second monitor powered off. Also GNOME did not seem to behave correctly when the monitors went on stand by and I unlocked the desktop. The desktop appeared to be shifted over the monitors. The latter might be a bug of gnome-settings-daemon 3.2 and not Nvidia’s however.

However since the NVidia proprietary driver version 330 beta series, it finally supports Randr 1.3 so that you can configure dual screen with the configuration tools provided with your desktop. This driver is currently available in Debian Experimental. To install it (make sure you have experimental in your apt sources.list first, of course), run this command:

# apt-get install -t experimental xserver-xorg-video-nvidia

I also pulled in gnome-settings-daemon and gnome-control-center version 3.4 which appeared in Debian Sid today:

# apt-get install -t unstable gnome-settings-daemon gnome-contol-center

Now reboot your system (to be sure the new Nvidia kernel and X drivers are loaded), and then go System Tools – Preferences – System Settings (gnome-control-center in a terminal window) – Display. Enable the wo monitors, set the optimal (highest) resolution and drag them in the right position, click Apply, and confirm everything is working fine. Now you have a nice multi-monitor setup without needing to mess with NVidia’s twin view and without having to create a script to get the right settings applied automatically when X is started.

Fix bad performance with NVidia 177.80 drivers

Since I upgraded to Nvidia’s beta driver series which were supposed to improve performance for KDE 4 (including the now stable version 177.80), my GNOME desktop on my system with a Geforce 6600 GT graphics card, felt a lot slower. It was most noticeable when browsing the web with Firefox. When quickly scrolling a web page with my mouse’s scroll wheel, X started eating 100% of CPU time and the image on the screen started lagging behind a lot. Also just rendering a page seemed to be much slower. Disabling smooth scrolling in Firefox, did not help at all.

Searching on the web, I found out that I’m not the only one with this problem. However, setting the InitialPixmapPlacement to 0 made the Compiz/Emerald window manager crash. I found out that setting InitialPixmapPlacement to 1 also seemed to fix the problem, without compiz/emerald crashing.

So if you also suffer from bad performance in GNOME with the proprietary NVidia drivers, create a script called in /usr/local/bin with contents:

/usr/bin/nvidia-settings -a InitialPixmapPlacement=1

Then go to GNOME’s System – Preference menu and start up Sessions. In the startup programs tab page, click on Add, and choose /usr/local/bin/ as the command. Save the settings, and restart X. Firefox now works a lot faster for me: web pages now appear instantaneous and I can scroll web pages without my CPU getting overloaded.

Thanks to NVidia for bringing me such great performance with their new drivers. Out of gratefulness, I’ll make sure my next graphics card is an Intel or ATI one.