Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't interact with hyprlock after login #7391

Closed
alba4k opened this issue Aug 18, 2024 · 14 comments · Fixed by #7647
Closed

Can't interact with hyprlock after login #7391

alba4k opened this issue Aug 18, 2024 · 14 comments · Fixed by #7647
Labels
bug Something isn't working

Comments

@alba4k
Copy link
Contributor

alba4k commented Aug 18, 2024

Regression?

Yes

System Info and Version

System/Version info
Hyprland, built from branch  at commit 4fdc0d55e4b44bb5300679025d2378fb6de0cae4  (eventloop: don't dispatch in enterLoop).
Date: Sat Aug 10 00:04:26 2024
Tag: v0.42.0-5-g4fdc0d55, commits: 5074

flags: (if any)


System Information:
System name: Linux
Node name: dell-xps
Release: 6.6.46-1.1-lts
Version: #1 SMP PREEMPT_DYNAMIC Thu, 15 Aug 2024 06:40:55 +0000


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] [8086:46a6] (rev 0c) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

======Config-Start======


Config File: /home/alba4k/.config/hypr/hyprland.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# Dependencies:
#
#  System Tray:
#   - blueman (bluetooth manager)
#   - nm-applet (network manager)
#   - kdeconnect (phone - computer interface)
#
#  Stuff I use:
#   - custom scripts and sounds
#   - i3-battery-popup (battery warning)
#   - waybar (bar)
#   - dunst (notifications)
#   - rofi (Launcher)
#   - libinput-gestures (trackpad gestures)
#   - hyprpaper (background)
#   - lxsession (policy kit)
#   - wl-clip-persist (persistent clipboard)
#   - wlogout (logout menu)
#   - cliphist (clipboard manager)
#   - flameshot (screenshots)
#   - grimblast (screenshots but working)
#   - hypridle (session management)
#   - hyprlock (lockscreen)
#   - xwaylandvideobridge (currently disabled, screensharing) 
#
#  Keybinds:
#   - pactl (volume control)
#   - light (brightness)
#   - playerctl (media controls)
#   - emote (emoji selector)
#   - systemd (poweroff, suspend, ...)

# ##############################################
# ###                 COLORS                 ###
# ##############################################

source = ~/.config/hypr/include/colors.conf

# ##############################################
# ###                 PLUGINS                ###
# ##############################################

source = ~/.config/hypr/hyprland/plugins.conf
# ##############################################
# ###               BASIC SETUP              ###
# ##############################################

source = ~/.config/hypr/hyprland/basic.conf

# ##############################################
# ###                AUTOSTART               ###
# ##############################################

source = ~/.config/hypr/hyprland/autostart.conf

# ##############################################
# ###              ENVIRONNMENT              ###
# ##############################################

source = ~/.config/hypr/hyprland/environnment.conf

# ##############################################
# ###                  SETUP                 ###
# ##############################################

source = ~/.config/hypr/hyprland/setup.conf

# ##############################################
# ###               ANIMATIONS               ###
# ##############################################

source = ~/.config/hypr/hyprland/animations.conf

# ##############################################
# ###     WINDOW AND WORKSPACE MANAGMENT     ###
# ##############################################

source = ~/.config/hypr/hyprland/management.conf

# ##############################################
# ###                KEYBINDS                ###
# ##############################################

source = ~/.config/hypr/hyprland/keybinds.conf

# ##############################################
# ###               WINDOWRULES              ###
# ##############################################

source = ~/.config/hypr/hyprland/windowrules.conf



Config File: /home/alba4k/.config/hypr/include/colors.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###                 COLORS                 ###
# ##############################################

# Only used for accents (light purple)
$C_PRIMARY = rgb(8957b0)
$C_PRIMARY_DARK = rgb(7949d8)

# Inactive borders
$C_INACTIVE = rgba(6e73b090)

# Background objects
$C_BACKGROUND = rgb(1e1e2e)

# Text
$C_FOREGROUND = rgb(cba6f7)
$C_PALE_FOREGROUND = rgb(5b6997)


Config File: /home/alba4k/.config/hypr/hyprland/plugins.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###                PLUGINS                 ###
# ##############################################

# Loading them may help lol
exec-once = hyprpm -n reload

