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
21.97k stars 913 forks source link

Cannot launch QT applications when disabling Xwayland #8032

Closed so1ar closed 1 month ago

so1ar commented 1 month ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 0c7a7e2d569eeed9d6025f3eef4ea0690d90845d (version: bump to 0.44.0). Date: Sun Oct 6 11:04:13 2024 Tag: v0.44.0, commits: 5299 built against aquamarine 0.4.1 flags: (if any) System Information: System name: Linux Node name: liu Release: 6.6.54-1-lts Version: #1 SMP PREEMPT_DYNAMIC Sat, 05 Oct 2024 17:53:31 +0000 GPU information: 02:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15dd] (rev c4) (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/liu/.config/hypr/hyprland.conf: Read Succeeded $source_dir = ~/.config/hypr/conf $scripts_dir = ~/.config/hypr/scripts # Source color theme source = $source_dir/color.hypr.conf # Monitor config source = $source_dir/monitor.hypr.conf # Input config source = $source_dir/input.hypr.conf # General config source = $source_dir/general.hypr.conf # Decoration config source = $source_dir/decoration.hypr.conf # Animation config source = $source_dir/animations.hypr.conf # Master layout config source = $source_dir/master.hypr.conf # Gestures config source = $source_dir/gestures.hypr.conf # Keybindings config source = $source_dir/binds.hypr.conf # Misc configs source = $source_dir/misc.hypr.conf # Cursor config source = $source_dir/cursor.hypr.conf # Environment Variables source = $source_dir/env.hypr.conf # Autostart source = $source_dir/autostart.hypr.conf # Window rules and layer rules source = $source_dir/rules.hypr.conf Config File: /home/liu/.config/hypr/conf/color.hypr.conf: Read Succeeded # Grubvox color $fg = rgb(EBDBB2) $bg = rgb(282828) $black = rgb(1D2021) $red = rgb(CC241D) $lightred = rgb(fb4934) $green = rgb(98971A) $lightgreen = rgb(B8BB26) $yellow = rgb(D79921) $lightyellow = rgb(FABD2F) $blue = rgb(458588) $lightblue = rgb(83A598) $purple = rgb(B16286) $lightpurple = rgb(D3869B) $aqua = rgb(689D6A) $lightaqua = rgb(8EC07C) $white = rgb(FBF1C7) $orange = rgb(D65D0E) $lightorange = rgb(FE8019) Config File: /home/liu/.config/hypr/conf/monitor.hypr.conf: Read Succeeded monitor=,preferred,auto,1 Config File: /home/liu/.config/hypr/conf/input.hypr.conf: Read Succeeded # Input devices config input { kb_layout = us kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 1 accel_profile = flat touchpad { disable_while_typing = true natural_scroll = true tap-to-click = true } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } # Touchpad config device { name = elan2203:00-04f3:309a-touchpad accel_profile = adaptive } # Disable laptop keyboard by default $LAPTOP_KB_ENABLED = false $STATUS_FILE="$XDG_RUNTIME_DIR/keyboard.status" exec-once = printf "false" >"$STATUS_FILE" device { name = kanata enabled = $LAPTOP_KB_ENABLED } Config File: /home/liu/.config/hypr/conf/general.hypr.conf: Read Succeeded general { gaps_in = 3 gaps_out = 5 border_size = 3 col.active_border = $blue $aqua 45deg col.inactive_border = $bg $fg 45deg no_border_on_floating = false layout = master } Config File: /home/liu/.config/hypr/conf/decoration.hypr.conf: Read Succeeded decoration { rounding = 6 drop_shadow = false dim_inactive = false blur { enabled = true size = 8 passes = 2 } } Config File: /home/liu/.config/hypr/conf/animations.hypr.conf: Read Succeeded animations { enabled = yes bezier=slow,0,0.85,0.3,1 bezier=overshot,0.7,0.6,0.1,1.1 bezier=bounce,1,1.6,0.1,0.85 bezier=slingshot,1,-2,0.9,1.25 bezier=nice,0,6.9,0.5,-4.20 animation=windows,1,4,bounce,slide animation=border,1,4,default animation=fade,1,4,default animation=workspaces,1,4,overshot,slide } Config File: /home/liu/.config/hypr/conf/master.hypr.conf: Read Succeeded master { mfact = 0.5 new_status = master new_on_top = true no_gaps_when_only = true } Config File: /home/liu/.config/hypr/conf/gestures.hypr.conf: Read Succeeded gestures { workspace_swipe = true } Config File: /home/liu/.config/hypr/conf/binds.hypr.conf: Read Succeeded $mainMod = SUPER # Start terminal bind = $mainMod, return, exec, foot bind = $mainMod, m, exec, env ZELLIJ_ENABLED=true foot zellij attach -c my_zellij_session # Kill active window bind = $mainMod SHIFT, Q, killactive, # Logout bind = $mainMod SHIFT, E, exec, $scripts_dir/powermenu # Reload Configuration bind = $mainMod, R, exec, hyprctl reload && notify-send "Configuration reloaded" # Toggle floating bind = $mainMod SHIFT, space, togglefloating, # Launcher bind = $mainMod, D, exec, rofi -show drun # Toggle fullscreen bind = $mainMod, F, fullscreen, # Cycle through windows (NOTE: master layout only) bind = $mainMod, J, layoutmsg, cyclenext bind = $mainMod, K, layoutmsg, cycleprev # Swap windows (NOTE: master layout only) bind = $mainMod SHIFT, J, layoutmsg, swapnext bind = $mainMod SHIFT, K, layoutmsg, swapprev # Move to previous or next workspace bind = $mainMod, H, workspace, -1 bind = $mainMod, L, workspace, +1 # Move current window to previous or next workspace bind = $mainMod SHIFT, L, movetoworkspace, +1 bind = $mainMod SHIFT, H, movetoworkspace, -1 # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Special workspace bind = $mainMod, I, togglespecialworkspace, bind = $mainMod SHIFT, I, movetoworkspace, special # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # Start firefox borwser bind = $mainMod, N, exec, firefox bind = $mainMod SHIFT, N, exec, firefox --private-window # Screen saver (NOTE: hyprlock) bind = $mainMod SHIFT, X, exec, hyprlock # Volume keys bind = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ binde=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Backlight binde = , XF86MonBrightnessDown, exec, brightnessctl set 5%- binde = , XF86MonBrightnessUp, exec, brightnessctl set 5%+ # Clipboard manager (NOTE: wl-clipboard cliphist fzf) bind = $mainMod SHIFT, V, exec, foot --title=clipboard $scripts_dir/cliphist-fzf-sixel # Screenshot (NOTE: grim slurp satty) bind = $mainMod, P, exec, grim -g "$(slurp)" - | satty --filename - --fullscreen --output-filename ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png bind = $mainMod SHIFT, P, exec, grim - | satty --filename - --fullscreen --output-filename ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png # Change wallpapers (NOTE: swaybg) bind = $mainMod SHIFT, W, exec, killall -9 wallpaper_service ; killall -9 sleep ; $scripts_dir/wallpaper_service bind = $mainMod, C, exec, loupe $(cat ~/.cache/current_wall.txt) bind = $mainMod SHIFT, C, exec, cp $(cat ~/.cache/current_wall.txt) ~/wallpapers/collection/ && notify-send "已收藏当前壁纸" # Open notification center (NOTE: swaync) bind = $mainMod SHIFT, F, exec, swaync-client -t -sw # Submap resize and move bind = $mainMod SHIFT, R, submap, resize&move submap = resize&move # Resize window binde = $mainMod, J, resizeactive, 0 50 binde = $mainMod, K, resizeactive, 0 -50 binde = $mainMod, H, resizeactive, -50 0 binde = $mainMod, L, resizeactive, 50 0 # Move window binde = $mainMod SHIFT, K, moveactive, 0 -50 binde = $mainMod SHIFT, J, moveactive, 0 50 binde = $mainMod SHIFT, H, moveactive, -50 0 binde = $mainMod SHIFT, L, moveactive, 50 0 bind = , escape, submap, reset submap = reset Config File: /home/liu/.config/hypr/conf/misc.hypr.conf: Read Succeeded misc { disable_autoreload = true mouse_move_enables_dpms = true key_press_enables_dpms = true animate_mouse_windowdragging = false animate_manual_resizes = false } xwayland { enabled = false } Config File: /home/liu/.config/hypr/conf/cursor.hypr.conf: Read Succeeded cursor { hide_on_key_press = true } Config File: /home/liu/.config/hypr/conf/env.hypr.conf: Read Succeeded # Set up cursors # env = XCURSOR_SIZE,24 # env = HYPRCURSOR_SIZE,24 env = HYPRCURSOR_THEME,catppuccin-mocha-lavender-cursors # XDG specifications env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = XDG_CURRENT_DESKTOP,Hyprland # Qt: Use wayland if available, fall back to x11 if not. env = QT_QPA_PLATFORM,wayland;xcb # enables automatic scaling, based on the monitor’s pixel density. env = QT_AUTO_SCREEN_SCALE_FACTOR,1 # Disables window decorations on Qt applications. env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 # Tells Qt based applications to pick your theme from qt5ct, use with Kvantum. env = QT_QPA_PLATFORMTHEME,qt5ct # GTK: Use wayland if available. If not: try x11, then any other GDK backend. env = GDK_BACKEND,wayland,x11,* # Run SDL2 applications on Wayland. Remove or set to x11 if games that provide older versions of SDL cause compatibility issues. env = SDL_VIDEODRIVER,wayland # Clutter package already has wayland enabled, this variable will force Clutter applications to try and use the Wayland backend. env = CLUTTER_BACKEND,wayland # Some Java AWT applications will not display properly unless you set the following. env = _JAVA_AWT_WM_NONREPARENTING,1 # Language env = LANG,zh_CN.UTF-8 Config File: /home/liu/.config/hypr/conf/autostart.hypr.conf: Read Succeeded # Waybar exec-once = killall -9 waybar exec-once = env LANG=en_US.UTF-8 waybar # Fcitx5 exec-once = killall -9 fcitx5 exec-once = fcitx5 # Screensaver (NOTE: hypridle) exec-once = killall -9 hypridle exec-once = hypridle # Clipboard manager (NOTE: wl-clipboard cliphist fzf) exec-once = killall -9 wl-paste exec-once = wl-paste --type text --watch cliphist store # Stores only text data exec-once = wl-paste --type image --watch cliphist store # Stores only image data # Wallpapers (NOTE: swaybg) exec-once = killall -9 wallpaper_service ; $scripts_dir/wallpaper_service # Notification (NOTE: swaync) exec-once = killall -9 swaync exec-once = swaync # Polkit (NOTE: mate-polkit) exec-once = /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 # Bluetooth control (NOTE: blueman) # exec-once = killall -9 blueman-applet # exec-once = killall -9 blueman-tray # exec-once = blueman-applet # Network management (NOTE: network-manager-applet) # exec-once = killall -9 nm-applet # exec-once = nm-applet # Screen sharing (NOTE: xdg-desktop-portal-hyprland) exec-once = $scripts_dir/screenshareing # Systemd config (NOTE: stolen form sway `/etc/sway/config.d/50-systemd-user.conf`) exec-once = systemctl --user set-environment XDG_CURRENT_DESKTOP=Hyprland exec-once = systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY XAUTHORITY XDG_CURRENT_DESKTOP=Hyprland WAYLAND_DISPLAY # Gtk theme # NOTE: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland exec-once = $scripts_dir/import-gsettings Config File: /home/liu/.config/hypr/conf/rules.hypr.conf: Read Succeeded layerrule = blur,waybar layerrule = blur,swaync-control-center windowrulev2 = float,title:(clipboard) windowrulev2 = size 1200 800,title:(clipboard) windowrulev2 = center,title:(clipboard) windowrulev2 = float,class:(nm-connection-editor) windowrulev2 = size 1200 800,class:(nm-connection-editor) windowrulev2 = center,class:(nm-connection-editor) windowrulev2 = float,class:(blueman-manager) windowrulev2 = size 1200 800,class:(blueman-manager) windowrulev2 = center,class:(blueman-manager) windowrulev2 = float,class:(org.gnome.Loupe) windowrulev2 = size 1600 900,class:(org.gnome.Loupe) windowrulev2 = center,class:(org.gnome.Loupe) windowrulev2 = float,title:(画中画) windowrulev2 = center,title:(clipboard) ======Config-End======== ```

Description

Recently I tried to run Hyprland without any xorg stuff. I disabled Xwayland in the configuration file according to this after I confirmed that most of my daily use applications can run under Wayland not Xwayland.

But after I disabled Xwayland, I found out some QT applications cannot launch and get errors like Gtk-WARNING **: 17:53:34.130: cannot open display:, which is extremely weird because they don't need Xwayland nor Gtk.

I have already set QT_QPA_PLATFORM environment variable and I have confirmed QT applications can run under wayland not Xwayland before I disabled Xwayland.

How to reproduce

Crash reports, logs, images, videos

satty-20241008-21:23:23

vaxerski commented 1 month ago

uh how is qt throwing gtk errors? tf?

so1ar commented 1 month ago

uh how is qt throwing gtk errors? tf?

That's why I said it is extremely weird.

QT applications run normally when enabling Xwayland and is running under Wayland. Don't know if it is some QT quirk.

so1ar commented 1 month ago

@vaxerski I figured it out! It's a problem of qt5gtk2 and qt6gtk2. Not a problem of Hyprland nor QT. When disabling qt5gtk2 and qt6gtk2, all things works perfectly. I'm closing this issue right now😂.