Bug 283974 - After KDE upgrade, panel is in wrong position
Summary: After KDE upgrade, panel is in wrong position
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: containment-panel (show other bugs)
Version: 4.8.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 284039 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-14 10:23 UTC by Benjamin M
Modified: 2013-12-15 16:43 UTC (History)
6 users (show)

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


Attachments
screenshot (167.52 KB, image/jpeg)
2011-10-14 10:30 UTC, Benjamin M
Details
screenshot2 (183.85 KB, image/jpeg)
2011-10-14 10:31 UTC, Benjamin M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin M 2011-10-14 10:23:15 UTC
Version:           unspecified (using KDE 4.7.1) 
OS:                Linux

After each of the KDE 4.7 upgrades (4.7.0, 4.7.1 and 4.7.2) my top panel has been in the wrong place. When I touch the "position changer" in the panel settings, it magically slides itself back to where it is supposed to be. But then at many plasma crashes, it is back somewhere toward the bottom (see the screenshots of 2 different upgrades attached). This last time I had to actually delete the panel and add a new one so it would stay up top. 

Reproducible: Always

Steps to Reproduce:
see above

Actual Results:  
See above. Also note that the desktop cashew was not attached to the edge of the screen all the way from 4.7.0 to 4.7.1. It works now and I don't have screenshots for it. (If I can manage to attach the second screenshot...)

Expected Results:  
The panel should be horizontal and attached to the top edge. 

My vertical, centered slide-out panel on the left is not affected. 

Also note that the deviant panel is in 2 slightly different positions in both screenshots. The one with the leaf is from 4.7.2, the other probably from 4.7.1.
Comment 1 Benjamin M 2011-10-14 10:30:09 UTC
Created attachment 64506 [details]
screenshot

The panel on the left is also misplaced, it's supposed to be centered and auto-hidden.
Comment 2 Benjamin M 2011-10-14 10:31:17 UTC
Created attachment 64508 [details]
screenshot2
Comment 3 Jeff Roberts 2011-10-23 19:15:52 UTC
I have been having this or a very similar issue for several KDE versions. The panel seems to randomly move down the screen.
I have noticed since the 4.7.2 upgrade (might have been earlier but this is when I noticed it) the panel moves down when a dolphin window is open, positioning itself below the dolphin window.
Sometimes I can hit alt-F1 a few times and the panel will move back to the top on it's on. Sometimes I have to move it myself.

Kubuntu 11.10 and KDE 4.7.2 on a Lenovo Thinkpad T61
Comment 4 dag 2011-11-23 16:59:49 UTC
I have also seen this for some time now. Think since 4.7.1.

Checking the debug output from panelview my "not so familiar with the code" eyes can see some strange artefacts.

1. The value of m_lastSeenSize given to PanelView::pinchContainment: is 1200, which is wrong as this is a horizontal panel with size 1600. Seems like "lastsize" value of the panel has been filled in with the wrong value.
2. The geometry settings with negative values in them seems strange to me, but I don't know the coordinatesystem rules here.