# Hyprexpo
# https://github.com/hyprwm/hyprland-plugins/tree/main/hyprexpo

# Open Hyprexpo using a keybing
# hyprlang noerror true
 bind = SUPER, W, hyprexpo:expo, toggle
# hyprlang noerror false

plugin {
    hyprexpo {
        columns = 3
        gap_size = 0
        bg_col = $C_BACKGROUND
        workspace_method = first 1

        enable_gesture = true
        gesture_distance = 300
        gesture_positive = false
    }
}



Config File: /home/alba4k/.config/hypr/hyprland/basic.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###              BASIC SETUP               ###
# ##############################################

input {
    kb_layout = ch
    kb_variant = de
    kb_options = caps:escape

    numlock_by_default = true

    follow_mouse = true

    natural_scroll = false

    sensitivity = -0.3

    touchpad {
        disable_while_typing = false
        natural_scroll = true
    }
}

xwayland {
    force_zero_scaling = true
}

debug {
    # overlay = true
    disable_logs = false
    enable_stdout_logs = true
}



Config File: /home/alba4k/.config/hypr/hyprland/autostart.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###               AUTOSTART                ###
# ##############################################

# Login manager
exec-once = hyprlock -c ~/.config/hypr/hyprlock/hyprlogin.conf || hyprctl dispatch exit

# Bar
# exec = killall -9 waybar; waybar
# Can also be started by systemd (systemctl)
exec = pidof waybar || waybar && pkill -SIGUSR2 waybar

# Just in case I might get them to autoconnect
exec = bluetoothctl connect 18:26:54:3C:0F:AD # Galaxy S23
exec = bluetoothctl connect 80:9F:F5:BF:C4:80 # Galaxy Buds Pro

# Keyboard backlight
exec = sudo /usr/bin/g413-led -a 770000

# Background (different config, ~/.config/hypr/hyprpaper.conf)
exec-once = hyprpaper

# Starting dunst (different config, can be started automatically by d-bus)
 exec-once = dunst

# PolKit Agent
exec-once = lxpolkit

# Cliphist
# exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --watch cliphist store

# Daemons
exec-once = thunar --daemon
exec = flameshot
exec-once = kdeconnect-indicator
exec-once = ~/.config/hypr/scripts/volbright.sh --brightness --keyboard --volume
exec-once = ~/.config/hypr/scripts/ac_detect.sh
exec-once = i3-battery-popup -n -D -L 20 -m 'Battery is getting low!' -t 3m -s ~/.config/hypr/click.ogg -v 50
exec-once = emote

# System Tray stuff used in waybar
exec-once = nm-applet
# exec-once = blueman-applet

# Clipboard manager
exec-once = wl-clip-persist -c both

# Manage logind events
# Can also be started by systemd (systemctl)
exec = killall hypridle; hypridle --quiet

# XDG Desktop Portal workarounds (QT Style, Restart)
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME
#exec-once = sleep 2 && ~/.config/hypr/scripts/xdg-desktop-portal.sh

# XWayland Video Bridge
# While this may be useful, I keep it disabled because it keeps a window in the 1st workspace.
#exec-once = xwaylandvideobridge


Config File: /home/alba4k/.config/hypr/hyprland/environnment.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###              ENVIRONNMENT              ###
# ##############################################

# https://wiki.hyprland.org/Configuring/Environment-variables

# XDG session info
env = XDG_CURRENT_DESKTOP, Hyprland
env = XDG_DESKTOP_SESSION, Hyprland
env = XDG_SESSION_TYPE, wayland
env = XDG_SESSION_DESKTOP, Hyprland

# Explicitly set some dirs, just in case
env = XDG_CONFIG_HOME, /home/alba4k/.config
env = XDG_CACHE_HOME, /home/alba4k/.cache
env = XDG_DATA_HOME, /home/alba4k/.local/share

# Qt
env = QT_QPA_PLATFORMTHEME, qt5ct
env = QT_QPA_PLATFORM, wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1

# Other platforms
env = GDK_BACKEND, wayland,x11
env = SDL_VIDEODRIVER, wayland,x11,windows
env = CLUTTER_BACKEND, wayland
# env = GTK_THEME, Catppuccin-purple
env = ELECTRON_OZONE_PLATFORM_HINT, wayland

