Bug 165478 - panel not repositioned properly when new display is added and activated via xrandr
Summary: panel not repositioned properly when new display is added and activated via x...
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: plasma4
Classification: Unmaintained
Component: multiscreen (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-01 12:40 UTC by Johannes Rohr
Modified: 2009-03-07 19:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot of wronlyly positioned panel after connecting an external vga display (805.52 KB, image/png)
2008-07-01 12:42 UTC, Johannes Rohr
Details
example of bug (430.85 KB, image/png)
2008-09-05 16:22 UTC, Bram Vandoren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Rohr 2008-07-01 12:40:49 UTC
Version:            (using KDE 4.0.83)
Installed from:    Debian testing/unstable Packages
OS:                Linux

I am using KDE 4.1. on Debian experimental. My graphics card uses the intel driver. 

My laptop comes with a 1280x800 display. When I connect an external 1280x1024 display and enable it with something like "xrandr --auto" the panel will not be properly repositioned to the bottom. I will attach a screenshot. 

I have seen bug 162856. However this here is not about resizing.

Also I would like to add that this did start to happen only in beta 2. Before, the panel was positioned correcly.
Comment 1 Johannes Rohr 2008-07-01 12:42:12 UTC
Created attachment 25764 [details]
screenshot of wronlyly positioned panel after connecting an external vga display
Comment 2 Aaron J. Seigo 2008-07-01 20:36:16 UTC
it looks like it is getting the internal screen geometry for QRect screenGeom = QApplication::desktop()->screenGeometry(screen);

can you provide the output of `xrandr` when in this configuration, along with your plasma-appletsrc and plasmarc files? thanks...
Comment 3 Johannes Rohr 2008-07-01 21:22:20 UTC
xrandr:

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 1920 x 1920
VGA connected 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024      60.0*+   75.0     59.9     60.0*
   1920x1440      60.0
   1856x1392      60.0
   1792x1344      60.0
   1920x1200      60.0
   1600x1200      75.0     70.0     65.0     60.0
   1680x1050      60.1
   1400x1050      75.0     72.0     60.0
   1280x960       75.0     72.0     60.0
   1152x864       75.0     74.8     60.0
   1024x768       75.1     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   768x576        75.0     72.0     60.0
   640x480        72.8     75.0     72.8     66.7     60.0
   720x400        70.1
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800       60.0*+   60.0
   1280x768       60.0
   1024x768       60.0
   800x600        60.3
   640x480        59.9
TV disconnected (normal left inverted right x axis y axis)

plasmarc:

[Theme]
name=slim-glow

[ViewIds]
1=4
3=1
4=3

plasma-appletsrc:

[Containments][1]
backgroundmode=0
formfactor=0
geometry=0,0,1280,1024
immutability=1
location=0
plugin=desktop
screen=0
selected=
wallpaper=/usr/share/wallpapers/Fields_of_Peace/contents/images/1280x800.JPG
wallpapercolor=224,223,222
wallpaperposition=2
zvalue=0

[Containments][1][Applets][11][Configuration]
filterFiles=*
url=file:///home/data

[Containments][1][Applets][2]
formfactor=0
geometry=6,6,600,400
immutability=1
location=0
plugin=folderview
screen=-1
zvalue=0

[Containments][1][Applets][2][Configuration]
url=desktop:/

[Containments][3]
formfactor=0
geometry=1286,0,1280,800
immutability=1
location=0
plugin=desktop
screen=1
wallpaper=/usr/share/wallpapers/Blue_Curl/contents/images/1920x1200.jpg
zvalue=0.002

[Containments][4]
formfactor=2
geometry=0,-43,1280,37
immutability=1
location=4
plugin=panel
screen=1
zvalue=150

[Containments][4][Applets][10]
geometry=1190,2,70,35
immutability=1
plugin=digital-clock
zvalue=0

[Containments][4][Applets][5]
geometry=0,2,35,35
immutability=1
plugin=launcher
zvalue=0

[Containments][4][Applets][5][Shortcuts]
global=Alt+F1

[Containments][4][Applets][6]
geometry=39,2,35,35
immutability=1
plugin=notifier
zvalue=0

[Containments][4][Applets][7]
geometry=78,2,44,35
immutability=1
plugin=pager
zvalue=0

[Containments][4][Applets][8]
geometry=126,2,823,35
immutability=1
plugin=tasks
zvalue=0

[Containments][4][Applets][9]
geometry=953,2,233,35
immutability=1
plugin=systemtray
zvalue=0

[Containments][4][Configuration]
maximumSize=1280,37
minimumSize=1280,37

[General]
immutability=1
Comment 4 Bram Vandoren 2008-09-05 16:19:56 UTC
I am having a very similar problem with KDE 4.1.1. I attach a screenshot  Setup:
- KDE 4.1.1 (kubuntu 8.04 packages)
- intel xorg driver
- intel GM965/GL960
- Screen 1: VGA 1280x1024
- Screen 2 : LVDS 1280x800

I also tried several KDE 4.0 version when they were released and all had similar problems with my dual head setup. Moving a screen next to another with xrandr or kdrandrtray makes KDE completely unusable. The only solution is to disable one of the screens in xorg.conf.

xrandr -q
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 2560 x 1024
VGA connected 1280x1024+0+0 (normal left inverted right x axis y axis) 340mm x 270mm
   1280x1024      75.0 +   59.9*
   1024x768       75.1     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   640x480        75.0     72.8     66.7     60.0
   720x400        70.1
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 286mm x 179mm
   1280x800       60.0*+   60.0     60.0*
   1280x768       60.0
   1024x768       60.0
   800x600        60.3
   640x480        59.9
TMDS-1 disconnected (normal left inverted right x axis y axis)

cat .kde4/share/config/plasmarc
[ViewIds]
1=1
2=2
4=3

cat .kde4/share/config/plasma-appletsrc
[Containments][1]                                     
formfactor=0                                          
geometry=0,0,1280,1024                                
immutability=1                                        
location=0                                            
plugin=desktop                                        
screen=0                                              
wallpaper=/usr/lib/kde4/share/wallpapers/Blue_Curl/contents/images/1280x1024.jpg
zvalue=0                                                                        

[Containments][2]
formfactor=0     
geometry=1286,0,1280,800
immutability=1          
location=0              
plugin=desktop          
screen=1                
wallpaper=/usr/lib/kde4/share/wallpapers/Blue_Curl/contents/images/1280x800.jpg
zvalue=0                                                                       

[Containments][2][Applets][3]
formfactor=0                 
geometry=6,6,600,400         
immutability=1               
location=0                   
plugin=folderview            
screen=-1                    
zvalue=4                     

[Containments][2][Applets][3][Configuration]
url=desktop:/                               

[Containments][4]
formfactor=2     
geometry=0,-44,1280,38
immutability=1        
location=4            
plugin=panel          
screen=1              
zvalue=150            

[Containments][4][Applets][10]
geometry=1151,3,35,35         
immutability=1                
plugin=battery                
zvalue=0                      

[Containments][4][Applets][11]
geometry=1190,3,70,35         
immutability=1                
plugin=digital-clock          
zvalue=0                      

[Containments][4][Applets][5]
geometry=0,3,35,35           
immutability=1               
plugin=launcher              
zvalue=0

[Containments][4][Applets][5][Shortcuts]
global=Alt+F1

[Containments][4][Applets][6]
geometry=39,3,35,35
immutability=1
plugin=notifier
zvalue=0

[Containments][4][Applets][7]
geometry=78,3,22,35
immutability=1
plugin=pager
zvalue=0

[Containments][4][Applets][8]
geometry=104,3,936,35
immutability=1
plugin=tasks
zvalue=0

[Containments][4][Applets][9]
geometry=1044,3,103,35
immutability=1
plugin=systemtray
zvalue=0

[Containments][4][Configuration]
maximumSize=1280,38
minimumSize=1280,38

[General]
immutability=1
Comment 5 Bram Vandoren 2008-09-05 16:22:05 UTC
Created attachment 27253 [details]
example of bug
Comment 6 Bram Vandoren 2008-09-05 16:38:37 UTC
this is what Qt reports:
>>> app.desktop().screenGeometry(0)
PyQt4.QtCore.QRect(0, 0, 1280, 1024)
>>> app.desktop().screenGeometry(1)
PyQt4.QtCore.QRect(0, 0, 1280, 800)

the occurs always (no monitor hotplug magic required).
Comment 7 Bram Vandoren 2008-09-05 20:40:13 UTC
I did some more testing and enabled debugging on plasma (see log below). 2 things I noticed:
* plasma creates 2 views (I doubt this is necessary if the 2 screens are on the same position (xrandr --output VGA --same-as LVDS))
* If there are 2 screens on the same position, plasma should resize to the largest screen size (this is the behavior KDE 3.x).
Perhaps this is complete nonsense. It's the first time I looked into the plasma source code.

plasma
<unknown program name>(18742)/ checkComposite: Plasma has an argb visual 0x805a3c0 29360129
<unknown program name>(18742)/ checkComposite: Plasma is COMPOSITE-less on 0x8059cd8       
plasma(18743) PlasmaApp::PlasmaApp: Setting the pixmap cache size to 20660 kilobytes       
plasma(18743)/libplasma Plasma::ContainmentPrivate::positionPanel: positioning non- horizontal panel; forced? false
plasma(18743)/libplasma Plasma::ContainmentPrivate::positionPanel: moved to QPointF(11286, -44)                    
plasma(18743)/libplasma Plasma::ContainmentPrivate::positionPanel: positioning non- horizontal panel; forced? false
plasma(18743)/libplasma Plasma::ContainmentPrivate::positionPanel: moved to QPointF(11286, -44)                    
plasma(18743)/libplasma Plasma::ContainmentPrivate::positionPanel: positioning  horizontal panel; forced? true     
plasma(18743)/libplasma Plasma::ContainmentPrivate::positionPanel: moved to QPointF(0, -44)                        
plasma(18743)/libplasma Plasma::ContainmentPrivate::positionPanel: positioning  horizontal panel; forced? false    
plasma(18743)/libplasma Plasma::ContainmentPrivate::positionPanel: moved to QPointF(0, -44)                        
plasma(18743) Panel::constraintsEvent: constraints updated with 15 !!!!!!                                          
plasma(18743) Panel::constraintsEvent: constraints updated with 2 !!!!!!                                           
plasma(18743) SystemTray::updateWidgetGeometry: Problem view is NULL                                               
plasma(18743) SystemTray::updateWidgetGeometry: Problem view is NULL                                               
plasma(18743) Battery::Battery: Loading applet battery                                                             
plasma(18743) HotplugEngine::onDeviceAdded: add hardware solid :  "/org/freedesktop/Hal/devices/volume_uuid_206F_EF6B"
QLayout: Attempting to add QLayout "" to Plasma::Dialog "", which already has a layout                                
plasma(18743) DeviceNotifier::onSourceAdded: DeviceNotifier:: source added "/org/freedesktop/Hal/devices/volume_uuid_206F_EF6B"
Unrecognized character: /
Unrecognized character: /
ERROR: syntax error
plasma(18743) SystemTray::updateWidgetGeometry: Problem view is NULL
plasma(18743) Battery::init: BatterySource: "Battery0"
plasma(18743) Battery::init: 1
plasma(18743) Clock::init: showTimezone: false
plasma(18743) Panel::constraintsEvent: constraints updated with 32 !!!!!!
plasma(18743) PlasmaApp::createView: Containment name: "Panel" | type 1 | screen: 1 | geometry: QRectF(0,-44 1280x38) | zValue: 150
plasma(18743)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,-44 1280x38) associated screen is 1
plasma(18743) PanelView::updatePanelGeometry: PanelView(0x84bccc0) thinks its panel is at  QRect(0,762 1280x38)
plasma(18743) PanelView::PanelView: Panel geometry is QRectF(0,-44 1280x38)
plasma(18743) PanelView::updateStruts: screen l/r/b/t offsets are: 0 0 224 0
plasma(18743) PanelView::updateStruts: screen l/r/b/t offsets are: 0 0 224 0
plasma(18743) PanelView::updateStruts: screen l/r/b/t offsets are: 0 0 224 0
plasma(18743) DefaultDesktop::reloadConfig: Using configured wallpaper "/usr/lib/kde4/share/wallpapers/Blue_Curl/contents/images/1280x1024.jpg"
plasma(18743) PlasmaApp::createView: Containment name: "Desktop" | type 0 | screen: 0 | geometry: QRectF(0,0 1280x1024) | zValue: 0
plasma(18743) PlasmaApp::createView: creating a view for 0 and we have 2 screens
plasma(18743)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,0 1280x1024) associated screen is 0
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 18 (X_ChangeProperty)
  Resource id:  0x1c0005d
