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.63k stars 829 forks source link

Glitches after GPU fix update #4744

Closed niksingh710 closed 6 months ago

niksingh710 commented 6 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch main at commit 301b48b74087cc59753ffa144b215540e6f82831 dirty (renderer: fix invalid damage accumulation with invalid buffer_age). Date: Sun Feb 18 21:34:08 2024 Tag: v0.35.0-49-g301b48b7 flags: (if any) System Information: System name: Linux Node name: mach Release: 6.7.5-zen1-1-zen Version: #1 ZEN SMP PREEMPT_DYNAMIC Sat, 17 Feb 2024 14:02:21 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-U GT2 [UHD Graphics] [8086:9b41] (rev 02) (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: ```

Bug or Regression?

Bug

Description

Some time launching applications seeing artifacts of glitches.

How to reproduce

After the discord announcement of gpu

considerable gpu performance hit from a commit introduced in v0.33.0 has been fixed in git. i updated hyprland-git.

Now launching apps like firefox sometime show glitches before rendering it is so fast that m failing to take screenshot. will attach if got any.

Crash reports, logs, images, videos

No response

niksingh710 commented 6 months ago

image

niksingh710 commented 6 months ago

The glitch is not like this but screenshot tool (grim) getting this

tharrmeehan commented 6 months ago

Can confirm this. For example while writing this comment, the text only refreshed after mouse movement.

vaxerski commented 6 months ago

can someone record it?

Agent00Ming commented 6 months ago

https://github.com/hyprwm/Hyprland/assets/107314235/6e02e133-d36e-4b37-8afe-4463e8437255

Seme4eg commented 6 months ago

https://github.com/hyprwm/Hyprland/assets/24554850/8cc6cec3-39c3-4fd7-9369-b40e62801225

vaxerski commented 6 months ago

can I get a log

Seme4eg commented 6 months ago

http://0x0.st/Hnvx.txt

epicgamer256705 commented 6 months ago

here's my log: https://0x0.st/Hnvn.log

vaxerski commented 6 months ago

patch.txt try

rurigk commented 6 months ago

@vaxerski your patch does not contain your changes in wlroots

diff --git a/subprojects/wlroots b/subprojects/wlroots
--- a/subprojects/wlroots
+++ b/subprojects/wlroots
@@ -1 +1 @@
-Subproject commit 00b869c1a96f300a8f25da95d624524895e0ddf2
+Subproject commit 00b869c1a96f300a8f25da95d624524895e0ddf2-dirty

How i apply that patch? im assuming you modified something in wlroots?

vaxerski commented 6 months ago

no, thats just git being git. patch -p1 < /path/to/patch.txt and it should just work

Seme4eg commented 6 months ago

didn't work for me, needed to remove that -dirty part

rurigk commented 6 months ago

I tested the patch and it didnt work

Before 301b48b74087cc59753ffa144b215540e6f82831

https://github.com/hyprwm/Hyprland/assets/6665402/5625de20-c4dd-4c15-8d40-81079abed24e

After 301b48b74087cc59753ffa144b215540e6f82831 with and without your patch

https://github.com/hyprwm/Hyprland/assets/6665402/7b4de2d9-07f2-4a49-bc86-1b19dc60db58

Im on AMD card 6700xt, for me its just the screen capture not the whole screen

vaxerski commented 6 months ago

wait it's only screencopy?

Anyways guys it's 1am for me I'll look into this more tomorrow. In the meantime, please guys try and find some more clues, this doesn't happen to me on my laptop.

Try a different pc, default config, fiddling with config, etc.

rurigk commented 6 months ago

Check the video of @Seme4eg https://github.com/hyprwm/Hyprland/issues/4744#issuecomment-1951432467 @Seme4eg its your whole desktop or its just screencopy?

Agent00Ming commented 6 months ago

Foot is affected while Kitty is not. Firefox with hw-accel enabled works flawlessly but it has lots of artifacting with it turned off. Kate, Dolphin and Libreoffice suite are affected. I tried out the patch with the same results.

