Closed Incognitux closed 9 months ago
dunno, works for me and like everyone else. Try appending 2>&1 > ~/somelog.txt
and inspecting the logs
do that for waybar or hyprland? If hyprland how would I do so?
[LOG] Executing WAYLAND_DISPLAY=wayland-1 DISPLAY=:0 waybar
[LOG] Process Created with pid 325914
this is what the logs say but there is no process with the pid running when i cross check, so is it crashing as soon as it starts?
do that for waybar or hyprland? If hyprland how would I do so?
waybar, it's obviously crashing.
so I did
exec-once = waybar 2>&1 > ~/somelog.txt
and it outputs an empty file, does this mean it doesn't even start?
probably. If other apps in exec-once work, it's an issue with your system. (Which it seems like to me)
uh so other apps like eww (exec-once = eww daemon
), mpd(exec-once = mpd
) also don't seem to be working
try the full path to the executable. Maybe it's some strange issue with your PATH
executing in the terminal works tho I will try nonetheless
nope, did not work
I am currently experiencing this issue with only two executables. Eww (same as @Incognitux ) and gammastep. I have tried hard pathing to them and attempting to get a ouput log like exec-once = /usr/bin/eww daemon 2>&1 > ~/eww-crash.txt
and exec-once = /usr/bin/gammastep 2>&1 > ~/gammastep-crash.txt
. Neither produced and output log. @Incognitux have you tried any other executables since this post ?
uh so other apps like eww (
exec-once = eww daemon
), mpd(exec-once = mpd
) also don't seem to be working
@ModestTom I use gammastep as well and it works completely fine for me.
I have the same issue with waybar
and pkexec swhkd
. They work when executed in a shell, but not when started with exec-once
or the exec
dispatch. Other commands work fine.
There is no log output. I also tried running them in a script and dumping the environment variables beforehand; the environment variables do not differ from those in my shell (with the exception of some irrelevant ones, like LS_COLORS
).
In case it helps, I use artix linux with OpenRC (no systemd).
I have the same issue with
waybar
andpkexec swhkd
. They work when executed in a shell, but not when started withexec-once
or theexec
dispatch. Other commands work fine.There is no log output. I also tried running them in a script and dumping the environment variables beforehand; the environment variables do not differ from those in my shell (with the exception of some irrelevant ones, like
LS_COLORS
).In case it helps, I use artix linux with OpenRC (no systemd).
have you tried to echo some random texts to a file for checking if the script that you tried to put in exec-once to run waybar is getting executed? and from which part of the script the execution stops of give error?
I managed to solve the issue by running dbus-update-activation-environment --all
at startup. It seems like Hyprland won't update the dbus environment if compiled with systemd support but the system wasn't booted with systemd.
@LizzyFleckenstein03 Where did you put dbus-update-activation-environment --all
? In hyperland.config?
@LizzyFleckenstein03 Where did you put
dbus-update-activation-environment --all
? In hyperland.config?
I think he did ´´´exec-once=dbus-update-activation-environment --all´´´
@LizzyFleckenstein03 Where did you put
dbus-update-activation-environment --all
? In hyperland.config?I think he did ´´´exec-once=dbus-update-activation-environment --all´´´
This didn't work for me
I managed to solve the issue by running
dbus-update-activation-environment --all
at startup. It seems like Hyprland won't update the dbus environment if compiled with systemd support but the system wasn't booted with systemd.
doesn't work, on latest build as of posting
Any updates on this? Not being able to launch waybar is a pretty big dealbreaker for me
This issue is fixed for me after switching to arch Linux and installing this from pacman
@siddharthroy12 - hyprland
or hyprland-git
?
@hughesjs both work fine just install
hyprland-git r3004.2295bbdd-1
waybar-hyprland-git 0.9.18.r31.gd367b7e1-1
xdg-desktop-portal-hyprland-git 1:r285.4d9ff0c-1
could you please reply if you could resolve the issue, thx
Here is what I did to get Eww bar to show up. I am using the fish shell but I don't see why bash or sh wouldn't work.
hyprland.conf
, add this:
exec-once=fish ~/.config/hypr/launch-bar.fish
~/.config/hypr/launch-bar.fish
eww daemon --restart
eww open {your bar name}
chmod +x launch-bar.fish
Had the same issue with i3bar-river
. Solved by adding short pause before starting the bar: exec-once = sleep 2 && i3bar-river
did you resolve this issue?
@romanstingler unfortunately no, mentioned workarounds also didn't seem to work
Add these environment variable.
# XDG
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
# QT
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_QPA_PLATFORM=wayland;xcb # Not yet working for onlyoffice-editor
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_QPA_PLATFORMTHEME,qt6ct
# Toolkit
env = SDL_VIDEODRIVER,wayland
env = _JAVA_AWT_WM_NONEREPARENTING,1
env = CLUTTER_BACKEND,wayland
env = GDK_BACKEND,wayland,x11
Make sure to have these in top (first execution)
# Responsible for imporitng environment variable for GTK applications
exec-once = systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
Then add waybar launch command
exec-once = killall -q waybar;sleep .5 && waybar
and if on arch linux have waybar-hyprland-git
installed
reboot once to get env working and it should launch waybar as expected
@Incognitux are you starting hyprland from tty or inside tmux or from a login manager?
@romanstingler I am using a login manager, specifically GDM
Starting from TTY seems to fix the issue, can others facing the issue verify this?
Starting from TTY seems to fix the issue, can others facing the issue verify this?
I was using sddm never faced it .....
But can't say as now I just put Hyprland in ~/.zprofile
Add these environment variable.
# XDG env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland # QT env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = QT_QPA_PLATFORM=wayland;xcb # Not yet working for onlyoffice-editor env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = QT_QPA_PLATFORMTHEME,qt6ct # Toolkit env = SDL_VIDEODRIVER,wayland env = _JAVA_AWT_WM_NONEREPARENTING,1 env = CLUTTER_BACKEND,wayland env = GDK_BACKEND,wayland,x11
I'm having the same problem and I'd like to add these environment variables; however, I'm not sure where to put them. I tried putting them to my hyprland.conf
but the problem is still happening. The exec-once
is ignored and if I try to run it from the terminal I get [error] Bar need to run under Wayland
.
Thanks.
UPDATE: I reinstalled my OS (all the same config files) and waybar started working as expected.
I had the same issue of waybar not working correctly on launch. I found that it was because i wasn't running the native resolution.
Starting from TTY seems to fix the issue, can others facing the issue verify this?
I'm in the same boat as @Incognitux. I tried many different ways to spawn eww daemon
without any luck: adding &
at the end of the command; invoking a sh/bash script; inserting some sleep
s (similar to what the documentation mentions for resetting the XDG portal). I was using SDDM as my login manager but I just tested it with Ly and got the same unfortunate result. However, when I tried starting Hyprland from the terminal, the eww
daemon was running as I would expected. Really odd.
UPDATE: So, for my end, the issue seems to be only related to eww
itself. I tried to even start the daemon from a SystemD service and it was not properly working (more details later). However, I had the binary installed on a custom path (~/.local/bin/eww
) and apparently, there is some part of the daemon that expects the executable to be on the path unless you run it on a terminal emulator, at least I don't get the same issue when I started the service manually. Now, I can start it as expected suign exec-once = eww daemon
.
[!NOTE] For those who are interested in the issue I was having specifically with
eww
, continue the reading.
Although the server can start automatically when you try to open a specific window, in my case, a powermenu I was experimenting with (I don't have a bar yet), the eventbox was not working properly (maybe other widgets too). I have coded my widget to open on the active monitor (by not declaring the monitor in the yuck file and using the --screen 0
flag) and close if I move away from it or click away anywhere but the buttons displayed (by using an eventbox). However, although I could see the powermenu, these "close triggers" were not working (to be honest, I did not test the buttons themself). So, I found out that when you start the server by opening a window with the daemon not running, those features don't actually work (maybe something related to IPC?).
tl;dr: If you manually build EWW and are facing some issues, try copying the executable to a default PATh like /usr/local/bin
.
I think this problem is linked to some other autostart issues of mine. Recently, autostart broke, and applications started behaving as if I didn't use dbus-update-activation-environment
at all, showing all the symptoms thereof.
I knew that the execution order was correct, as I had experimented with that when that problem first popped up before disapapearing shortly after only to return and stay around (dbus-update-activation-environment
below GUI applications).
Any idea what else it could be?
Edit 2: Ignore what I said about it working. Apparently the environment variables set in hyprland are set for the whole system or something like that. After a reboot, everything is back to problems
I've been having a similar issue for the past couple of weeks. I'm not sure what I did but one day waybar suddenly decided to take 10s to appear every time I started Hyprland for the first time after each boot. It still appears eventually, but it takes a noticeably long time to get up and running. The weird thing is that the lag only happens the first time, if I exit Hyprland then start it again waybar starts instantaneously.
is screen recording working for any of you? OBS is either never opening or not showing the screen selector. Other screen recorders behave similarly. (I'm also getting this: UnknownMethod: No such interface "org.freedesktop.portal.ScreenCast"
)
If this is really just an environment variable issue, then this would probably be the confirmation.
is screen recording working for any of you? OBS is either never opening or not showing the screen selector. Other screen recorders behave similarly. (I'm also getting this:
UnknownMethod: No such interface "org.freedesktop.portal.ScreenCast"
)If this is really just an environment variable issue, then this would probably be the confirmation.
Also having screen recording issues. Though for me it wasn't Hyprland related since obs also stopped working for me in GNOME. "obs failed to initialize video your GPU may not be supported" or something along those lines, so in my case it was probably due to me updating my nvidia drivers.
ok this DOES seem to be an environment variable issue! first I noticed that waybar complains about the desktop portal not being initialized. Then I noticed that the nuclear option script for the hyprland destop portal uses /usr/libexec but it should be /usr/lib, and then I noticed that I was missing the sdbus-cpp
library from my system, which xdg-desktop-portal-hyprland wants! I installed that and it's now starting. It should finally be able to set the environment variables!
I'm on arch
Having the same problem for weeks on arch. Installing sdbus-cpp fixed it for me. Thanks, @UltraBlackLinux
Had somewhat similar problems. Waybar and swww didn't show visually on my desktop after starting Hyprland. Both were simply initiated with the exec-once command in my config. I assumed that the problem was the same for both programs, but while Waybar didn't start up at all, swww did start, but for some reason didn't display.
It is all currently working now after applying @niksingh710's solution, although I'm omitting the half a second sleep as that is too slow for me.
I'm writing this though, not to confirm that there is a working solution, but to introduce the idea that this might be some race condition bullshit. I have about two handfuls of exec-once statements in my config, and whether or not Wyabar and swww works depends very much on where in this order they are (even after implementing the @niksingh710's solution). Adding sleeps always fixes the problem.
Is there anyone more well versed in Hyprlands startup behavior who can point to where any asynchronous operations is happening?
I just want to comment for dummies like myself who somehow missed it - The exec-once
line in the default auto generated config file is commented out.
This is almost certainly not the reason many people in this thread are experiencing an issue, but if I stumbled across this thread before I realised, there's a chance others might too. We're all blind to the blatantly obvious sometimes, but feel free to laugh at me.
My problem was with the dsplog library and waybar, what I did... install a downgrade
library pacman, apt, whatever you use to spdlog=1.12.0, then install waybar-git, that fixed for me
I think this can be closed as it's turned into a fiesta of people with broken waybars.
Добавьте эту переменную среды.
# XDG env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland # QT env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = QT_QPA_PLATFORM=wayland;xcb # Not yet working for onlyoffice-editor env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = QT_QPA_PLATFORMTHEME,qt6ct # Toolkit env = SDL_VIDEODRIVER,wayland env = _JAVA_AWT_WM_NONEREPARENTING,1 env = CLUTTER_BACKEND,wayland env = GDK_BACKEND,wayland,x11
У меня та же проблема, и я хотел бы добавить эти переменные среды; однако я не уверен, куда их поместить. Я попробовал поместить их в свой
hyprland.conf
но проблема все еще происходит.exec-once
игнорируется, и если я попытаюсь запустить его с терминала, я получу[error] Bar need to run under Wayland
.Спасибо.
ОБНОВЛЕНИЕ: Я переустановил свою ОС (все те же файлы конфигурации), и панель навигации начала работать как положено.
Settings were not changed during installstion?
Maybe try install pipewire first. I solve this problem by installing the pipewire, then the waybar
can be shown after that.
Steps to reproduce
Example configuration:
Expected outcome
Noted outcome
Additional info
Hyprland
in the terminal)Configuration file