plasma(18743) DefaultDesktop::reloadConfig: Using configured wallpaper "/usr/lib/kde4/share/wallpapers/Blue_Curl/contents/images/1280x800.jpg"
plasma(18743) PlasmaApp::createView: Containment name: "Desktop" | type 0 | screen: 1 | geometry: QRectF(1286,0 1280x800) | zValue: 0
plasma(18743) PlasmaApp::createView: creating a view for 1 and we have 2 screens
plasma(18743)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(1286,0 1280x800) associated screen is 1

If I change the setup:
xrandr --output VGA --left-of LVDS
plasma tells me:
plasma(18743) PlasmaApp::adjustSize: adjust size for screen 0
plasma(18743) PlasmaApp::adjustSize: here we go ... adjusting size

but it doesn't change the size of display 0.

$ kquitapp plasma
$ plasma
and it works nice

<unknown program name>(19610)/ checkComposite: Plasma has an argb visual 0x805a3c0 29360129                                                                
<unknown program name>(19610)/ checkComposite: Plasma is COMPOSITE-less on 0x8059cd8                                                                       
plasma(19611) PlasmaApp::PlasmaApp: Setting the pixmap cache size to 20660 kilobytes                                                                       
plasma(19611)/libplasma Plasma::ContainmentPrivate::positionPanel: positioning non- horizontal panel; forced? false                                        
plasma(19611)/libplasma Plasma::ContainmentPrivate::positionPanel: moved to QPointF(11286, -44)                                                            
plasma(19611)/libplasma Plasma::ContainmentPrivate::positionPanel: positioning non- horizontal panel; forced? false                                        
plasma(19611)/libplasma Plasma::ContainmentPrivate::positionPanel: moved to QPointF(11286, -44)                                                            
plasma(19611)/libplasma Plasma::ContainmentPrivate::positionPanel: positioning  horizontal panel; forced? true                                             
plasma(19611)/libplasma Plasma::ContainmentPrivate::positionPanel: moved to QPointF(0, -44)                                                                
plasma(19611)/libplasma Plasma::ContainmentPrivate::positionPanel: positioning  horizontal panel; forced? false                                            
plasma(19611)/libplasma Plasma::ContainmentPrivate::positionPanel: moved to QPointF(0, -44)                                                                
plasma(19611) Panel::constraintsEvent: constraints updated with 15 !!!!!!                                                                                  
plasma(19611) Panel::constraintsEvent: constraints updated with 2 !!!!!!                                                                                   
plasma(19611) SystemTray::updateWidgetGeometry: Problem view is NULL                                                                                       
plasma(19611) SystemTray::updateWidgetGeometry: Problem view is NULL                                                                                       
plasma(19611) Battery::Battery: Loading applet battery                                                                                                     
plasma(19611) HotplugEngine::onDeviceAdded: add hardware solid :  "/org/freedesktop/Hal/devices/volume_uuid_206F_EF6B"                                     
QLayout: Attempting to add QLayout "" to Plasma::Dialog "", which already has a layout                                                                     
plasma(19611) DeviceNotifier::onSourceAdded: DeviceNotifier:: source added "/org/freedesktop/Hal/devices/volume_uuid_206F_EF6B"
Unrecognized character: /
Unrecognized character: /
ERROR: syntax error
plasma(19611) SystemTray::updateWidgetGeometry: Problem view is NULL
plasma(19611) Battery::init: BatterySource: "Battery0"
plasma(19611) Battery::init: 1
plasma(19611) Clock::init: showTimezone: false
plasma(19611) Panel::constraintsEvent: constraints updated with 32 !!!!!!
plasma(19611) PlasmaApp::createView: Containment name: "Panel" | type 1 | screen: 1 | geometry: QRectF(0,-44 1280x38) | zValue: 150
plasma(19611)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,-44 1280x38) associated screen is 1
plasma(19611) PanelView::updatePanelGeometry: PanelView(0x84bcca8) thinks its panel is at  QRect(1279,762 1280x38)
plasma(19611) PanelView::PanelView: Panel geometry is QRectF(0,-44 1280x38)
plasma(19611) PanelView::updateStruts: screen l/r/b/t offsets are: -1280 0 224 0
plasma(19611) PanelView::updateStruts: screen l/r/b/t offsets are: -1280 0 224 0
plasma(19611) PanelView::updateStruts: screen l/r/b/t offsets are: -1280 0 224 0
plasma(19611) DefaultDesktop::reloadConfig: Using configured wallpaper "/usr/lib/kde4/share/wallpapers/Blue_Curl/contents/images/1280x1024.jpg"
plasma(19611) PlasmaApp::createView: Containment name: "Desktop" | type 0 | screen: 0 | geometry: QRectF(0,0 1280x1024) | zValue: 0
plasma(19611) PlasmaApp::createView: creating a view for 0 and we have 2 screens
plasma(19611)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,0 1280x1024) associated screen is 0
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 18 (X_ChangeProperty)
  Resource id:  0x1c0005d
plasma(19611) DefaultDesktop::reloadConfig: Using configured wallpaper "/usr/lib/kde4/share/wallpapers/Blue_Curl/contents/images/1280x800.jpg"
plasma(19611) PlasmaApp::createView: Containment name: "Desktop" | type 0 | screen: 1 | geometry: QRectF(1286,0 1280x800) | zValue: 0
plasma(19611) PlasmaApp::createView: creating a view for 1 and we have 2 screens
plasma(19611)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(1286,0 1280x800) associated screen is 1
Comment 8 Viesturs Zarins 2008-11-10 19:17:28 UTC
Works fine for me with KDE 4.1.2 on Ubuntu Intrepid, EEEPC 901.
Comment 9 Riccardo Iaconelli 2008-11-24 15:41:10 UTC
can you please check again with a more recent trunk (or soon beta1)? the inclusion of kephal should have made things work more nicely toghether. =)
Comment 10 Chani 2009-03-07 19:29:28 UTC
no reply in months, assuming kephal fixed it.
please reopen if this is not the case.