nvidia proprietary driver, nvidia-settings and how to configure panning
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:
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".
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:
But ... when this are my Metamodes:
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.
|All times are GMT -5. The time now is 12:34 AM.|