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

Kwin 4.4 multi-monitor breakage (regression)

Tags: None
(comma "," separated)
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
Hi there,

occasionally I hook up my laptop computer to my TV via HDMI to watch movies on the "big screen" which used to work nicely before 4.4.

Now, kwin shows some strange behavior in multi-monitor mode. I'm running nvidia-drivers version 195.30 and use TwinView for multi-monitor mode.

I cannot maximize windows on the TV. Previously I would drag the mplayer window to the TV-screen and press 'F' to put it into full-screen mode. Now, when I press 'F' it gets maximized on the laptop's internal monitor no matter where the window is and I haven't found a way to move the full-screen window to the TV. It's really annoying because this was working smoothly before!
The only way I can watch video on the TV now, is by disabling the internal monitor of the laptop (i.e. using the TV in single-head mode).

Also, kwin now places new windows below the panel when in multi-monitor mode. Again, this was not a problem before 4.4.

Lastly (not really a kwin problem, I guess) my desktop is not extended onto the second monitor. All I get is a completely black background. Currently not a problem for me (all I want is to use mplayer on the TV) but still not the correct behavior, I think.

Any ideas what's wrong here?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you can reproduce under a new user, please report this at bugs.kde.org.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
I tried with a new user account and have the same problem.

I also tried modifying the settings under Display -> Multiple Monitors, but to no avail. When I disable "multiple monitor full-screen support" the window maximizes across both monitors. Once I enable the option I get full-screen only on monitor 1.

The setting for "show unmanaged windows on: ..." apparently has no effect in this matter.

I doubt I'm the only one using a multi-monitor setup, so is there by chance anyone who does not have this problem with 4.4 or has found a fix for this?

Maybe it's not a bug and I just have to modify my settings somewhere.
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
Ok, after doing some more experimentation I observed some really strange behavior. Here is a summary of what I did:

I'm running nvidia drivers version 195.30 and I set up multi monitor mode using the nvidia-settings configuration utility.

There are two monitors:

LCD: internal LCD of the laptop computer running at 1280x800 pixels.
TV: external TV connected via HDMI running at 1920x1080 pixels.

1. I set the two monitors to TwinView mode using LCD as primary monitor and setting TV as "Right Of" LCD.

With this setup I can observe the following behavior:

- the plasma desktop is not extended onto TV. All I get is a black background - no wallpaper, no panels
- I can freely drag windows from LCD to TV but I cannot maximize or show full-screen windows on TV. When I drag a window to TV and click maximize it is put back on LCD
- kwin screws up placement of new windows, occasionally putting them below the plasma panel

2. I set the two monitors to TwinView mode using TV as primary monitor but still setting TV as "RightOf" LCD.

At first, it shows exactly the same behavior as in 1. That is, black screen on the TV and strange issues with window management.

But (and this is very interesting) now I open System Settings and click on the "Display" icon. As soon as the Display settings open, the screen flickers for a moment and suddenly everything works.

