hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.48k stars 769 forks source link

`exec-once` creates zombie processes #6739

Open linde12 opened 3 weeks ago

linde12 commented 3 weeks ago

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 918d8340afd652b011b937d29d5eea0be08467f5 (flake.lock: update). Date: Tue Jun 25 12:06:02 2024 Tag: v0.41.2, commits: 4886 flags: (if any) System Information: System name: Linux Node name: work Release: 6.6.32_1 Version: #1 SMP PREEMPT_DYNAMIC Tue May 28 23:00:20 UTC 2024 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] [8086:3ea0] (rev 02) (prog-if 00 [VGA controller]) os-release: NAME="Void" ID="void" PRETTY_NAME="Void Linux" HOME_URL="https://voidlinux.org/" DOCUMENTATION_URL="https://docs.voidlinux.org/" LOGO="void-logo" ANSI_COLOR="0;38;2;71;128;97" DISTRIB_ID="void" plugins: ======Config-Start====== Config File: /home/olinde/.config/hypr/hyprland.conf: Read Succeeded ################ ### MONITORS ### ################ # See https://wiki.hyprland.org/Configuring/Monitors/ # monitor=,preferred,auto,auto #monitor=,preferred,auto,auto,mirror,DP-2 ################### ### MY PROGRAMS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use $terminal = alacritty $browser = firefox $menu = wofi --show drun ################# ### AUTOSTART ### ################# # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: exec-once = pipewire exec-once = nm-applet exec-once = blueman-applet exec-once = sleep 3 && waybar exec-once = swww init exec-once = $HOME/.config/river/cycle-wallpaper exec-once = swaync ############################# ### ENVIRONMENT VARIABLES ### ############################# # See https://wiki.hyprland.org/Configuring/Environment-variables/ env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 ##################### ### LOOK AND FEEL ### ##################### # Refer to https://wiki.hyprland.org/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 5 gaps_out = 10 border_size = 2 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = false # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false layout = master } # # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { rounding = 10 # Change transparency of focused and unfocused windows active_opacity = 1.0 inactive_opacity = 1.0 drop_shadow = true shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) # https://wiki.hyprland.org/Configuring/Variables/#blur blur { enabled = true size = 3 passes = 1 vibrancy = 0.1696 } } # https://wiki.hyprland.org/Configuring/Variables/#animations animations { enabled = true # Faster default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 3, myBezier animation = windowsOut, 1, 3, default, popin 80% animation = border, 1, 6, default animation = borderangle, 1, 4, default animation = fade, 1, 3, default animation = workspaces, 1, 2, default } # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more master { new_status = slave } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( } ############# ### INPUT ### ############# # https://wiki.hyprland.org/Configuring/Variables/#input input { repeat_delay = 250 repeat_rate = 50 accel_profile = flat kb_layout = us,se kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 1 sensitivity = 0 # -1.0 - 1.0, 0 means no modification. touchpad { natural_scroll = false } } ################### ### KEYBINDINGS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ $mod = SUPER # Sets "Windows" key as main modifier # General bind = $mod SHIFT, Return, exec, $terminal bind = $mod, Q, killactive, bind = $mod SHIFT, E, exec, hyprctl dispatch exit bind = $mod, Z, togglefloating, bind = $mod, P, exec, $menu bind = $mod SHIFT, P, exec, $browser bind = $mod, F, fullscreen bind = $mod, Space, exec, hyprctl switchxkblayout at-translated-set-2-keyboard next bind = $mod, W, exec, $HOME/.config/river/cycle-wallpaper # Move focus with mod + jk bind = $mod, j, layoutmsg, cyclenext bind = $mod, k, layoutmsg, cycleprev # Swap windows with mod + SHIFT + jk bind = $mod SHIFT, j, layoutmsg, swapnext bind = $mod SHIFT, k, layoutmsg, swapprev # Resize with mod + hl bind = $mod, h, layoutmsg, mfact -0.05 bind = $mod, l, layoutmsg, mfact +0.05 # Switch workspaces with mod + [0-9] bind = $mod, Tab, workspace, previous bind = $mod, 1, workspace, 1 bind = $mod, 2, workspace, 2 bind = $mod, 3, workspace, 3 bind = $mod, 4, workspace, 4 bind = $mod, 5, workspace, 5 bind = $mod, 6, workspace, 6 bind = $mod, 7, workspace, 7 bind = $mod, 8, workspace, 8 bind = $mod, 9, workspace, 9 # Move active window to a workspace with mod + SHIFT + [0-9] bind = $mod SHIFT, 1, movetoworkspacesilent, 1 bind = $mod SHIFT, 2, movetoworkspacesilent, 2 bind = $mod SHIFT, 3, movetoworkspacesilent, 3 bind = $mod SHIFT, 4, movetoworkspacesilent, 4 bind = $mod SHIFT, 5, movetoworkspacesilent, 5 bind = $mod SHIFT, 6, movetoworkspacesilent, 6 bind = $mod SHIFT, 7, movetoworkspacesilent, 7 bind = $mod SHIFT, 8, movetoworkspacesilent, 8 bind = $mod SHIFT, 9, movetoworkspacesilent, 9 # Example special workspace (scratchpad) bind = $mod, S, togglespecialworkspace, magic bind = $mod SHIFT, S, movetoworkspace, special:magic # Move/resize windows with mod + LMB/RMB and dragging bindm = $mod, mouse:272, movewindow bindm = $mod, mouse:273, resizewindow ############################## ### WINDOWS AND WORKSPACES ### ############################## # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. xwayland { force_zero_scaling = true } # persistent workspaces still terribly buggy, but this is the least crappy config for now workspace=1,monitor:DP-2,persistent:true workspace=2,monitor:DP-2,persistent:true workspace=3,monitor:DP-2,persistent:true workspace=4,monitor:DP-2,persistent:true workspace=5,monitor:DP-2,persistent:true workspace=6,monitor:eDP-1,persistent:true workspace=7,monitor:eDP-1,persistent:true workspace=8,monitor:eDP-1,persistent:true workspace=9,monitor:eDP-1,persistent:true ======Config-End======== ```

