! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Test Day 2009-09-24 F12_Snap3_XFCE_LiveCD.iso mishandles multiuple monitors
Status:
RESOLVED: FIXED

Comments

Description Bob Lightfoot 2009-09-27 20:09:01 CEST
XFCE Test Day using F12_Snap3_XFCE_LiveCD from 2GB USB Stick 

Testing on Inspiron Dell B120 with Intel 915/910 mobile Video Controller.

XFWM4 did not detect that the second monitor {VGA} had been unplugged still could open apps on the non existent monitor.
Comment 1 Kevin Fenzi 2009-09-27 20:18:19 CEST
To expand on this, this was the Fedora test day live image. ;) 

A two monitor setup working fine with windows on both. 
One monitor is disconnected. 

Windows are still on the disconnected monitor and it still opens new ones there. 

There should be some way to detect when a monitor is removed, and have all the windows mapped on it remap on the remaining display. Also, new windows shouldn't map on the no longer existing display.
Comment 2 Olivier Fourdan editbugs 2009-09-28 08:13:40 CEST
xfwm4 relies on gtk events to add or remove monitors. Can you provide the output of "xrandr -q" before and after?

Also can you please provide the output of "xfwm4 --version" that shows what version of gtk it's built against, and what version it is using?
Comment 3 Olivier Fourdan editbugs 2009-09-28 08:15:25 CEST
...also, does invoking "xrandr --auto" make any change?
Comment 4 Bob Lightfoot 2009-09-28 22:54:08 CEST
Responding to requests for information
*****  uname -a output  *****
Linux D8MNKD81.LADODOMAIN 2.6.31.1-48.fc12.i686 #1 SMP Fri Sep 25 17:13:30 EDT 2009 i686 i686 i386 GNU/Linux

*****  xfwm4 --version output  *****
	This is xfwm4 version 4.6.1 (revision 29817) for Xfce 4.6.1
	Released under the terms of the GNU General Public License.
	Compiled against GTK+-2.17.11, using GTK+-2.18.0.

	Build configuration and supported features:
	- Startup notification support:                 Yes
	- XSync support:                                Yes
	- Render support:                               Yes
	- Xrandr support:                               Yes
	- Embedded compositor:                          Yes
	- KDE systray proxy (deprecated):               No

*****  xrandr -q output with only 1 screen connected at boot *****
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
   1280x800       59.9*+
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
TV1 unknown connection (normal left inverted right x axis y axis)
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  

***** NOTE - 2nd screen is not detected when connected  *****
Rebooting Test System with two screens connected for next Info Post
Comment 5 Bob Lightfoot 2009-09-28 23:14:08 CEST
Responding to requests for information
*****  xrandr -q output with 2 screen connected at boot *****
Screen 0: minimum 320 x 200, current 2304 x 800, maximum 4096 x 4096
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
   1280x800       59.9*+
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 connected 1024x768+1280+0 (normal left inverted right x axis y axis) 300mm x 225mm
   1024x768       75.0*+   85.0     75.1  
   1280  x1024      60.0  
   800x600        85.1     75.0  
   640x480        85.0     75.0     60.0  
   720x400        70.1  
TV1 unknown connection (normal left inverted right x axis y axis)
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  

*****  xrandr -q output with 2 screen connected at boot and screen 2 disconnected  after boot*****
Screen 0: minimum 320 x 200, current 2304 x 800, maximum 4096 x 4096
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm
   1280x800       59.9*+
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected 1024x768+1280+0 (normal left inverted right x axis y axis) 300mm x 225mm
TV1 unknown connection (normal left inverted right x axis y axis)
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  
  1024x768 (0x4a)   78.8MHz
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock   60.0KHz
        v: height  768 start  769 end  772 total  800           clock   75.0Hz