- my main desktop is moved to TV (since it's the primary monitor)
- I get an empty plasma-desktop with wallpaper on LCD (and could add panels etc.)
- windows correctly maximize and show full-screen (depending on which monitor they are on)
- there are no more issues with window placement


It may sound crazy but it only works when I set the external TV as primary monitor and open the Display settings module once.

I need some advice in order to report this as a BUG, please. I'm not sure if it might be better to make two separate bug reports:

- multi monitor setup does not work with internal LCD as primary screen (maybe because the resolution of the primary monitor is smaller than the secondary?)

- multi monitor settings are not correctly applied until I open the Display settings module, probably forcing some settings to reload

Since I'm really confused by this problem myself I could need some help making a clear bug report.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Running the application "KRandRTray" will cause the Display module settings to be applied on startup.

The case of the Laptop screen being primary causing issues for the TV display is certainly a bug in Plasma or KWin, and is likely caused by the numbering of displays or their resolution.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
karthikp
Registered Member
Posts
109
Karma
0
OS
I can confirm almost every single one of Vortex375's observations. Sadly, I have no solution either, but would like to CC myself on the bug report if one's filed.

Background:
Similar to Vortex375, I have a desktop with an nvidia card, using nvidia binary drivers. I have a second display (a projector) that I use occassionally to watch movies. My xorg is barebones, just enables the primary display (my desktop monitor). I use nvidia-settings to enable/disable the second display after I've logged in.

Settings:
Hardware - nvidia 9800 GT card, with nvidia 190.53 drivers. Two monitors, one at 1680 x 1050 and one (projector) at 1280 x 720.

My xorg.conf is really barebones. There are almost no special settings and if this doesn't work, it points strongly to a bug somewhere. Now, this worked quite well with 4.3.5 and stopped working with 4.4.0. I tried a bunch of things, but none of them worked. Since I had the root hard disk die on me a couple of weeks back, I had to do a clean install. This eliminates any possibility that there were some obscure settings in the previous installation that were causing this problem. This problem can be reproduced in a new install, with a new user. Because of all this, I believe that the bug originates in KDE. For reference, my xorg.conf is presented at the end in its entirety. As you can see, it's really simplistic.

Procedure:
When logged in, start nvidia-settings from Kickoff > Settings > nVidia X Server Settings. Go to X Server Display Configuration, select disabled second display, click configure. Choose Twinview, click OK. Apply.

Observations:
* second display initializes without a background (activity?).
* No right click possible on second display.
* Any window can be dragged to, but will not maximize on the second display.
* I don't particularly see new windows opened under the panel, but it could be because my panel is on top. Windows can be dragged under the panel even when the setting ("windows can go below") is not toggled for the panel.
* If the second display is marked as the primary X screen in nvidia-settings, AND I open System Settings > Display, I can confirm that everything works (See expected behavior), just like Vortex375 reports.

Expected Behavior
Upon activating the second display, another activity used to get added. This new activity can be seen if you use the cashew and select zoom out. This activity will be sized according to the resolution of the displays. Larger resolution displays will show a larger sized activity etc. Windows can be taken to the second display and maximized there. If Yakuake is told to open on the current screen, it will open on the second display if the mouse cursor is there. In short, everything works (TM).

Reference:
Here's my xorg.conf:

Code: Select all
Section "ServerLayout"
  Identifier  "MyComputer"
  Screen  0   "MyScreen"  0 0
EndSection

Section "Files"
  ModulePath  "/usr/lib/xorg/modules"
EndSection

Section "Monitor"
  Identifier  "MyMonitor"
EndSection

Section "Device"
  Identifier  "MyVideoCard"
  Driver      "nvidia"
#  Driver      "nouveau"
EndSection

Section "Screen"
  Identifier  "MyScreen"
  Device      "MyVideoCard"
  Monitor     "MyMonitor"
  SubSection  "Display"
    Depth     24
  EndSubSection
EndSection

Section "Extensions"
  Option      "Composite" "true"
EndSection


If you need any more details, I'd be happy to provide them for you. Thanks.

P.S. The nouveau line is commented out in my xorg.conf because I can't seem to get nouveau to see my screen. It fails to start the kdm greeter screen.
User avatar
TheBlackCat
Registered Member
Posts
2945
Karma
8
OS
Your xorg.conf is far from bare-bones. I would also suggest updating to nvidia driver version 195.36.15, which is the current stable driver version, then try this xorg.conf and see if it fixes things (yes, this is the entire xorg.conf file):

Code: Select all
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option         "DynamicTwinView" "True"
    Option         "TwinView" "True"
EndSection



Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965
karthikp
Registered Member
Posts
109
Karma
0
OS
Holy ****, you are awesome, TheBlackCat! I shall sings songs of your glory for a little while. :)

So, I went and did some reading here: http://us.download.nvidia.com/XFree86/L ... dix-g.html

Turns out that DynamicTwinView is turned on by default. I verified that you can safely comment it out and have the exact same behavior.

