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
19.55k stars 821 forks source link

commit "aedcade" - flashing artifacts/black-zones #3952

Closed pbosab closed 9 months ago

pbosab commented 9 months ago

Hyprland Version

Hyprland, built from branch HEAD at commit aedcade68dd0615fd919a7249633a554d0accd81 dirty (opengl: better checking for required introspection). Tag: v0.32.3-54-gaedcade6 flags: (if any)

Bug or Regression?

Bug

Description

using hyprland-nvidia-git sometimes parts of the screen, sometimes the entire screen, start flashing with artifacts and/or black squares.

tried recording a video with obs, and ofc they dont appear in the video. (but they are present).

building the previuos commit fixes the issue (so isn't a graphic card problem, except it's nvidia).

How to reproduce

.

Crash reports, logs, images, videos

No response

salimp2009 commented 9 months ago

what is the prev commit that fixes the issue . at least until there is a workaround I might try that it is really bad

pbosab commented 9 months ago

what is the prev commit that fixes the issue . at least until there is a workaround I might try that it is really bad

i'm just using 812a3f6 (no cursor problem and no artifacts)

salimp2009 commented 9 months ago

so if I add this using git checkout to pkgbuild in the prepare() function as git checkout 812a3f6 . Will it work you think

Arjun31415 commented 9 months ago

This issue has already been filed #3946

salimp2009 commented 9 months ago

how did you guys revert back to older commit using hyprland-nvidia-git . Did you just add git checkout 812a3f6 in prepare() function after submodule update line

vaxerski commented 9 months ago

can I get a config from one of yall

salimp2009 commented 9 months ago
########################################################################################
AUTOGENERATED HYPR CONFIG.
PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
########################################################################################

#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#

# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=,preferred,auto,auto
monitor=DP-3,1920x1080@144,0X0,1
# bitdepth,10

# See https://wiki.hyprland.org/Configuring/Keywords/ for more

# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox

# used for screen sharing
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

exec-once=/usr/lib/polkit-kde-authentication-agent-1
exec-once=waybar
exec-once=swaybg  -i ~/Pictures/wallpapers/wallhaven-02.png  # -o "DP-1"
exec-once=dunst
exec-once=brave
exec-once=gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'

#Environment variable; used to be defined in wrappedhl
env = _JAVA_AWT_VM_NONREPARENTING,1
env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORM,wayland
# env = QT_QPA_PLATFORM,wayland;xcb
env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1

env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1
env = WLR_DRM_DEVICES,/dev/dri/card0
# env = __GL_GSYNC_ALLOWED, 1
# env = __GL_VRR_ALLOWED, 1

# XDG
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_DESKTOP,Hyprland

# Theme
# env = XCURSOR_THEME,Breeze
# env = GTK_THEME,Orchis-Dark-Compact

# Toolkit Backend
# env = SDL_VIDEODRIVER,wayland
# env = GDK_BACKEND,wayland,x11

# this is needed if you specifiy the app to start on a specific workspace
# and needs cleanup.sh so that if you want open another instance on another workspace
# cleanup reset windowrule
# write a cleanup.sh script then activate this and below line
# windowrule=workspace 1 silent,brave
# exec-once=cleanup.sh

# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = tr 
    # repeat_rate = 50
    # repeat_delay = 240
    kb_variant =
    kb_model =
    kb_options = caps:escape
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = yes 
    }

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = true
    workspace_swipe_min_speed_to_force=4
    workspace_swipe_create_new = false
    workspace_swipe_forever = true
}

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

    layout=master
    sensitivity = 1.8  # for mouse cursor

    gaps_in = 5
    gaps_out = 20
    border_size = 2
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)
#   col.active_border=0xff5e81ac
#   col.inactive_border=0x66333333
    apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)

}

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

   rounding = 10
   # blur = yes
   # blur_size = 3
   # blur_passes = 1
   # blur_new_optimizations = on

   blur {
      enabled = 1
      size = 3
      passes = 1
      new_optimizations = true
    }

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

animations {
    enabled = yes
    animation = windows, 1, 7, default
    animation = fade, 1, 10, default
    animation = workspaces, 1, 6, default

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
    # bezier = myBezier, 0.05, 0.9, 0.1, 1.05

   # animation = windowsOut, 1, 7, default, popin 80%
   # animation = border, 1, 10, default
    }

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = 0 # master switch for pseudotiling. 
    force_split=2
    # preserve_split = yes # you probably want this
}

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

misc {
    disable_hyprland_logo=true
    disable_splash_rendering=true
    mouse_move_enables_dpms=true
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
#device:epic mouse V1 {
#    sensitivity = -0.5
#}

# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrule=tile,kitty
windowrule=opacity 0.80,alacritty
windowrule=opacity 0.80,rofi
blurls=rofi

windowrule=opacity 0.80,alacritty
windowrule=opacity 0.80,rofi
windowrule=float,title:Calculator
windowrule=center,^(org.gnome.Calculator)$
windowrule=size 500 400,^(org.gnome.Calculator)$

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

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, RETURN, exec, kitty
bind = $mainMod, b, exec, brave
bind = $mainMod, Q, killactive, 
# bind = SUPERSHIFT,Q,exit,
bind = SUPER,F,fullscreen,1
bind = SUPERSHIFT,F,fullscreen,0
bind = $mainMod, M, exit, 
bind = $mainMod, E, exec, pcmanfm
bind = $mainMod, V, togglefloating, 
bind = $mainMod, SPACE, exec, rofi -show drun
bind = $mainMod, D, exec, dunstctl close 

bind = $mainMod, P, exec, pavucontrol    # somehow Hyprland says this is not installed but it is !!
#bind = $mainMod, J, togglesplit, # dwindle
bind = SUPER,Y,exec,grim -g "$(slurp)" - | swappy -f -

bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle
bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5%
bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5%
bind=,XF86AudioMicMute,exec,pactl set-source-mute @DEFAULT_SOURCE@ toggle
# bind=,F10,exec,pactl set-source-mute @DEFAULT_SOURCE@ toggle
bind=,F10,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle
bind=,F11,exec,pactl set-sink-volume @DEFAULT_SINK@ -5%
bind=,F12,exec,pactl set-sink-volume @DEFAULT_SINK@ +5%
bind=SUPERSHIFT,E,exec,wlogout
bind=SUPERSHIFT,R,exec,wf-recorder -g "$(slurp)"

bind=SUPERSHIFT,RETURN,layoutmsg,swapwithmaster
bind=SUPER,j,layoutmsg,cyclenext
bind=SUPER,k,layoutmsg,cycleprev
bind=SUPER,h,movefocus,l
bind=SUPER,l,movefocus,r

bind=SUPERSHIFT,left,resizeactive,-40 0
bind=SUPERSHIFT,right,resizeactive,40 0

bind=SUPERSHIFT,h,movewindow,l
bind=SUPERSHIFT,l,movewindow,r
bind=SUPERSHIFT,k,movewindow,u
bind=SUPERSHIFT,j,movewindow,d

# 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

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 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:273, movewindow
bindm = $mainMod, mouse:272, resizewindow
vaxerski commented 9 months ago

ouh, I thought the culprit would be new_optimizations = false but yall dont have that... oops

Jappie3 commented 9 months ago

Is it artifacts like these you're talking about @pbosab ? I've had these for a few weeks now and I don't really have the time to properly look into it :/ Nvidia as well btw, these only happen when full-screening applications

https://github.com/hyprwm/Hyprland/assets/42720120/7e42aefc-0f9d-48eb-b782-bb62b5c55c89

vaxerski commented 9 months ago

this looks like vrr being toggled. Are you on vrr = 2?

Kinda a thing with drm

salimp2009 commented 9 months ago

i did not have any issue until today's update (nvidia)

pbosab commented 9 months ago

no, it's something unrelated to windows, seems to happen when redrawing the screen

On Sat, Nov 25, 2023, 15:57 Jappie3 @.***> wrote:

Is it artifacts like these you're talking about @pbosab https://github.com/pbosab ? I've had these for a few weeks now and I don't really have the time to properly look into it :/ Nvidia as well btw

https://github.com/hyprwm/Hyprland/assets/42720120/7e42aefc-0f9d-48eb-b782-bb62b5c55c89

— Reply to this email directly, view it on GitHub https://github.com/hyprwm/Hyprland/issues/3952#issuecomment-1826351739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVTH7ZGXFMNQKUF6O57I5R3YGIBMTAVCNFSM6AAAAAA72AZFSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGM2TCNZTHE . You are receiving this because you were mentioned.Message ID: @.***>

vaxerski commented 9 months ago

can someone show me what they look like? Do they go away if you disable blur?

pbosab commented 9 months ago

cant test im not at home, but are just like these https://github.com/hyprwm/Hyprland/issues/3946 but on random parts of the screen and not only on external monitor.

On Sat, Nov 25, 2023, 16:05 Vaxry @.***> wrote:

can someone show me what they look like? Do they go away if you disable blur?

— Reply to this email directly, view it on GitHub https://github.com/hyprwm/Hyprland/issues/3952#issuecomment-1826353417, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVTH7ZB3WZ525J3SGI73Y7DYGICL5AVCNFSM6AAAAAA72AZFSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGM2TGNBRG4 . You are receiving this because you were mentioned.Message ID: @.***>

vaxerski commented 9 months ago

looks like typical nvidia. Question 2 still stands.

Arjun31415 commented 9 months ago

can someone show me what they look like? Do they go away if you disable blur?

I have disabled blur, but that does not fix it. I have a video of it on #3946

vaxerski commented 9 months ago

okay, what if you enable blur and have a floating, blurred window?

Jappie3 commented 9 months ago

this looks like vrr being toggled. Are you on vrr = 2? Kinda a thing with drm

I was indeed on vrr = 2, fixed now - thanks! Not seeing any other artifacts for now... I'm on 3fe6162 with an rtx 3060 laptop. Feel free to tag me if you want me to try something

Arjun31415 commented 9 months ago

https://github.com/hyprwm/Hyprland/pull/3954 This partially fixes it , terminal which have blur enabled and transparent background do not flicker, but browsers do

Arjun31415 commented 9 months ago

okay, what if you enable blur and have a floating, blurred window?

Works

vaxerski commented 9 months ago

damn, placenta

brettalcox commented 9 months ago

https://github.com/hyprwm/Hyprland/assets/7462622/9ba50f50-1b0d-4c06-b6b4-3fecece608a3

I have 4090 and on commit 3fe6162. vrr set to 1 in my case

Arjun31415 commented 9 months ago

okay, what if you enable blur and have a floating, blurred window?

Works

https://github.com/hyprwm/Hyprland/assets/72289243/3ce46336-bcf3-4232-b880-5c86a3f7a61f

vaxerski commented 9 months ago

patch.txt

try this

oops, this patch.txt

vaxerski commented 9 months ago

I am too hasty with the patches. patch.txt

Arjun31415 commented 9 months ago

I am too hasty with the patches. patch.txt

Did not work

Arjun31415 commented 9 months ago

Another thing that works is if there is a floating blurred window on top of a tiled window. Then there is no flickering

vaxerski commented 9 months ago

yeah I know, it's a problem with rendering directly to the rbo, for some reason. It looks like introspection on an rbo, but there shouldn't be any, especially with blur off.

vaxerski commented 9 months ago

wait a damn second, this is nvidia.

vaxerski commented 9 months ago

patch.txt

Arjun31415 commented 9 months ago

patch.txt

Works

vaxerski commented 9 months ago

I hate this fucking company

Arjun31415 commented 9 months ago

I hate this fucking company

+1

salimp2009 commented 9 months ago

me too; hate Nvidia ; it was messing even Unreal Engine

Arjun31415 commented 9 months ago

patch.txt

Quite weird this was not an issue before, because it was glFlush() since so many versions

vaxerski commented 9 months ago

I'll make a more production-ready patch in a sec. Gimme a few minutes.

Since the move to a hyprland-only renderer, the "nvidia wlroots patches" no longer are used, this is basically the "nvidia wlroots patch" updated, lol

vaxerski commented 9 months ago

Quite weird this was not an issue before, because it was glFlush() since so many versions

nvidia wlroots patches were switching it in wlroots. Now we don't use wlroots for rendering anymore.

Arjun31415 commented 9 months ago

aah that seems to be the reason

vaxerski commented 9 months ago

patch.txt try this

Arjun31415 commented 9 months ago

patch.txt try this

Why do this, instead of updating nvidia-patches

Arjun31415 commented 9 months ago

patch.txt try this

Also it does not work

vaxerski commented 9 months ago

Why do this, instead of updating nvidia-patches

convenience for me, I'd have an isNvidia for the future

vaxerski commented 9 months ago

Also it does not work

what's the DRM driver information printed in the log?

image

vaxerski commented 9 months ago

I search for nvidia but maybe it's named something else

Arjun31415 commented 9 months ago

Could you remind me how to check the debug log file nvm

[LOG] GPU information:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU106M [GeForce RTX 2060 
Mobile] [10de:1f15] (rev a1) (prog-if 00 [VGA controller])
06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoi
r [1002:1636] (rev c6) (prog-if 00 [VGA controller])
vaxerski commented 9 months ago

I need the DRM driver information. debug:disable_logs = false and then in the log search for DRM driver

Arjun31415 commented 9 months ago

I need the DRM driver information. debug:disable_logs = false and then in the log search for DRM driver

[LOG] DRM driver information: amdgpu v3.54.0 from 20150101 description AMD GPU

vaxerski commented 9 months ago

ah, right. Cuz you only use nvidia on an external monitor. Sec

Arjun31415 commented 9 months ago

I can do a full boot on external only, but it would take a while

vaxerski commented 9 months ago

na, dw.