# Random stuff
env = MAKEFLAGS, -j14
env = MANPAGER, bat -pl man
env = SSH_AUTH_SOCK, /run/user/1000/ssh-agent.socket



Config File: /home/alba4k/.config/hypr/hyprland/setup.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###                 SETUP                  ###
# ##############################################

# Monitor configuration (The random numbers are for 1920x1080@72, and my monitors appear as DP-[6,9] after hibernating instead of DP-[5,7])
#monitor = eDP-1, modeline 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync, 0x0, 1
#monitor = DP-5, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 0x0, 1
#monitor = DP-6, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 0x0, 1
#monitor = DP-7, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 1920x0, 1
#monitor = DP-9, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 1920x0, 1
monitor = DP-5, 1920x1080@60, 0x0, 1
monitor = DP-6, 1920x1080@60, 0x0, 1
monitor = DP-7, 1920x1080@60, 1920x0, 1
monitor = DP-9, 1920x1080@60, 1920x0, 1
exec = hyprctl monitors all | grep "DP-5\|DP-6" && hyprctl keyword monitor "eDP-1, disabled" || hyprctl keyword monitor "eDP-1, 1920x1200, 0x0, 1"
monitor = , preferred, auto, 1

bind = SUPERCTRL, X, exec, hyprctl keyword monitor eDP-1,1920x1200@60,0x0,1
#exec-once = kanshi
#exec = ~/.screenlayout/W-auto.sh

# Hyprland settings
general {
    gaps_in = 5
    gaps_out = 10
    border_size = 5
    col.active_border = $C_PRIMARY $C_PRIMARY_DARK 0deg
    col.inactive_border = $C_INACTIVE

    resize_on_border = true

    allow_tearing = false # Ty Intel, https://wiki.hyprland.org/Configuring/Tearing/#apps-that-should-tear-freeze
}

gestures {
    workspace_swipe = true
    workspace_swipe_fingers = 3

    workspace_swipe_create_new = true
    workspace_swipe_forever = true
    workspace_swipe_direction_lock = false
}
exec-once = libinput-gestures

# Window decorations
decoration {
    rounding = 12

    active_opacity = 1
    inactive_opacity = 0.8
    fullscreen_opacity = 1
    
    blur {
        enabled = true
        size = 5
        passes = 3
        ignore_opacity = true
    }

    drop_shadow = true
}

misc {
    disable_hyprland_logo = true
    disable_splash_rendering = false

    disable_autoreload = false # hyprctl reload to manually reload

    animate_manual_resizes = true
    animate_mouse_windowdragging = true

    mouse_move_enables_dpms = true
    key_press_enables_dpms = true

    initial_workspace_tracking = 0

    enable_swallow = true
    swallow_regex = kitty

    vfr = true
    vrr = true

    allow_session_lock_restore = true
}

# Session management
bind = SUPERSHIFT, Q, exit,
bind = SUPERSHIFT, R, exec, hyprctl reload && hyprctl notify 1 2000 0 "fontsize:17 Configurazione ricaricata!"
bind = SUPERCTRL, L, exec, loginctl lock-session
bind = SUPERCTRL, K, exec, loginctl lock-session && systemctl suspend

# I have a custom macro for it on my laptop so why not use it :)
# https://bit.ly/3NMpzlK (Fn+F9)
bindl = SUPER, P, exec, systemctl suspend-then-hibernate


Config File: /home/alba4k/.config/hypr/hyprland/animations.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###               ANIMATIONS               ###
# ##############################################

animations {
    enabled = true
}

# Rotating border gradient
bezier = linear, 0.0, 0.0, 1.0, 1.0
animation = borderangle, 1, 100, linear, loop

# Default animations
animation = windows, 1, 7, default
animation = workspaces, 1, 6, default, slide
#animation = workspaces, 1, 6, default, slidevert

# Windowrules
windowrule = animation slide, Lxpolkit
windowrulev2 = animation slide, class:(flameshot), title:(flameshot)
windowrulev2 = animation slide, class:(org.telegram.desktop), title:(Visualizzatore multimediale)

