Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

VSCode (Electron) flickering with ELECTRON_OZONE_PLATFORM_HINT=auto and has some blur bugs with ELECTRON_OZONE_PLATFORM_HINT=x11

Open GHOST-mHBr opened this issue 1 year ago • 0 comments

Regression?

No

System Info and Version

System/Version info
Hyprland, built from branch  at commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259  (props: bump version to 0.42.0).
Date: Wed Aug 7 19:17:10 2024
Tag: v0.42.0, commits: 5069

flags: (if any)


System Information:
System name: Linux
Node name: Ghost
Release: 6.10.6-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Mon, 19 Aug 2024 17:02:39 +0000


GPU information: 
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107GLM [Quadro M2000M] [10de:13b0] (rev a2) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX x86_64 Kernel Module  560.35.03  Fri Aug 16 21:39:15 UTC 2024


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/arch/.config/hypr/hyprland.conf: Read Succeeded
# Setup monitors
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,1

# Dual monitor example on G15 Strix
# eDP-1 is the built in monitor while DP-1 is external
# Both monitors here are at 1440 and 165Hz
# DP-1 is on the left and  eDP-1 is on the right
#monitor=DP-1,2560x1440@165,0x0,1
#monitor=eDP-1,2560x1440@165,2560x0,1

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# env = XDG_CURRENT_DESKTOP,Hyprland
# env = XDG_SESSION_DESKTOP,Hyprland
# env = XDG_SESSION_TYPE,wayland

# env = LIBVA_DRIVER_NAME,nvidia
# env = GBM_BACKEND,nvidia-drm
# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# env = WLR_DRM_NO_ATOMIC,1

# libva-nvidia-driver
# env = NVD_BACKEND,direct

# env = WLR_NO_HARDWARE_CURSORS,1  ---> Deprecated
env = LC_CTYPE, en_US.UTF-8 # Zed
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = HYPRLAND_LOG_WLR,1
env = HYPRLAND_NO_SD_NOTIFY,1
env = ELECTRON_OZONE_PLATFORM_HINT,x11


# Execute your favorite apps at launch
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = ~/.config/hypr/xdg-portal-hyprland
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = hypridle
exec-once = mpDris2
exec-once = bluetoothctl power off
exec-once = waybar
exec = swaybg -m fit -i ~/wallpapers/sam1.jpg

# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = us,ir
	kb_options = grp:alt_shift_toggle
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = yes
		scroll_factor = 2.0
    }
	repeat_rate = 40
	repeat_delay = 320
    sensitivity = 0.35 # -1.0 - 1.0, 0 means no modification.
	numlock_by_default = true
}

cursor {
    no_hardware_cursors = true
}
general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 5
    gaps_out = 10
    border_size = 1
    #col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.active_border=rgba(cdd6d18A)
    col.inactive_border = rgba(cdd6d100)

    layout = dwindle
}

misc {
    disable_hyprland_logo = yes
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 7
    
    blur { 
        enabled = true
        size = 10
        passes = 1
        ignore_opacity=true
    }

    drop_shadow = yes
    shadow_range = 4
    shadow_render_power = 3
    dim_inactive=true
    col.shadow = rgba(1a1a1aee)
}

animations {
    enabled = true

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_on_active = true
    new_on_top = true
    inherit_fullscreen = false
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = true
}

xwayland {
    force_zero_scaling=true
}

# Example windowrule v1
# windowrule = float,^(thunar)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# rules below would make the specific app transparent
windowrule = float,^(.*)$
windowrulev2 = tile,title:^(Visual Studio Code)$
windowrulev2 = opacity 0.9 0.7,title:^(Visual Studio Code)$
windowrulev2 = tile,class:^(dev\.zed\.Zed)$
windowrulev2 = opacity 0.9 0.7,class:^(dev\.zed\.Zed)$
windowrulev2 = opaque,title:^(btop)$
windowrulev2 = opaque,title:^(helix)(.*)$
# windowrule = center,^(.*)$
windowrule = tile, title:^(.*)(Mozilla Firefox)$
windowrulev2 = opacity 0.9 0.7,class:^(kitty)$
windowrulev2 = size 900 700,class:^(kitty)$
windowrulev2 = size 800 700,class:^(nemo)$
windowrulev2 = size 1000 800,title:^(Telegram)$
windowrulev2 = size 800 600,title:NekoRay

layerrule = blur, notifications
layerrule = ignorealpha 0.5, notifications

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Change keyboard layout
# bind = $mainMod, SPACE, exec, hyprctl switchxkblayout at-translated-set-2-keyboard next 

bindl = $mainMod, SPACE, exec, hyprctl switchxkblayout at-translated-set-2-keyboard next 
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, 36, exec, kitty  #open the terminal
bind = $mainMod, Q, killactive, # close the active window
bind = $mainMod, F, fullscreen, # close the active window
bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window
bind = $mainMod, b, exec, firefox 
# bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland)
bind = $mainMod, E, exec, nemo # Show the graphical file browser
bind = $mainMod, V, togglefloating, # Allow a window to float
bind = $mainMod, D, exec, tofi-drun --drun-launch=true # Show the graphicall app launcher
bind = $mainMod, P, pin # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, S, exec, grim -g "$(slurp)" - | swappy -f - # take a screenshot
bind = $mainMod, T, exec, telegram-desktop
bind = $mainMod, tab, exec, $HOME/Scripts/window-changer.sh
# bind = $mainMod,tab,layoutmsg,rollnext
# ROG G15 Strix (2021) Specific binds
# bind = ,156, exec, rog-control-center # ASUS Armory crate key
# bind = ,211, exec, asusctl profile -n; pkill -SIGRTMIN+8 waybar # Fan Profile key switch between power profiles
bind = ,121, exec, pamixer -t # Speaker Mute FN+F1
bind = ,122, exec, pamixer -d 5 # Volume lower key
bind = ,123, exec, pamixer -i 5 # Volume Higher key
bind = ,256, exec, pamixer --default-source -t # Mic mute key
bind = ,232, exec, brightnessctl set 5%- # Screen brightness down FN+F7
bind = ,233, exec, brightnessctl set 5%+ # Screen brightness up FN+F8
bind = ,237, exec, brightnessctl -d asus::kbd_backlight set 33%- # Keyboard brightness down FN+F2
bind = ,238, exec, brightnessctl -d asus::kbd_backlight set 33%+ # Keyboard brightnes up FN+F3
# bind = ,210, exec, asusctl led-mode -n # Switch keyboard RGB profile FN+F4

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# 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

#Music player controls
bind = $mainMod SHIFT, N, exec, playerctl next
bind = $mainMod SHIFT, B, exec, playerctl previous
bind = $mainMod SHIFT, P, exec, playerctl play-pause


# 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

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

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

Description

VisualStudioCode flickers when the ELECTRON_OZONE_PLATFORM_HINT=auto or wayland. It works fine with this variable set to x11 but in this case, there is a bug that an extra border appears when i open a top bar menu. I tried setting XWayland variable force_zero_scaling=true but it doesn't work.

I have to mention that the extra borders get disappeared with disabling blur in decoration settings.

Here you can see what i mean by an extra border: image

How to reproduce

I'm not sure how to reproduce it but i guess with nvidia-dkms driver and setting the environment variable ELECTRON_OZONE_PLATFORM_HINT to auto or wayland, you can reproduce the bug.

Crash reports, logs, images, videos

This is the Hyprland logs after starting it up:

Environment variable $XDG_DATA_DIRS not set, ignoring.
Environment variable $XDG_DATA_DIRS not set, ignoring.
2024-08-27 20:50:37 - [swaybg-1.2.1/main.c:282] Found config * for output eDP-1 (LG Display 0x046F)
[CHG] Controller B8:8A:60:D1:5D:C0 PowerState: on-disabling
hci0 class of device changed: 0x000000
hci0 new_settings: ssp br/edr le secure-conn wide-band-speech 
Changing power off succeeded
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
2024-08-27 20:50:37,280 mpDris2 INFO: Using file:///home/arch/Music as music library path.
2024-08-27 20:50:37,281 mpDris2 INFO: Mutagen not available, covers in music files will be ignored.
[2024-08-27 20:50:37.301] [info] Using configuration file /home/arch/.config/waybar/config.jsonc
[2024-08-27 20:50:37.639] [info] Discovered appearance 'dark'
[2024-08-27 20:50:37.639] [info] Using CSS file /home/arch/.config/waybar/style.css
[2024-08-27 20:50:37.653] [info] Hyprland IPC starting
[2024-08-27 20:50:37.655] [info] Loading persistent workspaces from Waybar config
[2024-08-27 20:50:37.655] [info] Loading persistent workspaces from Hyprland workspace rules
[2024-08-27 20:50:37.726] [info] Bar configured (width: 1920, height: 50) for output: eDP-1
xdg-desktop-portal-wlr: no process found
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
Updated device 'nvidia_0':
Device 'nvidia_0' of class 'backlight':
	Current brightness: 50 (50%)
	Max brightness: 100

Updated device 'nvidia_0':
Device 'nvidia_0' of class 'backlight':
	Current brightness: 45 (45%)
	Max brightness: 100

Updated device 'nvidia_0':
Device 'nvidia_0' of class 'backlight':
	Current brightness: 40 (40%)
	Max brightness: 100

Gdk-Message: 21:11:24.484: Unable to load arrow from the cursor theme
(EE) could not connect to wayland server

GHOST-mHBr avatar Aug 28 '24 16:08 GHOST-mHBr