vaxerski commented 6 months ago

pretty sure it's unrelated to this patch and this patch has just shown it. Can someone try and take the commit as a patch, and bisect but with that patch applied? It should work for every rev after ~0.33.0.

soo bisect but before testing any commit apply the patch that caused this behavior.

Pretty sure if you apply this to 0.33.0 it wont cause this. I'll explain more tomorrow if necessary its 4am and I have class tmr

Seme4eg commented 6 months ago

@rurigk , those artifacts appear only on wayland windows, xwayland ones don't have them, and all other animations like switching workspaces don't produce artifacts.

Seme4eg commented 6 months ago

What 'fixed' it for me is removing scaling from my monitor. I have a hidpi 4k laptop screen i usually scale by 1.8. Removing it fixed those artifacts, but i have everything super tiny now. Going back to 1.8 scale brings back all same artifacts.

rurigk commented 6 months ago

I don't use any scaling, can you test desktop capture with no scaling?

fufexan commented 6 months ago

I'm only noticing the glitches in GTK apps so far, with scaling 1.6. Unscaled works fine.

Seme4eg commented 6 months ago

I don't use any scaling, can you test desktop capture with no scaling?

https://github.com/hyprwm/Hyprland/assets/24554850/b5627fd3-dad2-4274-8742-a84e4667c046

Without scaling yes, still borked. Recorded with wf-recorder. Didn't upload file itself cuz its like 400mb for some reason..

sentakuhm commented 6 months ago

i upgraded to -git just now and i faced same issue, unscale fixed this issue.

vaxerski commented 6 months ago

thanks for fucking doing what I asked for instead of adding noise. Just like I said, c4365f20ed8ff0dd480b7ed7cf1bfff1a0b6911a was the real faulty commit.

Anyways fixed for me with above.

vaxerski commented 6 months ago

minor oopsies with fs-v1 surfaces fixed in the subsequent 176356630853a6558b8125726bbdaf6411593488

All issues here should be solved.

KrolixW commented 6 months ago

Still glitches for me

Seme4eg commented 6 months ago

noticable visual glitches fixed for me, but screen recording is still borked.

vaxerski commented 6 months ago

Still glitches for me

No it doesn't.

screen recording is still borked.

hm, seems to be working for me.

if you are facing issues, make sure you're on latest (verify your hyprctl version)

KrolixW commented 6 months ago

No it doesn't.

yes it does. Most often it happens when notification disappears, but i still cannot reproduce it consistently.

https://github.com/hyprwm/Hyprland/assets/79580247/a8ba08e4-7824-4324-8fb9-669e950a2d06

had to record via camera because obs recording has its own glitches

https://github.com/hyprwm/Hyprland/assets/79580247/5e84e44b-955b-433e-a930-20681d1f2404

Seme4eg commented 6 months ago

hyprctl version?

KrolixW commented 6 months ago

hyprctl version?

Hyprland, built from branch main at commit 176356630853a6558b8125726bbdaf6411593488 dirty (surface: minor fixes for last logicalDamage calc fix).
Date: Mon Feb 19 13:34:55 2024
Tag: v0.35.0-53-g17635663

flags: (if any)
Seme4eg commented 6 months ago

try to cleanbuild hyprland and reboot the machine and if it still persists, then try to bisect commits

vaxerski commented 6 months ago

@KrolixW that does not look like this issue. That looks like your gpu driver giving up

niksingh710 commented 6 months ago

@KrolixW that does not look like this issue. That looks like your gpu driver giving up

The issue is there I am on latest hyprland

It happens so rare and so quickly that can't record.

Mostly faced on foot terminal

Fxzzi commented 6 months ago

Hey vax, can confirm the same issue with flickering screen recording and screenshots not working correctly. Built -git in fresh chroot with rest on stable packages

https://github.com/hyprwm/Hyprland/assets/18248986/4883b238-e404-422f-ab8e-539972deb5ec

Here is what it looks like (does not look like this irl, only on screenrecord)

Also weird screenshot where I can only see the bar just like OP Screenshot from 24 02 19 16:32:31

vaxerski commented 6 months ago

I will just ignore your reports until someone does what I asked for here: https://github.com/hyprwm/Hyprland/issues/4744#issuecomment-1951639720

You are good at spamming that you have the issue but not good at providing useful information to get it fixed.

Fxzzi commented 6 months ago

Wish I could vax but I'm a little busy right now. If nobody is competent enough to do it by the time I'm free I'll do it myself.

Fxzzi commented 6 months ago

P.s. the patch you're talking about is this? https://github.com/hyprwm/Hyprland/issues/4744#issuecomment-1951481092

vaxerski commented 6 months ago

no, this: https://github.com/hyprwm/Hyprland/commit/301b48b74087cc59753ffa144b215540e6f82831

Fxzzi commented 6 months ago

Thanks bb, will test now :)

Fxzzi commented 6 months ago

Seems I am unable to apply the patch and build correctly on 0.33.0 and 0.34.0

/usr/bin/c++ -DHAS_EXECINFO -DHyprland_EXPORTS -DUSES_SYSTEMD -DWLR_USE_UNSTABLE -I/home/faaris/Hyprland/. -I/home/faaris/Hyprland/src -I/home/faaris/Hyprland/subprojects/wlroots/include -I/home/faaris/Hyprland/subprojects/wlroots/build/include -I/home/faaris/Hyprland/subprojects/udis86 -I/home/faaris/Hyprland/protocols -I/home/faaris/Hyprland/subprojects/udis86/libudis86 -isystem /usr/include/libdrm -isystem /usr/include/pango-1.0 -isystem /usr/include/cairo -isystem /usr/include/freetype2 -isystem /usr/include/harfbuzz -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -isystem /usr/include/libpng16 -isystem /usr/include/sysprof-6 -O3 -DNDEBUG -std=gnu++23 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -pthread -Winvalid-pch -include /home/faaris/Hyprland/build/CMakeFiles/Hyprland.dir/cmake_pch.hxx -MD -MT CMakeFiles/Hyprland.dir/src/render/Renderer.cpp.o -MF CMakeFiles/Hyprland.dir/src/render/Renderer.cpp.o.d -o CMakeFiles/Hyprland.dir/src/render/Renderer.cpp.o -c /home/faaris/Hyprland/src/render/Renderer.cpp
/home/faaris/Hyprland/src/render/Renderer.cpp: In member function ‘void CHyprRenderer::renderMonitor(CMonitor*)’:
/home/faaris/Hyprland/src/render/Renderer.cpp:1084:58: error: ‘m_iLastBufferAge’ was not declared in this scope
 1084 |     wlr_damage_ring_get_buffer_damage(&pMonitor->damage, m_iLastBufferAge, damage.pixman());
      |                                                          ^~~~~~~~~~~~~~~~
[108/114] Building CXX object CMakeFiles/Hyprland.dir/src/render/OpenGL.cpp.o
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:15: release] Error 1
make[1]: Leaving directory '/home/faaris/Hyprland'
make: *** [Makefile:31: all] Error 2

patch used is https://github.com/hyprwm/Hyprland/commit/301b48b74087cc59753ffa144b215540e6f82831.patch

tharrmeehan commented 6 months ago

The issue got fixed for me, thank you very much.

vaxerski commented 6 months ago

aarrgghh git

vaxerski commented 6 months ago

patchtttt.txt try this

vaxerski commented 6 months ago

screencopy was not touched. it's only for normal usage

Fxzzi commented 6 months ago

Vax, the patch u sent is empty btw

vaxerski commented 6 months ago

fucking git patchtttt.txt

Fxzzi commented 6 months ago

patch still failing on v0.34.0

FAILED: CMakeFiles/Hyprland.dir/src/config/ConfigManager.cpp.o 
/usr/bin/c++ -DHAS_EXECINFO -DHyprland_EXPORTS -DUSES_SYSTEMD -DWLR_USE_UNSTABLE -I/home/faaris/Hyprland/. -I/home/faaris/Hyprland/src -I/home/faaris/Hyprland/subprojects/wlroots/include -I/home/faaris/Hyprland/subprojects/wlroots/build/include -I/home/faaris/Hyprland/subprojects/udis86 -I/home/faaris/Hyprland/protocols -I/home/faaris/Hyprland/subprojects/udis86/libudis86 -isystem /usr/include/libdrm -isystem /usr/include/pango-1.0 -isystem /usr/include/cairo -isystem /usr/include/freetype2 -isystem /usr/include/harfbuzz -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/include/pixman-1 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -isystem /usr/include/libpng16 -isystem /usr/include/sysprof-6 -O3 -DNDEBUG -std=gnu++23 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -pthread -Winvalid-pch -include /home/faaris/Hyprland/build/CMakeFiles/Hyprland.dir/cmake_pch.hxx -MD -MT CMakeFiles/Hyprland.dir/src/config/ConfigManager.cpp.o -MF CMakeFiles/Hyprland.dir/src/config/ConfigManager.cpp.o.d -o CMakeFiles/Hyprland.dir/src/config/ConfigManager.cpp.o -c /home/faaris/Hyprland/src/config/ConfigManager.cpp
/home/faaris/Hyprland/src/config/ConfigManager.cpp: In lambda function:
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2307:17: error: ‘wlr_output_enable_adaptive_sync’ was not declared in this scope
 2307 |                 wlr_output_enable_adaptive_sync(m->output, 0);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2309:22: error: ‘wlr_output_commit’ was not declared in this scope; did you mean ‘wlr_output_init’?
 2309 |                 if (!wlr_output_commit(m->output))
      |                      ^~~~~~~~~~~~~~~~~
      |                      wlr_output_init
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2316:17: error: ‘wlr_output_enable_adaptive_sync’ was not declared in this scope
 2316 |                 wlr_output_enable_adaptive_sync(m->output, 1);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2318:22: error: ‘wlr_output_test’ was not declared in this scope; did you mean ‘wlr_output_init’?
 2318 |                 if (!wlr_output_test(m->output)) {
      |                      ^~~~~~~~~~~~~~~
      |                      wlr_output_init
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2323:22: error: ‘wlr_output_commit’ was not declared in this scope; did you mean ‘wlr_output_init’?
 2323 |                 if (!wlr_output_commit(m->output))
      |                      ^~~~~~~~~~~~~~~~~
      |                      wlr_output_init
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2340:17: error: ‘wlr_output_enable_adaptive_sync’ was not declared in this scope
 2340 |                 wlr_output_enable_adaptive_sync(m->output, 1);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2342:22: error: ‘wlr_output_test’ was not declared in this scope; did you mean ‘wlr_output_init’?
 2342 |                 if (!wlr_output_test(m->output)) {
      |                      ^~~~~~~~~~~~~~~
      |                      wlr_output_init
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2347:22: error: ‘wlr_output_commit’ was not declared in this scope; did you mean ‘wlr_output_init’?
 2347 |                 if (!wlr_output_commit(m->output))
      |                      ^~~~~~~~~~~~~~~~~
      |                      wlr_output_init
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2351:17: error: ‘wlr_output_enable_adaptive_sync’ was not declared in this scope
 2351 |                 wlr_output_enable_adaptive_sync(m->output, 0);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/faaris/Hyprland/src/config/ConfigManager.cpp:2353:22: error: ‘wlr_output_commit’ was not declared in this scope; did you mean ‘wlr_output_init’?
 2353 |                 if (!wlr_output_commit(m->output))
      |                      ^~~~~~~~~~~~~~~~~
      |                      wlr_output_init
[52/114] Building CXX object CMakeFiles/Hyprland.dir/src/debug/HyprCtl.cpp.o
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:15: release] Error 1
make[1]: Leaving directory '/home/faaris/Hyprland'
make: *** [Makefile:31: all] Error 2
vaxerski commented 6 months ago

thats a patch for latest git you knob