dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[BUG] waybar multiple copies on login

Open jaypgriff opened this issue 7 months ago • 10 comments

Describe the bug

everytime i log into the wm waybar spawns 2 copies. if i restart it with ctrl+super+B it fixes itself. on arch linux

Steps to reproduce

just log into the wm using gdm/sddm

Expected behavior

should only have 1 waybar active when i log in

Screenshots

No response

Distribution

Arch Linux

If Other, specify

No response

Additional context

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

jaypgriff avatar May 25 '25 12:05 jaypgriff

Are you on nvidia? if you haven't optimized it for that maybe it will help.

dolphin-electric avatar May 25 '25 13:05 dolphin-electric

i am using amd 6900 xt

jaypgriff avatar May 25 '25 14:05 jaypgriff

possibly related to https://github.com/Alexays/Waybar/issues/3344#issuecomment-2390661508

jaypgriff avatar May 25 '25 14:05 jaypgriff

For me, uninstalling waypaper solved the issue.

sudo pacman -Rns waypaper

Just to be sure, also delete the waybar folder in .config

I now use hyprpaper to set the wallapers and have added it to autostart. No more multi waybar's! I posted this possible solution at https://github.com/Alexays/Waybar/issues/1658 but I don't know if it will work for you.

cenobite1654 avatar May 26 '25 00:05 cenobite1654

hi thats interesting i will try that thank you. is there anything i have to change in the ml4w scripts to use hyprpaper instead?

jaypgriff avatar May 26 '25 01:05 jaypgriff

hi thats interesting i will try that thank you. is there anything i have to change in the ml4w scripts to use hyprpaper instead?

Firstly, unistall wayaper.

Now find some wallpaper that is the .png format and copy them (or how ever many you need) to any directory, I use the pictures directory for this example.

Reboot!

When you log in you should get a dark background.

Don't panic!

Now lets set up hyprpaper.

You need to identify your monitor(s)

I have dual monitors, so I went to;

.config/hypr/

and edited hyprpaper.conf

I use the following lines;

preload = /home/yourusername/Pictures/wallpaper1.png preload = /home/yourusername//Pictures/wallpaper2.png wallpaper = DP-1,/yourusername//Pictures/wallpaper1.png wallpaper = DP-2,/yourusername//Pictures/wallpaper2.png splash = false

If you only have one monitor then use the following in hyprpaper.conf;

preload = /home/yourusername/Pictures/wallpaper1.png wallpaper = DP-1,/yourusername//Pictures/wallpaper1.png splash = false

Remember your monitor(s) may have a different ID to mine (DP1, DP2) also remember your wallpaper format has to be in the .png format not jpg.

Your wallpaper doesn't have to be in the pictures directory, you choose.

Now, save hyprpaper.conf

Now go to; .config/hypr/conf/autostart.conf and add this line

Start wallpaper settings

exec-once = hyprpaper

Reboot. Let me know how you get on.

cenobite1654 avatar May 26 '25 01:05 cenobite1654

I will check.

mylinuxforwork avatar May 26 '25 07:05 mylinuxforwork

The same happened to me (also using ArchLinux) and was related to the pixel size of the wallpaper image. I have resize the image to the exact size of my screen resolution and the error disappears. I know that sounds weird, but I could reproduced it that way. It happened more often if the wallpaper was smaller than my screen resolution, don't know if this really is the problem.

I haven't the issue with the wallpapers which were pre-installed with ml4w package, but with some custom ones.

isenmann avatar May 26 '25 19:05 isenmann

thats interesting i will try that this evening as i am using custom wallpaper images and i know they are a larger resolution than the monitors i am using. as i am using 2 monitors with different resolutions i'm not sure if i can use ml4w to use seperate images for each monitor?

jaypgriff avatar May 26 '25 20:05 jaypgriff

i tested some of the images provided by ml4w as well as the ones i have added. the issue is not reproducible with every image. some of the default images cause the problem, at least one does not which is the one named hyprland.jpg. this image is a much larger resolution than either of my monitors so its not that. all of my own images reproduce the problem.

jaypgriff avatar May 27 '25 10:05 jaypgriff

i tested some of the images provided by ml4w as well as the ones i have added. the issue is not reproducible with every image. some of the default images cause the problem, at least one does not which is the one named hyprland.jpg. this image is a much larger resolution than either of my monitors so its not that. all of my own images reproduce the problem.

Hi guys, the issue is permanently resolved by this PR:

https://github.com/mylinuxforwork/dotfiles/pull/978

A thorough explanation is found in the PR itself, I also shared my logs which have shown the exact issue, the explanation and how to resolve it permanently.

No need to reinstall anything, just copy over the changes to the one file (waybar/launch.sh) and you are done.

Hope this helps!

Dawud18854 avatar Jun 19 '25 07:06 Dawud18854

This is fixed with 2.9.9.1

mylinuxforwork avatar Aug 27 '25 14:08 mylinuxforwork