Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tinwview, resolution changes, and window placement
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Hyper_Eye
Guru
Guru


Joined: 17 Aug 2003
Posts: 462
Location: Huntsville, AL.

PostPosted: Thu Oct 04, 2012 4:24 pm    Post subject: Tinwview, resolution changes, and window placement Reply with quote

I posted this question on the forums at Phoronix but I have gotten nothing there. I'm hoping I might have better luck here.

I have been using Nvidia's twinview with KDE for a long long time. In that time I have always been frustrated by the effect resolution changes have on my window placement. I place my windows in a particular configuration between my two monitors. When I start a game that uses RandR resolution mode changes the placement of my windows ends up changed. In particular the windows get moved to the left monitor if the game switches to a mode that turns the right monitor off. When I'm done playing I have to reposition all my windows. Sometimes the resolution change will also cause my taskbar size to change from around 80% of the width of one monitor to 100%. I have been getting around this issue by using XVidMode resolution mode switching whenever possible. This involves setting registry options for games that use Wine. I also sometimes use GameTreeLinux/Cedega and it uses XVidMode by default. When it comes to native games the chances seem to be about 50/50 that it will use one or the other. libSDL based games will use XVidMode if built against the last few releases or, in the case of games dynamically linked against libSDL, your system libraries are up-to-date. SDL can also be forced to use XVidMode with an environment variable.

As of the 302.XX Nvidia drivers switching resolutions with XVidMode is resulting in the same issue I have when switching with X/Randr. So my "work-around" is no longer working. At this point I am ready to try something else and I am hoping that someone here knows a better solution. I would like for my windows to either return to their original position or for KDE to totally ignore resolution changes. I don't know if the solution might lie in KDE settings, X settings, or Nvidia settings. Thanks for any ideas you might have.
_________________
Gentoo Gaming Videos
Back to top
View user's profile Send private message
hephooey
n00b
n00b


Joined: 24 Feb 2003
Posts: 74

PostPosted: Thu Oct 04, 2012 5:01 pm    Post subject: Reply with quote

kwin used to ignore the monitor/resolution changes, and that was considered a bug (bug 185103). The problem you want to solve is rather special, I cannot think of a reliable way to detect whether the change is temporary or not. And most of time you do not want the window to stay outside the current screen after the monitor/resolution changes. I guess the best solution will be writing your own kwin script to save and restore the window positions manually, maybe add it to the menu to make it a little bit easier to use.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Oct 04, 2012 8:28 pm    Post subject: Reply with quote

I use metamode to solve that, using metamode you define two mode, one for desktop usage (two monitors), and one for gaming usage (one monitor)
the nvidia driver switch from one to the other when seeing the resolution change query (so when your game load, set the game to that resolution), while your desktop don't see any mode change.
read nvidia metamode explain in the nvidia doc or crawl the forum for sample.
Back to top
View user's profile Send private message
Hyper_Eye
Guru
Guru


Joined: 17 Aug 2003
Posts: 462
Location: Huntsville, AL.

PostPosted: Fri Oct 05, 2012 1:00 am    Post subject: Reply with quote

I use metamodes. Mine looks like this:

Quote:
Option "metamodes" "DFP-0: 1680x1050_60 +0+0, DFP-1: 1280x1024 +1680+0; DFP-0: 1680x1050_60 +0+0, DFP-1: NULL; DFP-0: 1440x900 +0+0, DFP-1: NULL; DFP-0: NULL, DFP-1: 1280x1024_60 +0+0; DFP-0: 1280x800 +0+0, DFP-1: NULL; DFP-0: NULL, DFP-1: 1024x768_60 +0+0; DFP-0: NULL, DFP-1: 800x600_60 +0+0; DFP-0: NULL, DFP-1: 640x480_60 +0+0; DFP-0: NULL, DFP-1: 640x400 +0+0; DFP-0: NULL, DFP-1: 320x200 +0+0"


The first one is my desktop mode: 1680x1050,1280x1024. The second one is my usual gaming mode: 1680x1050,NULL. The problem is that when the resolution automatically changes to the second mode the desktop is getting resized. It has been doing that for Xrandr for as long as I can remember but only with the new Nvidia drivers is it doing that with XVidMode. When this resize occurs that is when my windows and stuff get all messed up. Am I doing something wrong or is there an option I need to enable? Thanks.
_________________
Gentoo Gaming Videos
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum