Bug 266407

Summary: Wrong resolution of fullscreen window on 2nd display, which is bigger than 1st display
Product: [Plasma] kwin Reporter: Thomas Kuther <gimpel>
Component: multi-screenAssignee: Will Stephenson <wstephenson>
Status: RESOLVED WORKSFORME    
Severity: normal CC: aseigo, kde.org, kwin-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Thomas Kuther 2011-02-15 22:58:04 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

Hello,

I have following Setup:
- KDE 4.6
- Xorg + Nvidia proprietary drivers
- 1 X-Server with two separate screens, no TwinView, no Xinerama
-- primary screen is 1680x1050 LCD
-- secondary screen is 1920x1080 TV via HDMI


Now I want to run XBMC on the TV, and to avoid mouse/keyboard grabbing one has to use windowed mode, and put it to fullscreen via the window manager using wmctrl for example.

What happens is that the window get fullscreen'ed in the primary display's resolution in upper left corner of the TV.

I think it's a plasma bug, because:
- it works in Gnome using compiz and metacity
- replacing kwin with compiz does not help (so it isn't kwin I guess)



Reproducible: Didn't try

Steps to Reproduce:
1. attach 2 displays with different resolutions
2. configure X with 2 separate screens, single server mode
3. DISPLAY=:0.1 xbmc &
4. DISPLAY=:0.1 wmctrl -x -r XBMC Media Center.XBMC Media Center -b toggle,fullscreen

Actual Results:  
└» DISPLAY=:0.1 wmctrl -l -G
0x01e0001d -1 0    0    1920 1080 sirius plasma-desktop
0x0160000f  0 0    0    1680 1050    N/A XBMC Media Center

Expected Results:  
└» DISPLAY=:0.1 wmctrl -l -G
0x01e0001d -1 0    0    1920 1080 sirius plasma-desktop
0x0160000f  0 0    0    1920 1080    N/A XBMC Media Center
Comment 1 Aaron J. Seigo 2011-02-15 23:15:19 UTC
plasma-desktop does not touch window management. if it isn't kwin that's interfering (as you note, you tried with compiz as well) then it isn't something in kwin either. most likely suspect: wmctrl.

i'll pass this on to kwin, in any case, to see if they wish to do anything in particular with this report.
Comment 2 Thomas Kuther 2011-02-16 12:50:53 UTC
Thanks Aaron! Well right, plasma shows up as own "window", and it has the correct resolution.

wmctrl is not the issue, because the same thing happens when using kwin's window menu -> advanced -> fullscreen.

More things I tried:
* other applications like smplayer, firefox etc - same effect
* new user account on same machine - same effect
* completely different box, Fedora 14 with a 17" and a 19" display attached - same effect

"Native" fullscreen windows work fine, just this "windowed fullscreen" mode does not.
Comment 3 Thomas Lübking 2011-02-16 15:22:02 UTC
to bisect things, open konsole:
a) check "xrandr -q" - does it print the correct resolutions at all?
--> does the output of "kcmshell4 randr" match this?
b) shutdown plasma "kquitapp plasma-desktop" (-> desktop gone, "plasma-desktop" will restart it)
--> does the problem remain?
c)  does XBMC correctly maximize? (NOT fullscreen)

Since kwin gets all relevant screenlayout from kephal, assigning to kephal maintainer :-)
Comment 4 Thomas Kuther 2011-02-16 18:42:40 UTC
Here go the answers:

a) looks good

$ DISPLAY=:0.1 xrandr -q
xrandr: Failed to get size of gamma for output default
Screen 1: minimum 320 x 175, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm

"kcmshell randr" on the TV shows correct values.

b) I'm somewhat unable to achieve this on DISPLAY=:0.1
- opening terminal on :0.1 and running kquitapp shuts down plasma-desktop on :0.0
- DISPLAY=:0.1 kquitapp plasma-desktop - dito
- kquitapp --display :0.1 plasma-desktop - dito

On :0.1 it just keeps running. Any hints?

c) maximize works correctly for XBMC and others
Comment 5 Thomas Lübking 2011-02-16 20:40:07 UTC
b) sorry, i forgot that you use two screens and dbus cannot handle screens or servers ...
you'll have to identify the plasma process on that screen and kill it by hand.

it's however pretty weird that maximizing works - as a workaround, you can force fullscreen mode and fixed geometry for the client in "kcmshell4 kwinrules", but one should figure why apparently the fullscreen screen is the wrong screen...
Comment 6 Thomas Kuther 2011-02-16 22:15:13 UTC
Thanks for the workaround, Thomas.

Forced fixed geometry, position 0,0 and borderless works. Forced fullscreen via kwinrules suffers the same issue even if geometry is forced too.

So it's really just the fullscreen mode that seems to get it's info from the wrong screen.
Comment 7 Martin Flöser 2011-03-25 23:52:19 UTC
does this only affect xmbc or any fullscreenable app? Just to rule out that XMBC is stupid (which is not unlikely).
Comment 8 Thomas Kuther 2011-03-26 10:56:42 UTC
It's not only XBMC. Also SMplayer, Firefox, or mplayer -fs from konsole behave the same way.
Comment 9 Martin Flöser 2011-03-26 11:01:27 UTC
> It's not only XBMC. Also SMplayer, Firefox, or mplayer -fs from konsole behave
> the same way.
What about applications which are known to behave correctly? E.g. anything from KDE. You can 
set each application to fullscreen through the alt+f3 menu
Comment 10 Martin Flöser 2011-05-22 11:05:15 UTC
do I understand correctly that you are using multi-head (one XScreen per display)?

In that case there are improvements in 4.7, but in general I would recommend to not use multi-head as it is hardly supported by us.
Comment 11 Thomas Kuther 2011-06-08 20:44:11 UTC
Sorry for late response.

Re #9: it also affects KDE SC apps, like konsole or dolphin

Re #10: it's standard Xorg multi-head, yes. No Xinerama, no TwinView.

The "workaround" works just fine, but I'll test fullscreen mode with KDE 4.7 when it's out.
Comment 12 Thomas Lübking 2013-03-24 00:08:51 UTC
"ping" - it's been a while ;-)
Most notably, kephal has been replaced by QDesktopWidget, so what's the current situation about the bug?
Comment 13 Andrew Crouthamel 2018-11-10 03:20:28 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Andrew Crouthamel 2018-11-20 04:06:38 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 15 kde.org 2021-11-07 00:43:01 UTC
This issue report is quite old. Can you please confirm, that it still persists with Plasma 5.23?
Comment 16 Bug Janitor Service 2021-11-22 04:38:25 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 17 Bug Janitor Service 2021-12-07 04:36:05 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!