Panel order keeps changing

*below is the original message from @samuraiseoul that was split from another topic incorrectly *

Hi there, I am experiencing the same or a similar issue as well.

I am on Ubuntu Budgie 18.04 and the panel is having issues with the applet display order as well. Unlike the above issue though, I don’t think I’ve experienced any crashes though.

I have added the budgie-extras-daily ppa and ran the software updater then rebooted. I also confirmed that showtime, dropby, and quick note were all installed. Other issues I found that were similar said something about the weathershow applet causing issues so I removed that from my panel as well and nothing has changed. I’ve tried reboots and removing applets as well as added the three applets mentioned above to the panel just to see if that would help.

It seems like something at the end of the panel causes issues if I were to guess stemming from the above user’s(@siebenHeaven) mention of a segmentation fault and the ever present off by one error in programming. I too have the bottom two applets not being allowed to move downwards, which is strange as the second to last I would expect to be able to move below.

Lastly, I noticed that if I run nohup budgie-panel --replace & multiple times that the order of the apps especially near the end of the panel changes each time its rendered.

I don’t know if @siebenHeaven ever got their issue fixed as they didn’t update us, but it would be nice to know.

If there is more information that I can provide, please let me know and I would be happy to! This has been more or less one of my only issues with Ubuntu Budgie so I would love to get it fixed! :smiley:

Thanks a lot!

Reply is below

Hi and welcome. Yours sounds different.

If you reset the panel and repeatedly restart the panel at what point does your issue return?

budgie-panel --reset --replace &

Hey thanks for the quick reply @fossfreedom!

It sometimes happens after one restart, or after many, seems kind of random honestly but I think five restarts has been the limit so far. However, no matter what if I go into the budgie desktop settings and move some applets around, just doing that can cause things to get out of order. That said, it seems to only happen once they reach the bottom two applets spots in it but perhaps that is me with a cognitive bias so I’m looking at it more. Also moving spacers or separators anywhere at the end of it seems to sometimes trigger it.

I’ve included a screenshot of my end settings in the budgie desktop settings along with the end of the panel when it has and hasn’t changed or screwed up. The blue is from my other monitor, ignore that. Secondly because I’m a new user on here I can only supply one image so I had to use an online tool to combine them. Also I didn’t realize the screenshot applet made faces when you take a picture of it… haha brilliant!

secondcombo

Once again, let me know what other info you need or commands you need to see the output of! I’d love to help.

To be honest - its a really difficult one to replicate. Once it is happening then its a golden opportunity to start adding debug statements into budgie-desktop code to see why it is happening.

I hear you. I’m a developer too so the process is not lost on me. :S I wish I could find some more concrete replication steps for us. Its a lot harder when it works for one and not the other compared to knowing how to get it to a normal working order then finding out how to break it. You can’t figure out how to, and I’m already broken. Perhaps when I get home today or tomorrow I’ll try and just replace the entire panel and see how that goes, or just make an extra panel. What would be some good files for settings where the applet order is stored or log files to look at for me while I muck around?

Also I forgot to mention it above, but my system monitor applet was removed from the panel when this all started(not by me, it was just not there) and as some other threads suggested I had removed the weather applet that seemed to have caused other people the same issue.

Thanks for the quick replies and I hope we can get some more info soon! Budgie is great and it would be awesome to get this resolved!

I’m doubtful weather of the monitor app has anything to-do with this.

Upstream Solus have numerous reports of this happening - similar observations about moving stuff around at the end of the panel. But never a real diagnosis by someone willing to delve into the code.

Budgie doesnt “do” log files - we are out of luck there. Best that can be done is compiling budgie-desktop and adding debug statements. All panel information is stored in dconf - com.solus-project in relocatable schemas.

This is exactly what I meant by panel applets going out of order.

I have faced this issue too. This one, I can usually get around by sort of moving other applets (like moving the last one up if I cannot move the second last one down). I also had a look at panel.vala (conflict_swap and other functions) for anything that could cause this but they seem good to my (fairly inexperienced) eye.

Lastly, have been away from my machine for a week or so (kinda vacationing) so have not updated regarding what happened.

@fossfreedom I agree that the monitor app disappearing is most likely not really relevant but I though I would voice it. I’ve see some of the upstream reports but haven’t seen much in terms of replication. :frowning:

I dug through quite a bit of the code just browsing on github thanks to the link @siebenHeaven included, and while there wasn’t much that was sticking out, AND I’ve never done vala, I will say that line 1158 in https://github.com/solus-project/budgie-desktop/blob/master/src/panel/panel.vala seems like a place to look as the >= seems like an odd choice for an index position check of I would assume integers for the indexes. Unfortunately that’s about as good as I could find by just looking.

I noticed that the separators always seemed to make things a bit odd so I removed them from the panel’s end region and then things went pretty well. I rebooted a few times and then added them, then spacers, then the couple of applets I had removed from the panel. I rebooted between each step and not all seems well? IDK why that worked and I don’t have high hopes for it to stay working as a result. In addition to seeming to stay in order, the issue with the second to last applet not being able to move down is gone as well. This leads me to wonder if there is something in the AppInfo that was relevant to that and by deleting the separators, I happened to get lucky and clear the bad app info for it? I unfortunately was not able to find the file that contained the definition for AppInfo to look further into that.

I’ll be on the lookout for other issue or recurrences as well in the meantime! Hope that helps spread some ideas on what is going on for either you(@fossfreedom) or @siebenHeaven(Don’t worry about vacationing, just wanted to ping in case you fixed and forgot to update us!). Let me know if I can help more! Also I’m on a desktop with multiple monitors using NVIDIA drivers in case that is relevant at all as I think @siebenHeaven is on a laptop which would make me think single monitor and integrated graphics, so most likely irrelevant.

Thanks!

Yes, I am on a laptop, with dual graphics. I use the integrated graphics only though (usually) and keep the discrete one turned off (nvidia-prime). I don’t think that relates to any of this though.

I had another look at panel.vala and I think there could be some problems.

Specifically, I think re-parenting would be required when moving the applets around borders of the three sections of the panel. Here’s a patch (mypatch (copy).txt (1.2 KB)) that I think could fix the issue (did not know how to test it, so didn’t send a pull request though). Any idea how this could be tested @fossfreedom?

I can throw up a test budgie desktop PPA with your patch if it helps?

Edit: to compile the budgie desktop yourself

Thanks for those instructions @fossfreedom
I recompiled budgie desktop and tried it out. But after budgie-panel --reset --replace, I could not get the issue to reproduce at all so far, even without the fix.

hmm - Did you try installing an applet - adding it to the panel - then uninstalling the applet without removing it from the panel first? Thoughts @siebenHeaven ?

Great idea! I tried all combos, reproduced my original set of applets that were having issues, moved stuff around, reset panel, restarted and all but the issue would not get reproduced. However, as you suggested, installing applet, adding it to panel, uninstalling without removing from panel and then resetting the panel reproduces this part:

Random reordering has not happened yet, but I have hopes that it will show up with a few restarts and resets and moving around applets.

I also added some debug prints and recompiled/installed budgie-desktop and it seems positions of applets aren’t getting updated as evident (length says 14 but position of the last applet is 15 so the last two are not allowed to be moved down):


Don’t know how the panel saves and restores state when replaced etc, but I think there might be some problem there or in how cleaning up is done when an applet is removed via setting vs when it is removed because it was uninstalled. What do you think @fossfreedom?

To easily reproduce I run:

budgie-panel --reset --replace &

Then I uninstall budgie-dropby-applet, budgie-quicknote-applet & budgie-showtime-applet

After than I simply run budgie-panel --replace & a couple of times and the raven trigger starts to wander across the end panel.

debug.diff.txt (5.8 KB)

The above diff applies to budgie-desktop v10.4 found in bionic - very similar to 10.5

Looking at the output of the debug messages the “child_set” position which sets the position of the applets inside the Gtk Boxes appears to be correct… but obviously visually very wrong. But I grep’d through the code and I cant see anything else other than in panel.vala that is influencing the applet positions.

Haven’t got much further than the above.

  1. I’m on 20.20. I’ve also got applets appearing in the wrong order, it’s trivial for me but might give a bad impression to new users.
    As you can see from the screenshot (of only the right hand side of the panel) below, in the middle group the settings show that I want the weather applet to be to the right of the time applet, but the top bar has them the other way round.
    In the right hand group although I want the user-indicator applet to be on the far the right, it sometimes changes places with the network app. (not shown)
    Moving applets around in settings window doesn’t work very well (not shown), the effect is mostly random, they don’t even stay within their own group (Start/Centre/End). this applies not only to the panel but even to the settings window.
    Spacer don’t appear to take any notice of the size setting (not shown), they do, but it looks as though they don’t because they aren’t in the place they are set to be.
    I suspected that it might be the weather applet causing it, as someone else suggests, but it isn’t that one in particular, others do it too - or it’s a general problem with the panel and settings.
    In summary, although I can set them up to be something like what I want, it’s only half right and it jumps around. It gives a poor impression to a user, but luckily the consequences are fairly trivial.

  1. I created a right panel, deleted the old one, then setup the new one as a top panel to match the original. Everything now stays in its proper place and the settings window works as it should. I suspect that a later version of the panel software doesn’t work with panel configuration files created under previous versions.

Panel order changing is usually because you have uninstalled one or more of the applets that make up the layout (panel.ini) that you are using. Removing the applet from the panel doesn’t cause this - but actually uninstalling a layout dependent applet does cause this observation.

I haven’t uninstalled any applets, I wouldn’t know how or have any reason to.

Oddly although my new top panel works properly, /usr/share/budgie-desktop/panel.ini file doesn’t appear to match it, it lists applets that have never been put onto it.

[Panels]
Panels=Top Panel

[Top Panel]
Children=AppMenu;Spacer 1;ShowTime;Clock;VisualSpace;AppIndicator;DropBy;QuickNote;Spacer 2;Places;Notifications;Network;Status;Separator;Spacer 3;User Indicator;Raven Trigger;
Position=Top
Size=39

[AppMenu]
ID=AppMenu

[Spacer 1]
ID=Spacer

[ShowTime]
ID=ShowTime

[Clock]
ID=Clock
Alignment=center

[VisualSpace]
ID=Visual Space
Alignment=end

[AppIndicator]
ID=AppIndicator Applet
Alignment=end

[Network]
ID=Network
Alignment=end

[Tray]
ID=System Tray
Alignment=end

[DropBy]
ID=DropBy
Alignment=end

[QuickNote]
ID=QuickNote
Alignment=end

[Spacer 2]
ID=Spacer
Alignment=end

[Night]
ID=Night Light
Alignment=end

[Places]
ID=Places
Alignment=end

[Notifications]
ID=Notifications
Alignment=end

[Status]
ID=Status Indicator
Alignment=end

[User Indicator]
ID=User Indicator
Alignment=end

[Separator]
ID=Separator
Alignment=end

[Spacer 3]
ID=Spacer
Alignment=end

[Raven Trigger]
ID=Raven Trigger
Alignment=end

that panel.ini is the definition of the panel when its first built. It doesnt reflect user based changes such as the AppMenu swap to Budgie Menu that you have made.

If you have used the layouts capability then the panel-first-built-definition is in the subfolder “layouts”

So it’s a copy of the default panel for the layout I have selected, so there is nothing wrong with it, that’s all right then :slight_smile: and I’ve just realised that my configuration files would be in my home directory.

Lets put it this way - the way budgie creates its panel depends on everything being 100% it was expecting. Its isn’t very forgiving if the figure is not 100%. So yeah - its isnt as robust a solution as we all would love to have.

I agree - you need a fairly in depth knowledge here to figure out what is what and how its done. Ease of customisation is complex to implement!

Basically just be careful when installing & removing applets through Menu - Budgie Extras or via the command-line as I am sure you are :slight_smile:

Everyone - I found this bug report upstream https://github.com/solus-project/budgie-desktop/issues/1030

There seems to be real issues of using separators - possibly without spacers - that can cause panel order changes.

Worth testing to confirm that - if so, for now ensure separators should be placed next to spacers … or don’t use separators.