Description

I am running Hyprland without and login manager (directly from console) using this little script:

#!/bin/bash
exec dbus-run-session Hyprland

This is fine, but once i exit hyperland (e.g. to start river, awesomeWM or any other WM i have) i notice that the processes started with exec-once, or any other applications run within Hyprland (e.g. nvim) for that matter, are killed. So i am left with a whole bunch of zombie processes that i have to manually kill.

Expected behavior is obviously spawning the processes as children and having them killed when Hyprland is exited.

How to reproduce

  1. Have some exec-once statements that run long-lived processes, e.g. pipewire
  2. Run Hyprland
  3. Exit Hyprland (e.g. with hyperctl dispatch exit)
  4. ps aux | grep pipewire - still running

You can also open e.g. a terminal with vim or whatever and see that this will also be left behind as a zombie process.

Crash reports, logs, images, videos

No response

K4R7IK commented 3 weeks ago

Please check if pipewire is starting during boot or not. I checked, but pipewire process starts during boot only. As for exec-once, I have only this process.

# Responsible for imporitng environment variable for GTK applications
exec-once = dbus-update-activation-environment --systemd --all
exec-once = systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP WAYLAND_DISPLAY DISPLAY QT_QPA_PLATFORMTHEME XDG_CONFIG_HOME

# Application/Tools to be started after logging in
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = waybar &>$HOME/Documents/waybar.log
exec-once = mako
exec-once = swww-daemon
exec-once = cliphist
exec-once = telegram-desktop
exec-once = hypridle

# Making cliphist to keep context of what it copies.
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
exec-once = wl-paste --type application/pdf --watch cliphist store

All of them closed after hyprctl dispatch exit.