Here from my log:
plasma-desktop(18034)/plasma PanelView::setContainment: Panel geometry is QRectF(0,-58 1600x52)
plasma-desktop(18034)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,-58 160
0x52) associated screen is 1
plasma-desktop(18034)/plasma PanelView::pinchContainmentToCurrentScreen: pinching to current screen
plasma-desktop(18034)/plasma PanelView::pinchContainment: **************************** pinching QRect(0,0 1600x1200) 1200
plasma-desktop(18034): ""min" - conversion of "-1,-1" to QSizeF failed" 
plasma-desktop(18034): ""max" - conversion of "-1,-1" to QSizeF failed" 
plasma-desktop(18034)/plasma PanelView::pinchContainment: we are moving from a smaller space where we are 100% to a larger one
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: New panel geometry is QRectF(0,-58 1600x52)
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: PanelView(0x2c94d70) thinks its panel is at  QRect(0,1148 1600x52) wa
s QRect(0,0 1600x52)
plasma-desktop(18034)/plasma PanelView::pinchContainment: Done pinching, containment's geom QRectF(0,-58 1600x52) own geom QRect(0
,1148 1600x52)
plasma-desktop(18034)/plasma PanelView::pinchContainment: **************************** pinching QRect(0,0 1600x1200) 1600
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: New panel geometry is QRectF(0,-58 1600x52)
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: PanelView(0x2c94d70) thinks its panel is at  QRect(0,1148 1600x52) wa
s QRect(0,1148 1600x52)
plasma-desktop(18034)/plasma PanelView::pinchContainment: Done pinching, containment's geom QRectF(0,-58 1600x52) own geom QRect(0,1148 1600x52)
plasma-desktop(18034)/plasma PanelView::setContainment: about to set the containment Panel(0x19d0360)
plasma-desktop(18034)/plasma PanelView::updateStruts: screen l/r/b/t offsets are: 0 1600 0 0 4
plasma-desktop(18034)/plasma PanelView::setContainment: Panel geometry is QRectF(0,-168 3200x52)
plasma-desktop(18034)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,-168 3200x52) associated screen is 0
plasma-desktop(18034)/plasma PanelView::pinchContainmentToCurrentScreen: pinching to current screen
plasma-desktop(18034)/plasma PanelView::pinchContainment: **************************** pinching QRect(1600,0 1600x1200) 3200
plasma-desktop(18034)/libplasma Plasma::ContainmentPrivate::preferredPanelPos: moved to QPointF(0, -1102)
plasma-desktop(18034): ""min" - conversion of "-1,-1" to QSizeF failed" 
plasma-desktop(18034)/libplasma Plasma::ContainmentPrivate::preferredPanelPos: moved to QPointF(0, -1102)
plasma-desktop(18034): ""max" - conversion of "-1,-1" to QSizeF failed" 
plasma-desktop(18034)/libplasma Plasma::ContainmentPrivate::preferredPanelPos: moved to QPointF(0, -354)
plasma-desktop(18034)/plasma PanelView::pinchContainment: we are moving from a bigger space to a smaller one where the panel won't fit!!
plasma-desktop(18034)/plasma PanelView::pinchContainment: panel is larger than screen, adjusting panel size
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: New panel geometry is QRectF(0,-354 3200x52)
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: PanelView(0x21bb1f0) thinks its panel is at  QRect(1600,1148 1600x52) was QRect(0,0 1066x800)
plasma-desktop(18034)/libplasma Plasma::ContainmentPrivate::preferredPanelPos: moved to QPointF(0, -354)
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: New panel geometry is QRectF(0,-354 1600x52)
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: PanelView(0x21bb1f0) thinks its panel is at  QRect(1600,1148 1600x52) was QRect(1600,1148 1600x52)
plasma-desktop(18034)/plasma PanelView::pinchContainment: Done pinching, containment's geom QRectF(0,-354 1600x52) own geom QRect(1600,1148 1600x52)
plasma-desktop(18034)/plasma PanelView::pinchContainment: **************************** pinching QRect(1600,0 1600x1200) 1600
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: New panel geometry is QRectF(0,-354 1600x52)
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: PanelView(0x21bb1f0) thinks its panel is at  QRect(1600,1148 1600x52) was QRect(1600,1148 1600x52)
plasma-desktop(18034)/plasma PanelView::pinchContainment: Done pinching, containment's geom QRectF(0,-354 1600x52) own geom QRect(1600,1148 1600x52)
plasma-desktop(18034)/plasma PanelView::setContainment: about to set the containment Panel(0x1e55580)
plasma-desktop(18034)/plasma PanelView::updateStruts: screen l/r/b/t offsets are: -1600 0 0 0 4
plasma-desktop(18034)/plasma PanelView::setContainment: Panel geometry is QRectF(0,-261 1600x35)
plasma-desktop(18034)/libplasma Plasma::ViewPrivate::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,-261 1600x35) associated screen is 1
plasma-desktop(18034)/plasma PanelView::pinchContainmentToCurrentScreen: pinching to current screen
plasma-desktop(18034)/plasma PanelView::pinchContainment: **************************** pinching QRect(0,0 1600x1200) 1200
plasma-desktop(18034): ""min" - conversion of "-1,-1" to QSizeF failed" 
plasma-desktop(18034): ""max" - conversion of "-1,-1" to QSizeF failed" 
plasma-desktop(18034)/plasma PanelView::pinchContainment: we are moving from a smaller space where we are 100% to a larger one
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: New panel geometry is QRectF(0,-261 1600x35)
plasma-desktop(18034)/plasma PanelView::updatePanelGeometry: PanelView(0x2909ec0) thinks its panel is at  QRect(0,0 1600x35) was QRect(0,0 1600x35)
Comment 5 Benjamin M 2012-01-29 13:01:42 UTC
Still having this issue with 4.8! This is a real showstopper. My panel stubbornly sticks to the bottom every time I restart my machine. I have to move it back to the top every time. You can imagine that although this is minor, it is pretty annoying!
Comment 6 Kai Dombrowe 2012-04-18 22:41:13 UTC
in "void PanelView::updatePanelGeometry()" kde-workspace-4.8.2/plasma/desktop/shell/panelview.cpp