I also learnt that you need an identifier even if it's the only section in the xorg.conf.

Further, for my specific problem, I wanted to define some metamodes. I want to start up with only my primary display active and then have the option of turning on my second display. The metamode for that should look like this:
Code: Select all
Option          "MetaModes"  "nvidia-auto-select; nvidia-auto-select,nvidia-auto-select"

This, unfortunately doesn't work - it seems like the second display *has* to be turned on at login. So, the metamode that works is as follows:
Code: Select all
Option           "MetaModes"  "nvidia-auto-select,nvidia-auto-select; nvidia-auto-select"

So, when you start X, you have two monitors, you login and you can turn one of them off. Krandrtray is going to sit in my systray from now on. It's not a perfect solution, but it works.

The xorg.conf file now looks like this.

Code: Select all
Section  "Device"
    Identifier  "MyVideoCard"
    Driver      "nvidia"
    Option      "TwinView"     "True"
    Option      "MetaModes"    "nvidia-auto-select,nvidia-auto-select; nvidia-auto-select"
EndSection


Again, it's not a perfect solution. It would be nice if the first metamode would just start the primary display, but I guess I can live with that. This solution only works if the second display is connected and detected when X starts (so I just used nvidia-auto-select, instead of actually having to specify resolutions). If the second display is not detectable at X startup, I can't think of a working solution other than logging out and logging back in (restarting X in the process...).

Thanks for all the help. I should add this to the userbase sometime...
karthikp
Registered Member
Posts
109
Karma
0
OS
My install is sync'd with the arch extra repo and they haven't upgraded to 195.36.15 yet. That's why I have the 190.53 drivers.

Arch package log: http://repos.archlinux.org/wsvn/package ... g&isdir=1&
Pertinent link (for others):
http://www.nvnews.net/vbulletin/announcement.php?f=14
Si_NZ
Registered Member
Posts
15
Karma
0
OS
I find multi-head setup quite troublesome in linux, especially with nVidia+TwinView, but AMD and Intel aren't much better. This is 2010 and we still don't even have monitor hotplug support, I find it rather sad.

On Windows 7 (I think Vista can do it too), whenever an external monitor is plugged in, depending on whether this is the first time this particular monitor has been plugged in, it may do one of the follow:
1) Ask the user how they want to set the monitors.
2) A previously configured monitor has been detected and automatically switch to the previous configuration used immediately.
When you unplug the external monitor, it would then automatically switch back to single monitor setup.

Linux in the contrary, requires manual setup every time an external monitor is plugged in or unplugged. This is especially inconvenient when the external monitor is set as the primary display. Too many times I was in a hurry and having to quickly unplug all cables and grab the laptop and go, I had to blindly open nvidia-settings and move it to the laptop display, only then can I set it back to single display setup.

To make matter worse, KDE is quite unreliable when it comes to multi-head as well. Sometimes (actually, it's almost every time for me) one of the screen would get a blank background, no wallpaper that is. If I logout and login again, only then will both screens display the wallpaper. In KDE SC 4.3.x it's almost always my laptop screen that doesn't display the wallpaper, but since KDE SC 4.4.x it's my external monitor. Also, the panel doesn't maximize to fill the width of the screen if the previous login was connected to a smaller screen/resolution.

I don't know whether it's X and/or KDE and/or nVidia to blame, I just hope this situation gets better soon. For the time being, I'll just have to restart X every time I need to plug/unplug a monitor.
karthikp
Registered Member
Posts
109
Karma
0
OS
(Long reply follows)

Incidentally, I've been playing with nouveau on my laptop of late. It's rather old - a Dell Inspiron 9300 with a 6800 card - but plenty usable. I had nvidia's binary drivers running on this card, but now, I wanted to see if nouveau is usable enough to switch over to it. Lots of observations, but I'll just talk about how multiple monitors work.

Using nvidia, the new display dance involves nvidia-settings, causes a blank screen... you already know the rest of the story.

Using nouveau, things work differently. First, if you go into systemsettings > Display, it identifies all the connectors my video card has. By contrast, nvidia would just show one display (DFP-1). nouveau shows an LVDS-1 (laptop video display?), a VGA-1 (VGA connector), a DVI-D-1 (the DVI connector) and a TV-1 (I assume this is the S-video connector).

Now, connecting a monitor to one of these (sometimes) opens a dialog from kded saying something like a new monitor output has been connected, would you like to run a configuration tool to adjust the monitor set up? (Saying yes basically opens another Display kcm - facepalm!).

If you answered yes to the dialog, or reopened the Display kcm, you'll see a disabled display show up on one of the above connectors. Set the size to (Auto), set the relative position - oddly, it picks "Above" as the default for me - and click apply. Some flickering, and yay! things just work. If you have a second activity, it'll automatically be applied to the new display, else, a new default activity is created for the new display. When you disable the display and reenable it, it seems to remember the activity associated with the display.

There are a number of bugs/facepalm inducing behavior, though.

1) Neither the Display kcm, nor krandrtray picks up changes automatically. That sucks. From the terminal xrandr -q knows immediately when you yank out a connector or plug in one, but the Display kcm and krandrtray act oblivious - including allowing me to configure a display that's not even connected anymore. You *have* to reopen the Display kcm to see the changes.

2) With some displays, KDE switches the primary activity over to the new display. This happens with my projector, but not with my LCD monitor. :? This is a bit irritating because all of a sudden, your panel is gone to the second display!

So, here are my conclusions:

1) nvidia's binary drivers do indeed suck in this department. Being closed sourced, there's not much hope that they would do anything to fix these issues.

2) nouveau seems to work much better here. xrandr output indicates that it supports monitor hotplugging.

The bugs are entirely with KDE now - The display KCM and krandr should magically update the list of connected displays when the set up changes. Associating activities with displays should be simple. It would be fantastic if KDE *optionally* remembered and restored previous configurations on the fly as well.

It all seems very doable (I'm no programmer, but it feels like it shouldn't take a monumental amount of effort to make this work). The basic bits already seem to be in place. Of course, all this is true only for nouveau (for nvidia cards) and there are more issues to consider before ditching the binary drivers (for instance, rather notably, it doesn't resume from suspend/hibernate...).


karthikp, proud to be a member of KDE forums since 2008.
Image
User avatar
LongLegs
Registered Member
Posts
1
Karma
0
OS
Hi Guys, any news on this one? I didn't find any bug though....so I'm asking :-)

I'm running Kubuntu 10.04(NVidia driver 195.36.15, GeForce 8400M GS) and I can 100% confirm the description of Vortex375.
However I did some experiments attaching another monitor to my VGA output. The behavior is different than working with monitor attached to HDMI. Maximization works without an issue and I can watch some movies on full screen. What I find strange is that the bigger monitor is chosen automatically as the main monitor regardless what I set in nvidia-settings
karthikp
Registered Member
Posts
109
Karma
0
OS
There's little that can be done - nvidia may or may not fix this bug anytime soon.

On a related note, nouveau is coming along swimmingly. When they have opengl support and support for resuming from standby, I'm all set to jump ship...!


karthikp, proud to be a member of KDE forums since 2008.
Image
myle
Registered Member
Posts
5
Karma
0
OS
I have an Intel graphics card and I have not installed any driver (as far as I know, I use debian testing). When I try to use two monitors (my laptop's screen and another one) kdm seems to die and I am force to log in again.

What can I do to have the desired functionality? I would prefer to not install any proprietary driver.

EDIT: I found a bug report about my problem: https://bugs.launchpad.net/ubuntu/+sour ... bug/559039
cova
Registered Member
Posts
4
Karma
0
OS
I can confirm every detail of this report, besides the control panel "workaround"; on my system even if I enter the display section of systems settings nothing changes.
KDE: 4.4.4
Linux/Gentoo
Nvidia drivers: 195.36.24

I'll open a bug in a short time :)


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]