Please note that running xrandr -q changes the behavior somewhat testing --auto next
Comment 6 Bob Lightfoot 2009-09-28 23:25:32 CEST
***** xrandr --auto results *****
In one Monitor boot it detects the 2nd monitor, but clones items from monitor 1 does not give a true two monitors.
Comment 7 Bob Lightfoot 2009-09-29 02:40:30 CEST
lspci responds with following information

00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
Comment 8 Olivier Fourdan editbugs 2009-09-29 07:18:18 CEST
What you describe here looks like a Xorg/xrandr issue more than a window manager problem.

The window manager relies on gtk signal "monitors-changed" which in turn depends on xrandr events.

xfwm4 has been handling "monitors-changed" nicely since 4.6 and that works fine (I use such a setup myself). So I suspect this is not a problem with xfwm4 but rather an issue with xrandr not reporting the event when the VGA is unplugged.

Do you know if the driver is capable of detecting the unplug on VGA on your hardware (I am not sure the i915 can report that without polling, and I am pretty sure there is no polling).

You could either add some traces in xfwm4 source code to show if the "monitors-changed" signal is emitted/received or I could prepare a test program that would listen for "monitors-changed" so simulate what xfwm4 do.
Comment 9 Olivier Fourdan editbugs 2009-09-29 08:07:39 CEST
Created attachment 2552 
Monitoring monotors changed signals

Attaching a test program that display the current display/screen/monitor setup and then listen for monitors-changed signal and displays new setup whenever it's reported to have changed.

MAke sure you have the package gtk2-devel installed and build with:

  $ gcc -o enum-displays enum-displays.c `pkg-config gtk+-2.0 gdk-2.0 --cflags --libs`

Then run the binary:

  $ ./enum-displays

And try to unplug the VGA monitor and plug it back.

This confirms what I was suspecting, I get no "automatic" notification when unplugging the VGA monitor so it's perfectly normal that xfwm4 does not update the layout automatically (simply because it's not notified).

Changing the layout with "xrandr" does trigger the notification however and xfwm4 adjust the layout and reposition windows accordingly.

Therefore I see no bug in xfwm4 here.
Comment 10 Bob Lightfoot 2009-09-30 04:06:20 CEST
Being a first time tester on XFCE Test Day - I reported this "bug" as asked by the team.  I will concur that performance of xwmf4 is in line with the change of state reported or not reported to it by xrandr as you so helpfully explained.  

The help and testing of this "bug" made me re-examine the operation of my system with dual monitors under XP and F12.

I still have one issue which may not be an xfwm4 issue specifically, but is an overall system issue when using dual monitors.  I'll describe it as best I can so perhaps we can determine if and how best to report and address.

Step 1 - Boot Machine with dual monitors connected,

Step 2 - Open a terminal center screen on Window 1 and cd /boot.

Step 3 - Open a terminal center screen on Window 2 and cd /etc.

Step 4 - Take note that in the panel for Workspace 1 both terminal windows are side by side.

Step 5 - Disconnect Monitor 2 and notify xfwm4 {xrandr--auto or my favorite the LCD/CRT key on my laptop}

Step 6 - Take note that the terminal windows are still side by side on the panel but only one terminal shows on Workspace 1 of Window 1.  The second Terminal has been "stranded" in memory.  The terminal instance of Window 2 can be issued a move command and brought to the visible working space of Window 1.  This is a "hassle" and not optimum behavior.  

I cannot determine if it rises to the level of bug, but was worth reporting and the initial issue in creating this bug.
Comment 11 Olivier Fourdan editbugs 2009-09-30 09:19:00 CEST
(In reply to comment #10)
> [...]
> I cannot determine if it rises to the level of bug, but was worth reporting and
> the initial issue in creating this bug.

This is the reason why I provided a test program for you to test....

What is the output of the test program provided in your above test scenario?
Comment 12 Bob Lightfoot 2009-09-30 23:07:47 CEST
Attempted test tonight :
1.  #yum update 
    Added 2 packages and updated 63 including a new kernel
2.  #yum install gtk2-devel
    Added 35 packages at first install now confirms as following:
    Package gtk2-devel-2.18.0-5.fc12.i686 already installed and latest version
3.  #yum install gcc
    added 13 packages at first install not confirms as following:
    Package gcc-4.4.1-17.i686 already installed and latest version
4.  Copied Plain Text of your Test Program into enum-displays.c using nano
     - attaching my copy for your validation
5.  Issued Command gcc -o enum-displays enum-display.c 'pkg-config gtk+-2.0 --cflags --libs' at non root prompt and received following compiler output:
gcc: pkg-config gtk+-2.0 --cflags --libs: No such file or directory
enum-displays.c:5:21: error: gdk/gdk.h: No such file or directory
enum-displays.c:6:21: error: gtk/gtk.h: No such file or directory
enum-displays.c:9: error: expected ‘)’ before ‘*’ token
enum-displays.c:45: error: expected ‘)’ before ‘*’ token
enum-displays.c: In function ‘main’:
enum-displays.c:61: error: ‘gint’ undeclared (first use in this function)
enum-displays.c:61: error: (Each undeclared identifier is reported only once
enum-displays.c:61: error: for each function it appears in.)
enum-displays.c:61: error: expected ‘;’ before ‘i’
enum-displays.c:62: error: ‘GdkDisplay’ undeclared (first use in this function)
enum-displays.c:62: error: ‘gdpy’ undeclared (first use in this function)
enum-displays.c:63: error: ‘GdkScreen’ undeclared (first use in this function)
enum-displays.c:63: error: ‘gscreen’ undeclared (first use in this function)
enum-displays.c:69: error: ‘gtk_major_version’ undeclared (first use in this function)
enum-displays.c:70: error: ‘gtk_minor_version’ undeclared (first use in this function)
enum-displays.c:74: error: ‘nscreens’ undeclared (first use in this function)
enum-displays.c:75: error: ‘i’ undeclared (first use in this function)
enum-displays.c:79: error: ‘monitors_changed_cb’ undeclared (first use in this function)
enum-displays.c:79: error: ‘gpointer’ undeclared (first use in this function)
enum-displays.c:79: error: expected ‘)’ before ‘gdpy’

