Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


Search this Thread
Old 03-04-2011, 12:04 AM   #1
Registered: Jun 2004
Posts: 71

Rep: Reputation: 6
nvidia proprietary driver, nvidia-settings and how to configure panning

Hello everybody,

is there anybody out there who has indepth knowledge on how the panning feature of the nvidia proprietary driver does work?

I have a dual-head nvidia card with two TFTs connected. I am running twinview mode and everything works perfectly.

There are two things I want to achieve:

I want to use panning - I love this feature. But I don't want to configure it in my xorg.conf, if possible. I don't want to annoy other users with a preconfigured panning desktop on the display manager.

I know there should be a way to configure X to use a non-panning screenmode. But as far as I red in the xorg.conf manpage, this involves setting up ModeLines and stuff and I'm simply to lazy to do so. Besides that I'm afraid it will not work, because so far, when I configure one mode to be a panning one, all modes start panning.

Instead I would like to use nvidia-settings. I can start nvidia-settings in GUI mode when logged into a non-panning desktop and configure a nice panning desktop, as I like it. But I would prefer not to do this by hand everytime I log in, but to automate this. How do I do this?

I digged inside the nvidia-settings manpage, tried to find the right attributes and to manipulate them via console ... but no success - most attributes are poorly documented and only a few can be changed. So I tried to simply save the nvidia-settings configuration and reload it. This doesn't work either ... the config-file contains only a very few options, each one not being helpful for me.

So, how does nvidia-settings manipulate the X server? Is there any way to easily mimic this, without indepth analysis of the nvidia-settings sourcecode?

Tried looking into RandR, but there are no nvidia-specific features available ... of course.

I have two displays configured for panning in all four directions. The usual way it works is this:
When moving the mouse up and down, both screens pan in conjunction, as if they were clamped together.
When moving the mouse left and right, each screen pans on it's own. So, if I move the mouse left to right, first the left display pans right to left, until the mouse reaches the right display. Now, the right display starts to pan from right to left, while the left display stands still.

I played around with my xorg.conf, restarted the X server several times ... and suddenly, I had a different panning behaviour. Now, both screens seem to be clamped together when panning from left to right, too.

It looks a bit strange and distorted ... when starting X, the left screen shows my left background, the right screen shows my right background. This is the uttermost left position. When I move the mouse to the right, both screens start moving synchronous. The right screen moves into the left monitor! The hidden part of the desktop turns out to be black and not covered by my selected backgrounds. The KDE taskbar, placed on the right monitor, partly moves over to the left monitor. The taskbar ends at the beginning of the virtual screen - the initially hidden part is simply black. But I can place windows on it.

It looks like one big desktop, moving beyond my two screens.

This looks pretty cool and it is pretty cool ... and I want to keep it. Actually I don't dare to change anything, just not to loose it.

But I have no clue how I did this ... and how it works.

This is my MetaModes line at the moment:
Option "MetaModes" 
"CRT: 1600x1200, DFP: 1920x1080 @ 1920x1200; 
CRT: 1600x1200 @2200x1700 +2500+0, DFP: 1920x1080 @2500x1700 +0+0;
CRT: 1280x1024 +1280+0, DFP 1280x1024 +0+0;
CRT: 1024x768 +1024+0, DFP: 1024x768 +0+0"
Xorg.0.log does not show anything unusual. X chooses the second mode, as it has the biggest resolution of 4700x1700.

Modeswitching does work, but not as expected. Actually, all modes are panning within a virtual resolution of 4700x1700, just the viewport is smaller for the lower resolutions.

The second mode is the one with the extraordinary panning I described. For all the other modes, left and right screen pan independently, each for its own in horizontal direction.

Is there anything special with the second line? Looks correct to me, but the first line is missing the offsets and shouldn't work this way, according to the nvidia manual.

nvidia-settings shows a somewhat wrong layout. Both virtual desktops are side by side, and each viewport sits in the upper left corner, as usual. A correct representation would be: both viewports side by side, and a large virtual desktop expanding down and to the right.

But how do I configure it willingly? Preferably in a way described in "first".
Old 03-11-2011, 04:21 PM   #2
Registered: Jun 2004
Posts: 71

