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

Adding noise on Nvidia only darkens the window background and creates dotted diagonal lines #3806

Closed
MathisP75 opened this issue Nov 8, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@MathisP75
Copy link

MathisP75 commented Nov 8, 2023

Hyprland Version

Hyprland, built from branch main at commit 751d285 dirty (props: bump ver to 0.32.0).

Bug or Regression?

Bug

Description

noise = 0.0
image

noise = 1.0
image

How to reproduce

On an Nvidia GPU, set noise to a value higher than 0 and see the darkness increase as you increase the value. No noise is being generated. The dotted lines also become more visible.

Crash reports, logs, images, videos

No response

@MathisP75 MathisP75 added the bug Something isn't working label Nov 8, 2023
@MathisP75 MathisP75 changed the title Adding noise creates dotted diagonal lines on blurred windows Adding noise on Nvidia only darkens the window background and creates dotted diagonal lines Nov 9, 2023
@MathisP75
Copy link
Author

My card is a 1660ti. Applies on nvidia-dkmsfor both 535 and 545.

@MathisP75
Copy link
Author

Another user reproduced the issue on a 3090
image

This is his result for a pacman -Qs nvidia:

local/cuda 12.3.0-1
    NVIDIA's GPU programming toolkit
local/egl-wayland 2:1.1.13-1
    EGLStream-based Wayland external platform
local/ffnvcodec-headers 12.1.14.0-1
    FFmpeg version of headers required to interface with Nvidias codec APIs
local/lib32-nvidia-utils 535.113.01-1
    NVIDIA drivers utilities (32-bit)
local/libva-nvidia-driver-git 0.0.11.r1.gea6d862-1
    VA-API implementation that uses NVDEC as a backend (git version)
local/libvdpau 1.5-2
    Nvidia VDPAU library
local/libxnvctrl 545.29.02-1
    NVIDIA NV-CONTROL X extension
local/nvidia-open-dkms 535.113.01-8
    NVIDIA open kernel modules
local/nvidia-utils 535.113.01-2
    NVIDIA drivers utilities
local/opencl-nvidia 535.104.05-1
    OpenCL implemention for NVIDIA

@MathisP75
Copy link
Author

This is mine:

local/egl-wayland 2:1.1.13-1
    EGLStream-based Wayland external platform
local/ffnvcodec-headers 12.1.14.0-1
    FFmpeg version of headers required to interface with Nvidias codec APIs
local/hyprland-nvidia-git 0.32.0.r5.g8dd02eb5-1
    A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (NVIDIA patch)
local/lib32-libvdpau 1.5-2
    Nvidia VDPAU library
local/lib32-nvidia-utils 535.113.01-1
    NVIDIA drivers utilities (32-bit)
local/libva-nvidia-driver-git 0.0.11.r1.gea6d862-1
    VA-API implementation that uses NVDEC as a backend (git version)
local/libvdpau 1.5-2
    Nvidia VDPAU library
local/libxnvctrl 535.113.01-1
    NVIDIA NV-CONTROL X extension
local/nvidia-dkms 535.113.01-2
    NVIDIA drivers - module sources
local/nvidia-settings 535.113.01-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 535.113.01-2
    NVIDIA drivers utilities
local/nvtop 3.0.2-1
    GPUs process monitoring for AMD, Intel and NVIDIA

@MathisP75
Copy link
Author

The issue also occurs on a default Hyprland config on a separate profile.

@MathisP75
Copy link
Author

Other users encounter the same issue. This is with an Nvidia GPU, where there is no noise but the dotted lines are visible:
image

This is the same user running on an iGPU, where the noise works:
image
The lines might be there too, but they could be harder to see if it's the case.

@MathisP75
Copy link
Author

MathisP75 commented Nov 10, 2023

Another user has the noise working on GPU: NVIDIA GeForce GTX 1060 6GB, GPU Driver: NVIDIA 545.29.02, but the lines are present (3 passes, 0.5 noise and size 8):
image

Tweaked colors for better visibility:
image

@vaxerski
Copy link
Member

with all due respect, I don't give a shit. Why should I be the one responsible for nvidia's shader compiler having a tantrum?

Feel free to experiment with the noise generator for yourself:

inline const std::string FRAGBLURFINISH = R"#(
precision mediump float;
varying vec2 v_texcoord; // is in 0-1
uniform sampler2D tex;
uniform float noise;
uniform float brightness;
float hash(vec2 p) {
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
}
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// noise
float noiseHash = hash(v_texcoord);
float noiseAmount = (mod(noiseHash, 1.0) - 0.5);
pixColor.rgb += noiseAmount * noise;
// brightness
if (brightness < 1.0) {
pixColor.rgb *= brightness;
}
gl_FragColor = pixColor;
}
)#";

Closing. If you find a fix, feel free to MR, but I won't be the one hunting for it.

@vaxerski vaxerski closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
@Epikastema
Copy link
Contributor

Epikastema commented Mar 11, 2024

Have a fix working for the lines on my machine (RTX 4090). Would appreciate a test on different hardware to confirm. Having some weird issues pushing to my fork atm.

0001.patch

@vaxerski
Copy link
Member

feel free to make a MR, but will need some further testing for sure.

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

No branches or pull requests

3 participants