Will try and resolve compiler error messages but appreciate feedback.
Comment 13 Bob Lightfoot 2009-09-30 23:08:38 CEST
Created attachment 2555 
BobLfoot's enumdisplays.c version 001
Comment 14 Bob Lightfoot 2009-09-30 23:26:41 CEST
(In reply to comment #13)
> Created an attachment (id=2555) [details]
> BobLfoot's enumdisplays.c version 001

Online chat with other fedora users.

Caught that missed gdk-2.0 in initial command.

This resulted in a change of first error message but still no successful compile.
Comment 15 Bob Lightfoot 2009-09-30 23:48:32 CEST
(In reply to comment #14)
> (In reply to comment #13)
> > Created an attachment (id=2555) [details] [details]
> > BobLfoot's enumdisplays.c version 001
> 
> Online chat with other fedora users.
> 
> Caught that missed gdk-2.0 in initial command.
> 
> This resulted in a change of first error message but still no successful
> compile.

Newbie mistake used quote ' not the ` from the ~ key.  With proper character ` command compiles and test proceeds.
Comment 16 Bob Lightfoot 2009-10-01 00:01:19 CEST
Created attachment 2556 
Test Program enum-displays output from first run
Comment 17 Bob Lightfoot 2009-10-01 00:03:48 CEST
Results of the test program are in attachment output001.

Note no screen change seen until Fn-LCD key was pressed.

The 2304x800 with 2 monitors was from initial bootup with both connected.

The 2304x800 with 1 monitor was after the CRT was unplugged and the Fn-LCD key
pressed {I theorize this triggers xrandr --auto}

The 1280x800 with 2 monitors is from when the CRT was plugged back in and the
Fn-LCD key pressed.

Anything on the "old 1024x768 monitor" was lost.
Comment 18 Olivier Fourdan editbugs 2009-10-01 07:59:53 CEST
(In reply to comment #17)
> Results of the test program are in attachment output001.

Thanks for the test.

> Note no screen change seen until Fn-LCD key was pressed.
> 
> The 2304x800 with 2 monitors was from initial bootup with both connected.
> 
> The 2304x800 with 1 monitor was after the CRT was unplugged and the Fn-LCD key
> pressed {I theorize this triggers xrandr --auto}

That definitely does not seem normal to me, the size reported should be 1280x800 and not 2304x800 (as there is only 1 monitor left of size 1280x800)
 
> The 1280x800 with 2 monitors is from when the CRT was plugged back in and the
> Fn-LCD key pressed.
> 
> Anything on the "old 1024x768 monitor" was lost.

There's something I failed to ask, but does that happen on F11 or just on F12 alpha?
Comment 19 Bob Lightfoot 2009-10-03 14:07:21 CEST
(In reply to comment #18)
> There's something I failed to ask, but does that happen on F11 or just on F12
> alpha?

I don't have an F11_XFCE_Live to test with and the torrent wants 6 days to download.

Do have an F11_KDE_Live iso I've placed on USB and am testing with that.  Also dowloading the XFCE group to the KDE Live USB and hopefully can test from that platform.

May be a day or three before I have test results to post.
Comment 20 Olivier Fourdan editbugs 2009-10-04 08:52:04 CEST
(In reply to comment #19)
> [...]
> May be a day or three before I have test results to post.

No worries, take you time.
Thanks for your help.
Comment 21 Bob Lightfoot 2009-10-09 22:19:14 CEST
(In reply to comment #20)
> (In reply to comment #19)
> > [...]
> > May be a day or three before I have test results to post.
> 
> No worries, take you time.
> Thanks for your help.

Test results from KDE and F11 are what we'd expect.  Haven't been able to get the XFCE F11 ISO to boot on usb, may burn a cd later.

Also after suspend of XFCE F12 the screen behaves more like f11 until boot.
Comment 22 Bob Lightfoot 2009-10-09 22:21:16 CEST
Created attachment 2593 
F11 KDE test on same box
Comment 23 Olivier Fourdan editbugs 2009-10-10 15:53:20 CEST
(In reply to comment #22)
> Created an attachment (id=2593) [details]
> F11 KDE test on same box

I do not understand, that log shows nothing. Seems you ran the program 3 times and none of the logs show any signal received.

Anyway, I did try the following test on F11 on a laptop with an Intel card and a 19020x1200 connected monitor via VGA.

1) Boot with monitor connected
   The same image shows on both monitors
2) Expand the display to the VGA monitor with xrandr
   xrandr --output VGA1 --mode 1920x1200 --output LVDS1 --mode 1024x768 --left-of VGA1
3) Place a terminal on the expanded area
4) Disconnect the monitor, and run xrandr --auto

The Terminal is moved so that it shows on the remaining area (Not in its entirety, just the minimum visible - Admittedly, this is not optimal and the window should be made entirely visible) - But beside this it works as expected.

It's worth noting that the disconnection is not automatically detected by X until "xrandr" is run (at least on F11 dunno about F12) - I tried in GNOME and it's the same.
Comment 24 Olivier Fourdan editbugs 2009-10-10 18:57:56 CEST
Just committed a change in git HEAD to make the window entirely visible on screen change.

I'd say it works just as expected. I have not tested F12, but as long as the code of xfwm4 is identical on F12, if it behaves differently on F12 then the regression comes from elsewhere.
Comment 25 Bob Lightfoot 2009-10-10 18:58:44 CEST
Created attachment 2595 
F11 XFCE Test

This is the test using F11 Live XFCE CD
Comment 26 Bob Lightfoot 2009-10-10 18:59:30 CEST
Created attachment 2596 
F12 XFCE Test

This is similiar to F11 Test using F12 XFCE
Comment 27 Bob Lightfoot 2009-10-10 19:02:21 CEST
Comparing F11 vs F12 comments :
F11 bootup as same on both monitors matches WinXP initial behavior.

F12 Bootup with stretched display across two monitors is nice, but "stranding" when second monitor is removed is nuisance.

My Conclusion --
Users will need to understand and use xrandr config statements to make dual monitors work.  Auto setup may not be optimal. But no bug/fault exists in F12 XFCE.
Comment 28 Olivier Fourdan editbugs 2009-10-10 20:41:10 CEST
> Screen 0:
>   Name:  :0.0
>   Size: 2304x800
          ^^^^^^^^
>   1 monitor connected:
>     Monitor 0: 1280x800+0+0
                 ^^^^^^^^^^^^

That is not normal, the values reported by xrandr/gdk are not valid.
Comment 29 Bob Lightfoot 2009-10-10 23:08:40 CEST
(In reply to comment #28)
> > Screen 0:
> >   Name:  :0.0
> >   Size: 2304x800
>           ^^^^^^^^
> >   1 monitor connected:
> >     Monitor 0: 1280x800+0+0
>                  ^^^^^^^^^^^^
> 
> That is not normal, the values reported by xrandr/gdk are not valid.

What additional Information do you require to resolve this abnormalcy?  Please advise.
Comment 30 Olivier Fourdan editbugs 2009-10-11 08:16:36 CEST
(In reply to comment #29)
> (In reply to comment #28)

> > That is not normal, the values reported by xrandr/gdk are not valid.
> 
> What additional Information do you require to resolve this abnormalcy?  Please
> advise.

This is from the underlying libraries, this is not a bug in xfwm4, not much I can do about it. I can implement a workaround (by recomputing the actual size based on the different monitors and their layout) but that should not be necessary, if xrandr, Xlib or gdk need fixing.
Comment 31 Kevin Fenzi 2009-10-14 19:05:27 CEST
ok, so this change might likely be related to F12 defaulting to 'right-of' placement in multi monitor setups. 

See: https://www.redhat.com/archives/fedora-devel-list/2009-July/msg01807.html

So, how can we properly handle this case?
Comment 32 Olivier Fourdan editbugs 2009-10-16 09:48:51 CEST
(In reply to comment #31)
> ok, so this change might likely be related to F12 defaulting to 'right-of'
> placement in multi monitor setups. 
> 
> See: https://www.redhat.com/archives/fedora-devel-list/2009-July/msg01807.html
> 
> So, how can we properly handle this case?

Current git HEAD contains a workaround for this (untested) but still, the source problem remains and I see this as a bug:

> Screen 0:
>   Name:  :0.0
>   Size: 2304x800
          ^^^^^^^^
>   1 monitor connected:
>     Monitor 0: 1280x800+0+0
                 ^^^^^^^^^^^^
Unless there is a flaw in my test program and in that case I would like to know about it.

For now, the workaround I implemented in git should be sufficient (but I do not like to implement workarounds for underlying problem, that bites, sooner or later)
Comment 33 Bob Lightfoot 2009-10-17 00:38:49 CEST
(In reply to comment #32)
> 
> For now, the workaround I implemented in git should be sufficient (but I do not
> like to implement workarounds for underlying problem, that bites, sooner or
> later)

I am new to testing, debug and bug reporting so some simple possibly stupid questions.
1.  What git workaround should have fixed the problem?
2.  How to I apply this to my test system?
Comment 34 Olivier Fourdan editbugs 2009-10-17 08:02:16 CEST
(In reply to comment #33)
> I am new to testing, debug and bug reporting so some simple possibly stupid
> questions.
> 1.  What git workaround should have fixed the problem?
> 2.  How to I apply this to my test system?

Well, I think the best is to wait for me to backport the fixes to the stable branch in git, make a release and then wait for Fedora people to pick up the fix.
Comment 35 Christoph Wickert editbugs 2009-10-30 00:22:45 CET
Can you us some details about the commits that are necessary to backport your changes? I'd like to create a test package for Fedora.
Comment 36 Bob Lightfoot 2009-10-30 01:16:33 CET
Recent yum updates to Rawhide have changed the nature, but not the existence of this "bug".  I lack  the time tonight to test and report on the current status for my platform, but will take time this weekend.  

I would however, make the following Alpha Test protocol sequence proposal.

1.  Boot Laptop with no second monitor.
1A. Open Terminal and note or auto capture {modify Oliver's test program} xrandr output
1B. Issue xrandr --auto and note xrandr output.
1C. Plug in 2nd monitor and note xrandr output
1D. Issue xrandr --auto and note xrandr output.
1E. Issue a predetermined xrandr command to give user cloned screens and note observations. {Panel Behavior, Program launch locations, etc}
1F. Issue a predetermined xrandr command to give user desktop spanning screens and note observations.

2.  Boot Laptop with second monitor.
2A. Open Terminal and note or auto capture {modify Oliver's test program} xrandr output
2B. Issue xrandr --auto and note xrandr output.
2C. Issue a predetermined xrandr command to give user cloned screens and note observations. {Panel Behavior, Program launch locations, etc}
2D. Issue a predetermined xrandr command to give user desktop spanning screens and note observations.
2E. Un-Plug in 2nd monitor and note xrandr output
2F. Issue xrandr --auto and note xrandr output.
Comment 37 Kevin Fenzi 2009-12-06 18:30:15 CET
Any news here on the patches?
Comment 38 Olivier Fourdan editbugs 2009-12-07 08:00:53 CET
(In reply to comment #37)
> Any news here on the patches?

It is all in the xfce-4.6 branch in git.
Comment 39 Bob Lightfoot 2009-12-13 22:32:50 CET
Created attachment 2734 
This is a test conducted 2009-12-13 in anticipation of nirik releasing a patch for testing.
Comment 40 Kevin Fenzi 2009-12-14 16:18:55 CET
Bob: try this build: 

http://www.scrye.com/~kevin/fedora/xfwm4-4.6.1-6.fc12.i686.rpm
Comment 41 Bob Lightfoot 2009-12-15 00:53:49 CET
Created attachment 2738 
Test of Patch 4.6.1-6.fc12.i686

Nice Work Kevin - The patch looks good on my humble antique.
Comment 42 Simon Steinbeiss editbugs 2013-11-26 20:07:13 CET
This bug has been fixed.

Bug #5795

Reported by:
Bob Lightfoot
Reported on: 2009-09-27
Last modified on: 2013-11-26

People

Assignee:
Olivier Fourdan
CC List:
3 users

Version

Version:
unspecified

Attachments

Monitoring monotors changed signals (2.34 KB, text/plain)
2009-09-29 08:07 CEST , Olivier Fourdan
no flags
BobLfoot's enumdisplays.c version 001 (2.34 KB, text/plain)
2009-09-30 23:08 CEST , Bob Lightfoot
no flags
Test Program enum-displays output from first run (763 bytes, text/plain)
2009-10-01 00:01 CEST , Bob Lightfoot
no flags
F11 KDE test on same box (737 bytes, text/plain)
2009-10-09 22:21 CEST , Bob Lightfoot
no flags
F11 XFCE Test (1.43 KB, text/plain)
2009-10-10 18:58 CEST , Bob Lightfoot
no flags
F12 XFCE Test (994 bytes, text/plain)
2009-10-10 18:59 CEST , Bob Lightfoot
no flags
This is a test conducted 2009-12-13 in anticipation of nirik releasing a patch for testing. (6.63 KB, text/plain)
2009-12-13 22:32 CET , Bob Lightfoot
no flags
Test of Patch 4.6.1-6.fc12.i686 (7.06 KB, text/plain)
2009-12-15 00:53 CET , Bob Lightfoot
no flags

Additional information