This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE, Nvidia TwinView, Maximizing windows

Tags: None
(comma "," separated)
ahhyes
Registered Member
Posts
6
Karma
0
Hi Guys,

I am running K-Ubuntu 12.10 64 bit. There is an issue I am having thats rather annoying and I have narrowed it down to the window manager (KDE).

I have an NVidia GTX 570, configured in TwinView mode with 2 monitors, which gives me an extended desktop and I can drag windows across the two displays with no problem. The problem I have is that if I maximise a window, it maximises to fill only one monitor (usually, whatever monitor the window happens to be on at the time. I require that maximizing a window be able to fill both screens (because of an application I run which I would like to have fill both screens (X-Plane)).

I've arrived at the conclusion that KDE is at fault (or one of it's components) with a simple test. I stopped kde+x and wrote a short script to run my Application (X-Plane (flight simulator)) and called it from .xinitrc, then issued "startx". My app ran and for the first time, it was able to fill both screens.

It seems that any window I try to maximize under KDE will limit it to one monitor.. No good. How do I change this behaviour? I read somewhere that Xinerama is a solution, however I have also read that Xinerama is long deprecated.

What can I do?
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I assume that you're running a fairly recent version of KDE Plasma Desktop. Try System Settings -> Window Behavior -> KWin Scripts -> enable "Video Wall". If you don't have "KWin Scripts", find the Multiple Monitor module and there should be a setting to let fullscreen windows span both monitors.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
ahhyes
Registered Member
Posts
6
Karma
0
Hans wrote:I assume that you're running a fairly recent version of KDE Plasma Desktop. Try System Settings -> Window Behavior -> KWin Scripts -> enable "Video Wall". If you don't have "KWin Scripts", find the Multiple Monitor module and there should be a setting to let fullscreen windows span both monitors.


Hi There :)

I've enabled Video wall and restarted kde, however this does not seemed to have helped. Regarding the multiple monitor module I think that is not in my version of KDE (running 4.9.5), I dont see a multiple monitors option (some googling reveals that this once was an option under settings, but was removed?)

Edit: it would appear the video wall is only aware of specific applications (vlc, dragon player etc)

Last edited by ahhyes on Sun Apr 21, 2013 5:17 am, edited 1 time in total.
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
ahhyes wrote:I've enabled Video wall and restarted kde, however this does not seemed to have helped. Regarding the multiple monitor module I think that is not in my version of KDE (running 4.9.5), I dont see a multiple monitors option (some googling reveals that this once was an option under settings, but was removed?)


Yes that module was quite out-of-date so it was removed and the options put in other places. I've never wanted the behavior you describe so I don't know how the new video wall script works. I'm pretty sure someone else can help you though (the KWin developers do a great job checking these forums, for example).


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
ahhyes
Registered Member
Posts
6
Karma
0
Hans wrote:
ahhyes wrote:I've enabled Video wall and restarted kde, however this does not seemed to have helped. Regarding the multiple monitor module I think that is not in my version of KDE (running 4.9.5), I dont see a multiple monitors option (some googling reveals that this once was an option under settings, but was removed?)


Yes that module was quite out-of-date so it was removed and the options put in other places. I've never wanted the behavior you describe so I don't know how the new video wall script works. I'm pretty sure someone else can help you though (the KWin developers do a great job checking these forums, for example).


alright :) well, hopefully one of the devs will chime in on this thread :) From the point of running a flight simulator, you could probably see why I would want this behaviour. When the application sends the _NET_WM_STATE_FULLSCREEN hint, it should be allowed to fill both screens.

Edit: I did find a way around this which is rather horrible, that was to enable Xinerama in my xorg.conf + nvidia settings and to disable the compositor module as it was noted that the two running side by side can lead to weird things happening. Surely there is a better way than this approach though.
luebking
Karma
0
> _NET_WM_STATE_FULLSCREEN
Ie. you do *not* want to maximize the window but use it fullscreen ("no titlebar"), this aspect is crucial, please clarify.