# Layerrules
layerrule = animation slide, notifications
layerrule = animation popin, rofi
layerrule = animation slide, waybar
layerrule = animation slide, logout_dialog



Config File: /home/alba4k/.config/hypr/hyprland/management.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###     WINDOW AND WORKSPACE MANAGMENT     ###
# ##############################################

# Workspace-related keybinds
binds {
    workspace_back_and_forth = true
    allow_workspace_cycles = true
    movefocus_cycles_fullscreen = false
}

bind = SUPER, Q, killactive,

bind = SUPER, F, fullscreen, 0
bind = SUPERSHIFT, F, togglefloating,

# Moving windows with the mouse
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow

# Moving window focus
bind = SUPER, left, movefocus, l
bind = SUPER, right, movefocus, r
bind = SUPER, up, movefocus, u
bind = SUPER, down, movefocus, d
bind = SUPER, H, movefocus, l
bind = SUPER, L, movefocus, r
bind = SUPER, K, movefocus, 
bind = SUPER, J, movefocus, d

# Moving windows
bind = SUPERSHIFT, left, movewindow, l
bind = SUPERSHIFT, right, movewindow, r
bind = SUPERSHIFT, up, movewindow, u
bind = SUPERSHIFT, down, movewindow, d
bind = SUPERSHIFT, H, movewindow, l
bind = SUPERSHIFT, L, movewindow, r
bind = SUPERSHIFT, K, movewindow, u
bind = SUPERSHIFT, J, movewindow, d

# Resizing windows
bind = SUPERALT, H, resizeactive, -50 0
bind = SUPERALT, L, resizeactive, 50 0
bind = SUPERALT, J, resizeactive, 0 50
bind = SUPERALT, K, resizeactive, 0 -50
bind = SUPERALT, left, resizeactive, -50 0
bind = SUPERALT, right, resizeactive, 50 0
bind = SUPERALT, down, resizeactive, 0 50
bind = SUPERALT, up, resizeactive, 0 -50

bind = SUPER, R, exec, ~/.config/hypr/scripts/resize.sh

# Switching workspaces
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER, 6, workspace, 6
bind = SUPER, 7, workspace, 7
bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9
# bind = SUPER, 0, workspace, 10

# Moving window to workspace
bind = SUPERSHIFT, 1, movetoworkspace, 1
bind = SUPERSHIFT, 2, movetoworkspace, 2
bind = SUPERSHIFT, 3, movetoworkspace, 3
bind = SUPERSHIFT, 4, movetoworkspace, 4
bind = SUPERSHIFT, 5, movetoworkspace, 5
bind = SUPERSHIFT, 6, movetoworkspace, 6
bind = SUPERSHIFT, 7, movetoworkspace, 7
bind = SUPERSHIFT, 8, movetoworkspace, 8
bind = SUPERSHIFT, 9, movetoworkspace, 9
# bind = SUPERSHIFT, 0, movetoworkspace, 10

# Windowrules
# windowrule = workspace 3, org.telegram.desktop
windowrule = workspace 3, discord
#windowrule = workspace 4, code-oss
windowrulev2 = workspace 5, title:(Spotify Premium)


Config File: /home/alba4k/.config/hypr/hyprland/keybinds.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###                KEYBINDS                ###
# ##############################################

# Actions on lid switch (cause logind only sometimes works
bindl = , switch:on:Lid Switch, exec, systemctl suspend-then-hibernate

# Opening a terminal
bind = SUPER, return, exec, kitty --title Kitty
bind = SUPER, T, exec, kitty --title Kitty

# Just QOL lol
bind = SUPER, B, exec, buds

# Power manager
bind = SUPER, backspace, exec, pidof wlogout || wlogout

# Brightness
bindlei = , XF86MonBrightnessUp, exec, fish -c "for i in (seq 50); light -A .1; end; sleep .1; light -G"
bindlei = , XF86MonBrightnessDown, exec, fish -c "for i in (seq 50); light -U .1; end; sleep .1; light -G"

# Media
bindli = , XF86AudioPlay, exec, playerctl play-pause
bindli = , XF86AudioPause, exec, playerctl play-pause
bindli = , XF86AudioNext, exec, playerctl next
bindli = , XF86AudioPrev, exec, playerctl previous