change:
    if (geom == geometry()) {
        // our geometry is the same, but the panel moved around
        // so make sure our struts are still valid
        m_strutsTimer->stop();
        m_strutsTimer->start(STRUTSTIMERDELAY);
    } else {

to:
    if (geom == geometry()) {
        // our geometry is the same, but the panel moved around
        // so make sure our struts are still valid
        m_strutsTimer->stop();
        m_strutsTimer->start(STRUTSTIMERDELAY);
        setGeometry(geom);
    } else {

fixed the bug for me.... 
but geom == geometry() so setGeometry(geom); should do nothing... right?
if i remove "setGeometry(geom);" the bug occurs again, every time i start plasma-desktop
Comment 7 Myriam Schweingruber 2012-05-19 22:31:31 UTC
Setting status correctly to confirmed.
Comment 8 Rolf Eike Beer 2012-05-20 09:26:48 UTC
*** Bug 284039 has been marked as a duplicate of this bug. ***
Comment 9 Dik Takken 2012-07-03 07:46:09 UTC
I still see this behaviour on KDE 4.8.3 (Fresh Kubuntu Precise install). It happens every time I connect a secondary monitor to my laptop.

Something changed though: In 4.8 the panel does not appear in the middle of the screen, but it appears at a small distance from the top, almost at the position where it should be. Moving it back to the screen edge works, but this is 'forgotten' as soon as a log out. Still, the only way to fix the panel is to remove it and create it from scratch again.

Changing normal, as this is pretty annoying and 100% reproducible.
Comment 10 Rolf Eike Beer 2012-07-16 16:35:16 UTC
Created a reviewboard entry for this: https://git.reviewboard.kde.org/r/105596/
Comment 11 Rolf Eike Beer 2012-08-14 18:15:49 UTC
Git commit 59b1e4e4387a9194125bfac35a23ad885c9c24e6 by Rolf Eike Beer.
Committed on 16/07/2012 at 18:27.
Pushed by dakon into branch 'KDE/4.9'.

fix wrong panel positioning, especially when more than one monitor is present

This workaround was found by Kai Dombrowe. This is likely just papering over a
deeper issue, but for the time being this just makes the panel work.
Related: bug 272663, bug 281029
REVIEW:105596
FIXED-IN:4.9.1

M  +2    -0    plasma/desktop/shell/panelview.cpp

http://commits.kde.org/kde-workspace/59b1e4e4387a9194125bfac35a23ad885c9c24e6
Comment 12 Victor B. Gonzalez 2012-08-24 14:35:20 UTC
I've had an issue (this may be it) where my top plasma panel would move down about 25 pixels, leaving a gap at the top. I personally this this has something to do with dual monitors and the plasma "search and launch" widget. My work around for solving this is

mkdir $HOME/.kde/share/config/plasma-desktop.bak/
mv $HOME/.kde/share/config/plasma-desktop-screen-1* $HOME/.kde/share/config/plasma-desktop.bak/

YOU MAY HAVE TO ADJUST PATHS OR CATCH MORE THAN ...screen-1* e.g., ...screen-* or ...screen*

I swear I tried so many things and this was the one that nipped it right in the butt for me. I came across this idea from temporarily solving the problem when I enabled the second monitor (TV), and noticing the "search and launch" widget hanging out at the top. My habit is to always move it and I noticed when I was done using the TV, I restarted X and after login, my panel was at the correct position.

I noticed though, for some reason, enabling the TV again would cause my top panel to move on subsequent logins. I ended up putting the following in a startup script and now I no longer have the problem.

mv $HOME/.kde/share/config/plasma-desktop-screen-1* $HOME/.kde/share/config/plasma-desktop.bak/

I'm convinced something is wrong with the plasma-desktop-screen files.

This may not be a great idea if you're constantly using dual screens or have worked hard on configuring your plasma screens and would like to keep them. Just a possible answer I guess.
Comment 13 Myriam Schweingruber 2012-09-08 12:13:53 UTC
(In reply to comment #12)
> I've had an issue (this may be it) where my top plasma panel would move down
> about 25 pixels, leaving a gap at the top. 

Have you actually seen this is solved in KDE 4.9.1? If you can not reproduce this in 4.9.1 or later no need to comment :)
Comment 14 nkent 2012-12-21 14:29:34 UTC
This is NOT FIXED! 

OS:  Linux 3.4.11-2.16-desktop x86_64
System:  openSUSE 12.2 (x86_64)
KDE:  4.9.4 "release 5"
Comment 15 nkent 2013-01-10 14:49:56 UTC
This is STILL NOT FIXED! 

OS: Linux 3.4.11-2.16-desktop x86_64 
System: openSUSE 12.2 (x86_64) 
KDE: 4.9.5 "release 3"
Comment 16 Dik Takken 2013-01-13 11:44:19 UTC
(In reply to comment #15)
> This is STILL NOT FIXED! 
> 
> OS: Linux 3.4.11-2.16-desktop x86_64 
> System: openSUSE 12.2 (x86_64) 
> KDE: 4.9.5 "release 3"

Could you please explain, step by step, how you can reproduce the bug in KDE 4.9?

Does the work-around explained in comment #12 work for you?
Comment 17 nkent 2013-03-17 17:50:44 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > This is STILL NOT FIXED! 
> > 
> > OS: Linux 3.4.11-2.16-desktop x86_64 
> > System: openSUSE 12.2 (x86_64) 
> > KDE: 4.9.5 "release 3"
> 
> Could you please explain, step by step, how you can reproduce the bug in KDE
> 4.9?
> 
> Does the work-around explained in comment #12 work for you?

Hi, sorry for the delay, I thought it was solved but still happens under this configuration:
OS: Linux 3.7.10-1.1-desktop x86_64 
System: openSUSE 12.3 (x86_64) 
KDE: 4.10.1 "release 545"

I found no way to reproduce the bug. Some plasma components seem to move around at will but I can't find the trigger. It happens on several computers with different hardware.

The problem I'm reporting is that every once in a while the desktop view widget at the top of my screen is shifted down, as if to make room for a top panel (nonexistent). It doesn't matter if logging on the 1st time from power on, or after reboot, or after log off.

The workaround from comment #12 doesn’t work for me; maybe I'm missing something but my system doesn't have the files described in #12 (no $HOME/.kde/share/config/plasma-desktop-screen-1* - could be the fact that I have a single monitor?). 

Anyway, I tried deleting a bunch of KDE4 plasma settings files (under ~/.kde4/share/config/) and reposition widgets but the bug comes back after a while.

The quickest workaround I found is:
- unlock widgets
- add panel > empty panel (this creates a panel that takes the "ghost space" at the top).
- remove panel just created (this causes widgets to shift back up to normal position).
- lock widgets
- log off/ log on

Not terrible but still a hassle doing it every couple of days, and I'm afraid I don't believe this bug should be marked as resolved or fixed, yet.

Regards
Comment 18 nkent 2013-03-17 17:59:48 UTC
(In reply to comment #17)
Some additional info:
- When the widgets move and I just try to reposition manually, they shift back down to make room for the "ghost panel".
- Also, some times the workaround described above needs to be applied twice because after log off and log on the widgets are still in the wrong position.
Comment 19 nkent 2013-04-13 14:03:35 UTC
Still happening:
OS: Linux 3.7.10-1.1-desktop x86_64 
System: openSUSE 12.3 (x86_64) 
KDE: 4.10.2 "release 553"
Comment 20 dag 2013-04-13 18:19:10 UTC
It has worked fine for some time, but upgrade from 4.10.1 -> 4.10.2 messed up things completely again. All panels etc. were found on screen 1 - On top of each other. Removing the panels that earlier was on screen 2 and reinserting them on thir right place cleared it up.
Comment 21 nkent 2013-05-12 16:12:06 UTC
Still happening (on several systems): 
OS: Linux 3.7.10-1.4-desktop x86_64 
System: openSUSE 12.3 (Darmouth) (x86_64) 
KDE: 4.10.3 "release 559"
Comment 22 nkent 2013-12-15 16:43:25 UTC
NOT FIXED!
OS: Linux 3.11.6-4-desktop 
System: openSUSE 13.1 (Bottle) (x86_64) 
KDE: 4.11.3