In case (and only) you want the window to be fullscreen, the videowall script is indeed the correct approach, but only catches windows of types "vlc, smplayer, dragon, xv, ffplay" - you could edit /usr/share/apps/kwin/scripts/videowall/contents/code/main.js to match the flight simulator class as well (or disable the "isVideoPlayer(client)" call - we don't have config GUI support for scripts in 4.10, sorry.

Next, please disable xinerama.
While i'm not aware of conflicts between Xinerama and Compositing, it's an outdated way to arrange screens and you'll run into its limitations sooner than later.

Finally, please do me a favor: run "xprop" and click the flightsimulator window (you might have to do that from VT1 if the simulator grabs the mouse, in case don't forget to "export DISPLAY=:0" before) and post the output (or send it to kwin 'æt' kde 'døt' org) - there's actually a hint for windows which want to span across all screens in FS mode which I think we lack to support. Thanks.
ahhyes
Registered Member
Posts
6
Karma
0
luebking wrote:> _NET_WM_STATE_FULLSCREEN
Ie. you do *not* want to maximize the window but use it fullscreen ("no titlebar"), this aspect is crucial, please clarify.


According to one of the X-Plane dev's the program uses _NET_WM_STATE_FULLSCREEN to run the application fullscreen, sorry for the confusion. I assumed that the inability to maximize a regular window to fill both screens and this issue may have been the same thing, evidently not, my bad. I have no desire to run the application windowed, I simply want it to fill both screens.

Next, please disable xinerama.


Done.

While i'm not aware of conflicts between Xinerama and Compositing, it's an outdated way to arrange screens and you'll run into its limitations sooner than later.


The NVidia config tool does it automatically (issues the warning and inserts a section into xorg.conf to disable compositing).

Finally, please do me a favor: run "xprop" and click the flightsimulator window (you might have to do that from VT1 if the simulator grabs the mouse, in case don't forget to "export DISPLAY=:0" before) and post the output (or send it to kwin 'æt' kde 'døt' org) - there's actually a hint for windows which want to span across all screens in FS mode which I think we lack to support. Thanks.


Since the output of this was small, I will post it here, if you would like an emailed copy also, please let me know:

Code: Select all
alex@desktop:~$ xprop
_NET_WM_ICON_GEOMETRY(CARDINAL) = 1101, 1168, 247, 34
_NET_WM_DESKTOP(CARDINAL) = 0
_KDE_NET_WM_ACTIVITIES(STRING) = "1c808269-e0cf-4af7-91f7-3c0187ead48d"
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 0, 0
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_FULLSCREEN
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_NAME(UTF8_STRING) = "X-System"
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 38070272
WM_NORMAL_HINTS(WM_SIZE_HINTS):                                                                                                                                                             
                program specified minimum size: 1024 by 768                                                                                                                                 
                window gravity: Center                                                                                                                                                     
WM_CLASS(STRING) = "main_window", "X-Plane"                                                                                                                                                 
WM_NAME(STRING) = "X-System
luebking
Karma
0
It does not seem the window sets _NET_WM_FULLSCREEN_MONITORS, but could also be a misunderstanding on either side about the implications of the NETWM spec (happens more than seldom... - i'm frankly not sure whether the implementation in KWin is correct as meant by the spec)

Adapting the videowall script is the way to go, though - unfortunately "main_window" will be the matching string.
ahhyes
Registered Member
Posts
6
Karma
0
luebking wrote:It does not seem the window sets _NET_WM_FULLSCREEN_MONITORS, but could also be a misunderstanding on either side about the implications of the NETWM spec (happens more than seldom... - i'm frankly not sure whether the implementation in KWin is correct as meant by the spec)

Adapting the videowall script is the way to go, though - unfortunately "main_window" will be the matching string.


Ok, I can give it a go. What change do I make?

Would the following mod work:

Code: Select all
function isVideoPlayer(client) {
    if (client.resourceName == "vlc") {
        return true;
    }
    if (client.resourceName == "smplayer") {
        return true;
    }
    if (client.resourceName == "dragon") {
        return true;
    }
    if (client.resourceName == "xv") { //mplayer
        return true;
    }
    if (client.resourceName == "ffplay") {
        return true;
    }
    if (client.resourceName == "X-Plane") {
        return true;
    }
    return false;
}


I've added the main window name to the end of the function. Or did you mean the name should be "main_window"?
ahhyes
Registered Member
Posts
6
Karma
0
Actually the following seems to have worked:

Code: Select all
if (client.resourceName == "main_window") {
        return true;
    }


Glad I asked here! I would NEVER have gotten to the bottom of the issue. lol.

Thanks!
epertinez
Registered Member
Posts
2
Karma
0
After trying to follow your hints with a three monitors configuration and an nvidia 750ti i found an easier way to solve the problem.
Simply:

a) Calculate your maximum geometry.
b) Open X-Plane without maximizing.
c) Make the window as big as you desire moving its borders with the mouse.
d) Go to top of the window, right click on the title and choose More actions -> Special Arrangement of Application.
e) Choose there your desired geometry. You can set the desired geometry, minimum geometry and remove title bar and frame (my kde is not in english so names of things may not be the same). Set all the parameters you want to "remember".

Once everything done, you can click OK and those parameters should be saved for future starting of the app.

It may not be the best way to do it but it worked for me.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar