mylinuxforwork / dotfiles

The ML4W Dotfiles for Hyprland - An advanced and full-featured configuration for the dynamic tiling window manager Hyprland including an easy to use installation script for Arch based Linux distributions.
GNU General Public License v3.0
437 stars 46 forks source link

[BUG] Waybar does not start in 2nd session in between boots on tty #19

Closed eljejer closed 3 weeks ago

eljejer commented 1 month ago

Describe the bug I start Hyprland from tty after login (no display-manager active). When I exit the Hyprland session returning to the prompt and start Hyprland once more, waybar is not shown.

To Reproduce Steps to reproduce the behavior:

  1. reboot PC
  2. login from tty (not display-manager)
  3. execute 'Hyperland'
  4. waybar is displayed
  5. exit Hyprland
  6. execute 'Hyprland' --> waybar is not displayed

Expected behavior Waybar display

Screenshots n/a

Distribution (please complete the following information):

Additional context Originally mentioned in this post

Ahorts commented 1 month ago

Yeah. Sometimes I also experience this with a restart. I did a re-installation it I think it is fixed. Still testing. Try that.

mylinuxforwork commented 1 month ago

Have you tried this? https://github.com/mylinuxforwork/dotfiles/wiki/Troubleshooting#waybar-is-not-loading

eljejer commented 1 month ago

Have you tried this? https://github.com/mylinuxforwork/dotfiles/wiki/Troubleshooting#waybar-is-not-loading

Yes, I looked into that suggestion, but the procedure here implies a reboot. And the problem does not occur after a reboot. Only in between reboots

eljejer commented 1 month ago

Yeah. Sometimes I also experience this with a restart. I did a re-installation it I think it is fixed. Still testing. Try that.

I re-installed also, but the issue remains

mylinuxforwork commented 1 month ago

@eljejer I was able to replicate the issue in VM based on EndeavourOS.

From sddm I switched to tty and started Hyprland with the Hyprland command. Waybar loaded up. Then I exit Hyprland and restarted again with Hyprland command. Waybar is not loading. When I launch ~/dotfiles/waybar/launch.sh it triggers a xdg-desktop-portal timeout issue

I have deinstalled xdg-desktop-portal-gtk with sudo pacman -R xdg-desktop-portal-gtk. Exit Hyprland Start Hyprland again and waybar is back Exit Hyprland Start Hyprland and waybar is back again.

Seams that fixed it with a side effect, that teh dark theme is lost on nautilus.

Can you try to replicate it based on the steps above.

mylinuxforwork commented 1 month ago

https://discourse.gnome.org/t/using-adwaita-dark-on-another-compositor/17563/10

eljejer commented 1 month ago

@eljejer I was able to replicate the issue in VM based on EndeavourOS.

From sddm I switched to tty and started Hyprland with the Hyprland command. Waybar loaded up. Then I exit Hyprland and restarted again with Hyprland command. Waybar is not loading. When I launch ~/dotfiles/waybar/launch.sh it triggers a xdg-desktop-portal timeout issue

I have deinstalled xdg-desktop-portal-gtk with sudo pacman -R xdg-desktop-portal-gtk. Exit Hyprland Start Hyprland again and waybar is back Exit Hyprland Start Hyprland and waybar is back again.

Seams that fixed it with a side effect, that teh dark theme is lost on nautilus.

Can you try to replicate it based on the steps above.

I can confirm: what you experience, I experience as well.

eljejer commented 1 month ago

https://discourse.gnome.org/t/using-adwaita-dark-on-another-compositor/17563/10

@mylinuxforwork After uninstalling xdg-desktop-portal-gtk and testing as per your suggestion, I re-installed xdg-desktop-portal-gtk and altered ~/dotfiles/hypr/hyprland.conf as described in this post ;

commented line exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP and added line exec-once = dbus-update-activation-environment --systemd --all

Now I can both restart Hyprland in between boots without Waybar issue AND the right theme is applied in nautilus.

I'm not sure if the issue is resolved with this and could be closed maybe?

mylinuxforwork commented 1 month ago

This is great. Maybe finally the solution for this effect. Let me test tomorrow and then we can close. Thanks again.

mylinuxforwork commented 1 month ago

@eljejer It is still not working in my VM. Firstg launch without any trouble. With the second launch of Hyprland I have again the delay between the launch and that Waybar appears. It feels that the delay is shorter but still there. No issues with sddm.

How's your impression today on with your system?

eljejer commented 1 month ago

@eljejer It is still not working in my VM. Firstg launch without any trouble. With the second launch of Hyprland I have again the delay between the launch and that Waybar appears. It feels that the delay is shorter but still there. No issues with sddm.

How's your impression today on with your system?

@mylinuxforwork Contrary to my earlier experience yesterday, just now I re-started Hyprland in between boots, and now Waybar is not started with me as well. I will keep an eye on it and keep you posted

@mylinuxforwork edit: also some other error I cannot (yet) explain: I start Hyprland from shell script ~/hyprstart.sh:

`> cat hyprstart.sh

!/bin/bash

exec Hyprland >/dev/stderr 2>&1 > stdouterr.txt

~

Just now I got an error /dev/stderr: permissiopn denied when executing this script. I do a reboot to prevent this error

mylinuxforwork commented 1 month ago

Can you check this as well? https://github.com/Alexays/Waybar/discussions/1828#discussioncomment-10126615

eljejer commented 1 month ago

Can you check this as well? Alexays/Waybar#1828 (comment)

@mylinuxforwork As my setup has changed today, I cannot really comment on the original problem anymore:;I wiped my boot disk and installed CachyOS with Hyprland. So no Linux desktop environment anymore, which was KDE Plasma earlier. At the moment I logon with display manger and in this setup Waybar does start on the 2nd session in between boots. I will deactivate DM and try tty in stead and see what happens

eljejer commented 1 month ago

Can you check this as well? Alexays/Waybar#1828 (comment)

@mylinuxforwork I have disabled the display manager and start Hyprland from tty again. In this setup, so without the packages for a Linux desktop as I had before (KDE Plasma), starting a 2nd session in between reboots is again failing to start Waybar. I will investigate further as per the link you provided and report back later

eljejer commented 1 month ago

Can you check this as well? Alexays/Waybar#1828 (comment)

@mylinuxforwork After deactivating display manager and starting Hyprland from tty, I can confirm that Waybar is not activated on 2nd session in between logins. Also in my new setup. Then I have altered ~/dotfiles/waybar/launch.sh by adding the following right before the last line where waybar is started:

dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

I'm however not completely sure if this is what you meant by "can you check this as well? https://github.com/Alexays/Waybar/discussions/1828#discussioncomment-10126615"

Anyway, this change did not result in the display of the waybar in the 2nd session.

mylinuxforwork commented 1 month ago

This issue is really tricky. Crazy that the issue not exists when using sddm. Only tty.

kerbyyy commented 1 month ago

@mylinuxforwork I'm having this issue yesterday and today. Now it's even worse because Waybar does not load any more even after reboot. I've tried everything, from reinstalling the dotfiles to uninstalling it and installing it again. None worked.

Also, when I try to load Waybar manually via terminal, it just loads the default Waybar.

mylinuxforwork commented 1 month ago

Have you tried to uninstall xdg-desktop-portal-gtk?

https://github.com/mylinuxforwork/dotfiles/wiki/Troubleshooting#waybar-is-not-loading

kerbyyy commented 1 month ago

let me try this, thanks!

kerbyyy commented 1 month ago

Hi @mylinuxforwork, I did the troubleshooting guide twice to no avail. I'm gonna try uninstalling the dotfiles, then reinstall it with sddm, im gonna see if that changes something

mylinuxforwork commented 1 month ago

@kerbyyy And updates?