# Volume
bindlei = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +10% && pactl set-sink-mute @DEFAULT_SINK@ 0 && paplay --volume 65536 ~/.config/hypr/assets/click.ogg
bindlei = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -10% && pactl set-sink-mute @DEFAULT_SINK@ 0 && paplay --volume 65536 ~/.config/hypr/assets/click.ogg
bindli = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle && paplay --volume 65536 ~/.config/hypr/assets/click.ogg
bindli = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle

# Rofi
bind = SUPER, D, exec, rofi -show drun 
# bindr = SUPER,Super_L,exec, rofi -show drun
bind = SUPER, C, exec, rofi -show calc
bind = SUPERSHIFT, D, exec, rofi -show run
bind = SUPER, V, exec, ~/.config/rofi/clipboard.sh | rofi -dmenu -display-columns 2 -p " Appunti" | cliphist decode | wl-copy
bind = SUPERSHIFT, V, exec, cliphist wipe

# 💀💀💀
bind = SUPER, period, exec, emote

# Half grimblast half flameshot baucase flameshot is so much better but sometimes breaks (https://github.com/flameshot-org/flameshot/issues/2978)
bind = SUPERSHIFT, S, exec, flameshot gui 2>&1 | grep aborted || hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bind = SUPERSHIFTCTRL, S, exec, grimblast --freeze copy area && hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bindl = , Print, exec, grimblast --cursor copy output && hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bindl = SHIFT, Print, exec, grimblast --cursor copy screen && hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bindl = CTRL, Print, exec, grimblast --cursor copy screen && hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bind = SUPER, Print, exec, flameshot launcher

# Moving workspaces around
bind = SUPER, X, exec, /home/alba4k/.config/hypr/scripts/movetomonitor.sh
bind = SUPERSHIFT, X, exec, /home/alba4k/.config/hypr/scripts/movetomonitor.sh



Config File: /home/alba4k/.config/hypr/hyprland/windowrules.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###               WINDOWRULES              ###
# ##############################################

# Disable idle when there's a fullscreen window
# windowrulev2 = idleinhibit fullscreen, title:.*

# Random apps that I want to float
windowrule = float, seahorse
windowrule = float, qalculate-gtk
windowrule = float, org.prismlauncher.PrismLauncher
windowrule = float, onedriver-launcher
windowrule = float, org.kde.kdeconnect.handler
windowrule = float, python3
#windowrule = float, Bitwarden

# Random apps that I DON'T want to float
windowrule = tile, discord
windowrule = tile, ONLYOFFICE Desktop Editors

# Games
windowrule = tile, hollow_knight.x86_64
windowrule = tile, hexceed
windowrule = tile, steam_app_271590 # GTA V
windowrule = tile, steam_app_312520 # Rain World
#windowrule = tile, steam_app_322170 # Geometry Dash
windowrule = tile, steam_app_387290 # Ori And The Blind Forest: Definitive Edition
windowrule = tile, steam_app_1172620 # Sea of Thieves
# windowrule = tile, Minecraft.*

# Border correction - Windows with rounded corners that don't match mine
windowrule = rounding 15, Rofi # (For default Rofi)

# Settings
windowrule = float, pavucontrol
windowrule = float, blueman-manager
windowrule = float, system-config-printer
windowrule = float, cpupower-gui

# Flameshot
windowrulev2 = suppressevent fullscreen, class:(flameshot), title:(flameshot)
windowrulev2 = rounding 0, class:(flameshot), title:(flameshot)
windowrulev2 = noborder, class:(flameshot), title:(flameshot)
#windowrulev2 = monitor DP-5, class:(flameshot), title:(flameshot)
#windowrulev2 = monitor DP-6, class:(flameshot), title:(flameshot)
windowrulev2 = float, class:(flameshot), title:(flameshot)
windowrulev2 = fullscreenstate, class:(flameshot), title:(flameshot)
windowrulev2 = move 0 0, class:(flameshot), title:(flameshot)
windowrulev2 = stayfocused, class:(flameshot), title:(flameshot)
windowrulev2 = size 3840 1200, class:(flameshot), title:(flameshot)
windowrulev2 = float, class:(flameshot), title:(Upload image)
windowrulev2 = float, class:(flameshot), title:(Configuration)
windowrulev2 = float, class:(flameshot), title:(Capture Launcher)
windowrulev2 = float, class:(flameshot), title:(Save screenshot)