Original Poster
Rep: Reputation: 6
Well ... finally, I figured out a part of the solution myself ...

Some facts ...
there are two kinds of "mode switching":
1) switch by using "Ctrl"+"Alt"+"-" or "+".
This is, actually, just a "change of resolution" but not a mode switch. The (virtual) screen size remains unchanged, just the viewport zooms in or out. X does not issue a "mode switch" signal to the display manager, so the display manager can not adapt to the new resolution by moving windows, resizing background image etc. ...

So, the virtual screen size remains the same and nvidia solves this issue by panning within the virtual screen. This seems to be a special feature of the nvidia driver, sometimes reported as bug.

2) switch modes using xrandr
here, a "mode switch" signal is issued by X, the virtual screen size is changed and adopted to the real screen size ... the display manager has to move the windows, resize background image etc. ...

So, as the virtual screen size matches the real screen size here, there is no reason for nvidia to start panning.

And another fact:
I expected the nvidia driver to choose the largest available screenmode as default. This is wrong. It chooses the first screenmode in "Metamodes".

And another one fact:
Using Strg+Alt, you cannot switch to a mode that is larger than the actual virtual screen size. Thus, to allow you to choose any mode available, nvidia decides on startup to use the largest virtual screensize necessary (or defined in Metamodes) to display any mode.

Now, back to my Metamodes:
when this would be my only MetaMode:
CRT: 1600x1200 @2200x1700 +2500+0, DFP: 1920x1080 @2500x1700 +0+0;
then, nvidia would decide to set up two screens, each panning independently on its own - for unknown reason. Possibly, this is just because "it is set up to be like this". The display manager is set up correctly, the background image extends over the full virtual screen.

But ... when this are my Metamodes:
CRT: 1600x1200, DFP: 1920x1080 @ 1920x1200; 
CRT: 1600x1200 @2200x1700 +2500+0, DFP: 1920x1080 @2500x1700 +0+0;
then nvidia decides to use the first mode, as it is the first one. But the virtual screen size is determined by the second mode, to make switching to the second mode possible. So, the first mode is selected with a resolution of 3520x1200 and this is the resolution the displaymanager is aware of. But nvidia sets up a panning area of 4700x1700 and the whole 3520x1200 screen pans within the 4700x1700 area. This is different from the above, where virtual screens and panning is configured intentionally.

I can switch to mode 2 via Strg+Alt or via xrandr - there is no difference. But ...

when I switch from mode 2 to mode 1 via Strg-Alt, I get the same behaviour as described above.

when I switch from mode 2 to mode 1 via xrandr, X resizes the virtual screen to the dimensions of the given resolution of mode 1 and I loose panning. After that, I can not switch back to mode 2 via Strg+Alt, as the virtual screen is to small for mode 2. Switching back via xrandr works.

So, after I figured this out, finally, my question boils down to:
How do I tell KDM to do two screen mode changes on startup? One via Strg+Alt and one via xrandr?

I suppose Xsession or something like that would be the place therefore.

And ... how do I "script" Strg+Alt mode changes? I suppose "xte" should be able to do this. Is there any way to tell X directly to do so?

Well ... I will continue to dig into this ...

Btw, having a 1920x1080 monitor and MetaMode defined, but letting e.g. 800x600 be the first MetaMode gives you a very enlarged desktop with very intuitive scrolling. This is much more intuitive than any "screen loupe" application, I've seen so far, and looks perfectly suited for visually impaired persons.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't install NVIDIA proprietary driver in Slackware 13.1 bonixavier Linux - Hardware 16 10-09-2010 08:45 PM
Nvidia, Arch Driver vs proprietary... Alexvader Arch 4 08-13-2010 09:39 AM
Has anyone tried the proprietary driver with an Nvidia gt310m? damgar Linux - Hardware 1 04-18-2010 04:05 AM
[SOLVED] Is anyone succesfully running 2.6.32 with the proprietary NVIDIA driver? damgar Slackware 16 12-19-2009 01:58 PM
does the vesa console framebuffer driver conflict with the proprietary nvidia driver? mr.v. Linux - Hardware 2 01-28-2007 07:51 AM

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration