! 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 !
xfwm4 repositions windows on lid close/open with latest X/intel drivers
Status:
RESOLVED: LATER

Comments

Description Kevin Fenzi 2010-02-04 23:36:55 CET
With recent Xorg and intel drivers here the behavior on lid close/open has changed somewhat which causes xfwm4 to behave in a non ideal way. ;( 

When the lid is closed, the laptop display is removed, then on lid open readded as the active display. 
However, xfwm4 sees the display change and repositions windows (ie, it moves all my terminals around). 

With lid open: 
[root@ohm ~]# xrandr -display :0.0 -q --current
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 4096 x 4096
LVDS1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1920x1200      60.0*+
   1600x1200      60.0  
   1400x1050      60.0  
   1280x1024      60.0  
   1280x960       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
DVI1 disconnected (normal left inverted right x axis y axis)

(close lid)

[root@ohm ~]# xrandr -display :0.0 -q --current
Screen 0: minimum 320 x 200, current 320 x 200, maximum 4096 x 4096
LVDS1 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected (normal left inverted right x axis y axis)
DVI1 disconnected (normal left inverted right x axis y axis)

(open lid again)

[root@ohm ~]# xrandr -display :0.0 -q --current
Screen 0: minimum 320 x 200, current 320 x 200, maximum 4096 x 4096
LVDS1 connected (normal left inverted right x axis y axis)
   1920x1200      60.0* +
   1600x1200      60.0  
   1400x1050      60.0  
   1280x1024      60.0  
   1280x960       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
DVI1 disconnected (normal left inverted right x axis y axis)

Ideally, xfwm4 would see that it's the same display type and size and just leave things the way they were instead of repositioning them. I don't know if other video drivers are or will be doing things this way, but it seems likely to me.
Comment 1 Olivier Fourdan editbugs 2010-02-06 08:36:47 CET
If you resize your screen or remove monitors, xfwm4 will do its best to keep your existing windows visible.

If the screen geometry changes when closing the lid, it's clearly a bug in the driver, not in the window manager.
Comment 2 Kevin Fenzi 2010-02-06 20:17:27 CET
My understanding from talking to the X maintainers is that all the drivers will be moving to this model, just intel happens to be the first due to fixing lid close display bugs. 

I guess the thought is: 

- Close lid 
- Remove display entirely. This means it's disconnected and powered down.
- Open lid
- Reattach the display as you would using the same hotplug code if you activated a new display. 

Perhaps xfwm4 could see 'no displays at all, I should leave everything along for now' then 'new display, but it's the exact same size as the one I had before, so I shouldn't do anything'. 

Of course that would mean that it would have to keep track of 'last display I used' and size on it. 

I could be wrong here, but given the move of all drivers to this model, I think xfwm4 is going to have to deal with this case as some point. 

http://bugs.freedesktop.org/show_bug.cgi?id=21230 is the upstream intel lid bug that I think prompted all this. I can try and find more info.
Comment 3 Olivier Fourdan editbugs 2010-02-08 13:33:39 CET
oh I see, there is no output at all remaining after the lid is closed. Weird, but makes sense somehow I guess.

I am not even sure this is something I envisioned at all in xfwm4, it's funny it does not even crash :)
Comment 4 Olivier Fourdan editbugs 2010-02-09 16:17:49 CET
Can you try with current git?

Also, I noted this today: http://lists.freedesktop.org/archives/intel-gfx/2010-February/005802.html
Comment 5 Kevin Fenzi 2010-02-09 19:50:16 CET
I applied that commit to 4.6.1 and tried it. (Should I do a full git head? Or should it matter?)

Didn't work. All the terminal windows ended up in the upper left corner. ;( 

I do see: 

** (xfwm4:1265): CRITICAL **: getBoolValue: assertion `G_VALUE_TYPE(rc[i].value) == G_TYPE_BOOLEAN' failed

In the terminal I restarted xfwm4 in if it matters. 

Is the repositioning happening when all displays are removed? or when the lid opens and the panel is readded back (meaning the transition from "no display" -> "panel is back at 1920x1200"?

Bug #6209

Reported by:
Kevin Fenzi
Reported on: 2010-02-04
Last modified on: 2020-05-28

People

Assignee:
Olivier Fourdan
CC List:
1 user

Version

Attachments

Additional information