# Firefox stuff
windowrulev2 = float, class:(firefox), title:(Picture-in-Picture)
windowrulev2 = keepaspectratio, class:(firefox), title:(Picture-in-Picture)
windowrulev2 = float, class:(firefox), title:(Bitwarden Password Manager)

# Emote (closes when it loses focus)
windowrule = stayfocused, emote

# Various authentication stuff
windowrule = stayfocused, Lxpolkit
windowrulev2 = move 634 120, class:(Lxpolkit), title:(Autenticazione)
windowrulev2 = move 830 189, class:(Lxpolkit), title:(Informazione)
windowrulev2 = move 809 189, class:(Lxpolkit), title:(Errore)
windowrulev2 = stayfocused, class:(nm-applet), title:(Richiesta autenticazione rete Wi-Fi)

# XWayland Video Bridge (https://wiki.hyprland.org/Useful-Utilities/Screen-Sharing)
windowrule = opacity 0.0 override 0.0 override, xwaylandvideobridge
windowrule = noanim, xwaylandvideobridge
windowrule = noinitialfocus, xwaylandvideobridge
windowrule = maxsize 1 1, xwaylandvideobridge
windowrule = noblur, xwaylandvideobridge

# Rofi (official client)
# windowrule = stayfocused, Rofi

# Bugged telegram media viewer
windowrulev2 = fullscreen, class:(org.telegram.desktop), title:(Visualizzatore multimediale)
windowrulev2 = float, class:(org.telegram.desktop), title:(Visualizzatore multimediale)

# LAYERRULES

# Rofi (lbonn Wayland fork)
layerrule = blur, rofi
layerrule = ignorezero, rofi

# Dunst
layerrule = blur, notifications
layerrule = ignorezero, notifications

# Wlogout
layerrule = blur, logout_dialog
layerrule = ignorezero, logout_dialog

# Waybar
layerrule = blur, waybar
#layerrule = ignorezero, waybar
layerrule = ignorealpha 0.1, waybar
layerrule = blurpopups, waybar

# Sway Notification Center
layerrule = blur, swaync-control-center
layerrule = ignorealpha 0.2, swaync-control-center

======Config-End========

Description

I have exec-once = hyprlock [...] in my config. The issue is, in newer hyprland versions, after logging in I can see the cursor and can't interact with hyprlock. After moving the mouse slightly, the cursor disappears and I can interact with the lockscreen again

How to reproduce

Log into hyprland and have hyprlock in an exec-once

Crash reports, logs, images, videos

The first bad commit appears to be 4fdc0d5

Likely unrelated, but in this and similar commits, however, the cursor appears in the top-left corner and not in the middle (like it does in more recent commits)

@alba4k alba4k added the bug Something isn't working label Aug 18, 2024
@vaxerski
Copy link
Member

bisect bogus, can you bisect properly xd

@Agent00Ming
Copy link
Contributor

Agent00Ming commented Aug 19, 2024

#7330 (comment), hyprwm/aquamarine@2bff4a4 is the commit

hyprlock hangs blocking all input and swaylock coredumps

nvm, this doesn't line up with the conditions of this issue

@alba4k
Copy link
Contributor Author

alba4k commented Sep 6, 2024

@PaideiaDilemma this is not fixed on my end

@PaideiaDilemma
Copy link
Contributor

Ahh shit you are right

Reverting the offending commit fixes it.
Maybe i will boot up FreeBSD to see if the issue that lead to the commit can be fix in another way.

@vaxerski can you reopen this pls?

@vaxerski vaxerski reopened this Sep 7, 2024
@alba4k
Copy link
Contributor Author

alba4k commented Sep 8, 2024

btw it's still better as I can interact with hyprlock now, the mouse is just visible, which is waaaay nicer

@xiyori
Copy link

xiyori commented Sep 11, 2024

Still happens for me too. Moving mouse is required to interact with hyprlock after startup via exec-once.

@VirtCode
Copy link
Contributor

VirtCode commented Sep 19, 2024

Wouldn't it be possible to reintroduce 4fdc0d5 at least on Linux like for example this (or something similar, depending on where the limitation applies):

#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
fd->onSignal();
#endif

until someone comes up with a solution that works on bsd?

As I understand it, the problem currently is that input devices are only added after some interaction is made on them (because of that commit). This means keyboards will be absent for when programs run through exec-once (or similarly before inputs occur) are mapped, which causes keyboard focus to fail. So even if the devices are added later on (e.g. after the first keydown), these surfaces don't have keyboard focus. The focus will be recalculated on mouse move though.

I have tried to find an easy workaround to the focus issues here and in #7568 by redoing the keyboard focus after keyboards have been added, but that doesn't seem to fully do the trick, as the first keypress is missed. Because there are no keyboards on startup, the surfaces' seats do not get the keyboard capability advertised, so they don't subscribe to keyboard events (at least on gtk). As devices are added just before the first keydown, the seats can't be quick enough to subscribe and won't catch that first keydown. We can again attempt to "work around" this by trying to resend the keydown later, but that's a fragile and horrendous "fix". So I think a good workaround on this regard is difficult to achieve. (Also note that I might've gotten something wrong here, I don't know much about wayland dev.)

Considering that there seem to be other, non focus-related issues (like switchxkblayout on startup) caused by the absence of input devices, it would be nice if that change was partially reverted for the time being, until someone finds some other method to get the devices earlier.

@vaxerski
Copy link
Member

there is no way in hell the linked commit causes any issue like this

@VirtCode
Copy link
Contributor

As I said, I don't know much about wayland dev, so there might be something completely different at play here too. All I know is that in my testing I can consistently reproduce these issues without that fd->onSignal(), and they go away if I reintroduce it. I am relatively sure that the focus the issues are then caused by the keyboards not being added when the surfaces are mapped, or something very similar.

To clarify what I mean, here are some logs from main with and without that fd->onSignal(). I did all the testing on an intel laptop on arch. I am using exec-once = wofi --show drun as a test here:

  • logs-main.txt: This is the current main, where the surface doesn't have focus on start. It can be seen how the surfaces are mapped at 13:33:41, but the input devices are added at 13:33:43 after my first keypress.
  • logs-with-fd-onsignal.txt: This is the same rev, but with that fd->onSignal() introduced where it was removed, the surface here has focus on start. It can be seen how the keyboards are added before the surfaces are mapped, both within the second 13:35:05.

Again, I might've missed something crucial, so let me know if there's anything wrong about these logs or my other observations.

@PaideiaDilemma
Copy link
Contributor

The problem occurs with all surfaces that get focused before an input device receives an event.
With exec-once=sleep 5 && foot it happens as well.
When making a keypress during the sleep, it will set the keyboard focus properly, because g_pSeatManager->keyboard in focusSurface exists.
But as soon as the surface has focus, pressing a key does not focus the surface, but mouse movement does.

I looked into it and m_pAqBackend->events.newKeyboard only arrives once a key is pressed or the mouse is moved. Which i think happens because dispatchLibinputEvents in aq is not called up until that point. Actually it called in Aquamarine::CSession::attempt, but before some libinput stuff is setup. When calling it again further down, we are still to early, because g_pInputManager is still a nullptr. This is how far I traced it back so far.

@PaideiaDilemma
Copy link
Contributor

@vaxerski

I think we need to manually dispatch libinput events at startup to fix it.
Throwing some ideas here, as I am not sure what would be the best way to handle it.

  1. Expose dispatchLibinputEvents though the aq backend, so that we can call it at the end of initServer in hl.
  2. Call dispatchLibinputEvents in Aquamarine::Backend::start. But that requires InputManager to be moved to STAGE_PRIORITY, otherwise crash.
  3. Call it when using getPollFDs. That would make the fix contained within aq, but its ugly.
  4. Revert the commit and add compiletime check for BSDs like @VirtCode mentioned.

@vaxerski
Copy link
Member

2 is what I was thinking bout.

@vaxerski
Copy link
Member

hyprwm/aquamarine#86 pls test

@alba4k
Copy link
Contributor Author

alba4k commented Sep 23, 2024

doesnt seem to work

leiserfg pushed a commit to leiserfg/Hyprland that referenced this issue Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants