omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Screen tearing(or scroll going down and up) on both browsers(chromium and brave) after update

Open Linar46 opened this issue 3 months ago • 12 comments

System details

Lenovo Ideapad 5 rtx 3050 ryzen 5600h

What's wrong?

Image scroll goes down and up infinitely it happened in other sites. so its not site specific problem.

Linar46 avatar Aug 30 '26 11:08 Linar46

Image

Linar46 avatar Aug 30 '26 11:08 Linar46

switching off hardware acceleration helped.

Linar46 avatar Aug 30 '26 11:08 Linar46

Confirming this on another hybrid laptop, with a narrower cause and a workaround that does not require turning hardware acceleration off.

What's happening

On long pages (x.com and others), scrolling gets stuck oscillating up/down. At the same time the last ~40px of the page viewport is unpainted, so the Omarchy wallpaper shows through the bottom of the Brave window. Keyboard, mouse-wheel, and touchpad scroll all trigger it; it is not input-device specific.

This started after Brave 1.94.117 (Chromium 152), installed here on 2026-08-30 — same day this issue was opened.

A/B

Default Wayland Brave (Omarchy flags, including --ozone-platform=wayland) reproduces.

A clean profile launched with only:

brave --user-data-dir=/tmp/brave-test --use-angle=egl

does not reproduce on the same sites.

So this is the Chromium 152 Vulkan/ANGLE backend failing to fully damage/repaint the Wayland viewport. Scroll offset keeps updating against a hole in the buffer, which looks like tearing / infinite up-down wiggle. That matches "switching off hardware acceleration helped" in the earlier comment, but --use-angle=egl is a smaller hammer (keeps GPU compositing, switches ANGLE off Vulkan).

Upstream: brave/brave-browser#52266 (still open; same --use-angle=egl workaround). No Brave/Chromium stable update currently available actually fixes it — 1.94.118/119 and Chromium 152.0.7977.75 are still M152.

Omarchy angle

Stock config/chromium-flags.conf forces native Wayland and does not pin an ANGLE backend, so Brave 1.94 / Chromium 152 land on the broken default.

This machine also has the 4.0.1+ hybrid NVIDIA env (LIBVA_DRIVER_NAME=nvidia, NVD_BACKEND=direct, __GLX_VENDOR_LIBRARY_NAME=nvidia) from nvidia.lua, while the display and browser GL are on the Intel iGPU (renderD129). Related: #8215 / #8328 / #9096. The --use-angle=egl A/B still isolated the paint/scroll bug to ANGLE Vulkan rather than VAAPI decode.

Suggested distro workaround

Until Chromium 152 Vulkan/ANGLE on Wayland is fixed upstream, consider adding to the default Chromium/Brave flags:

--use-angle=egl

System details

  • Omarchy 4.0.2-1, kernel 7.1.9-arch1-2, Hyprland 0.56.2
  • System76 Gazelle (gaze16-3050): Intel i7-11800H + UHD Graphics (i915, drives eDP-1 1920x1080@144) + RTX 3050 Ti Mobile (nvidia-open-dkms 610.57.04, no display)
  • brave-bin 1.94.117 (Chromium 152.0.7977.64), chromium 151.0.7922.173, mesa 26.2.1
  • Session: Wayland; LIBVA_DRIVER_NAME=nvidia NVD_BACKEND=direct __GLX_VENDOR_LIBRARY_NAME=nvidia

I can attach a short recording of the wiggle and a screenshot of the wallpaper bleed at the bottom of the viewport.

spencerflagg avatar Sep 02 '26 11:09 spencerflagg

i leave it here, didn't checked it yet.

● 50/50 sites, both browsers, both inputs — that's a system-level mechanism, not site JS or one browser's scroll code. There's one suspect I haven't checked that fits this pattern exactly: Panel Self Refresh (PSR) on AMD laptops. PSR lets the panel redraw from its own memory; when it misbehaves you get exactly this — content-dependent tearing bands and scroll position appearing to jump back/forth, affecting all apps on some pages. Checking whether it's active:

● Bash(cat /sys/module/amdgpu/parameters/dcdebugmask 2>/dev/null; echo '== dmesg psr =='; journalctl -k -b 2>/dev/null | grep -iE 'psr|panel self' | head -5; echo '==…) ⎿  0 == dmesg psr == == bootloader == … +4 lines (ctrl+o to expand) ⎿  Allowed by auto mode classifier

Thought for 18s (ctrl+o to expand)

● dcdebugmask = 0 → PSR is enabled if the panel supports it (and no logs due to loglevel=0). Let me confirm PSR's live state and find your bootloader:

Thought for 15s, listed 1 directory (ctrl+o to expand)

● Bootloader is Limine (/boot/limine.conf). PSR state is root-only, and I don't want to hang on a sudo password prompt — can you run this one command for me? Type it in the prompt with the ! prefix so I see the output:

! sudo find /sys/kernel/debug/dri/0 -iname 'psr' 2>/dev/null -exec sh -c 'echo "=== $1"; cat "$1"' _ {} ;

Meanwhile, here's where I've landed:

The working theory: PSR (Panel Self Refresh) on AMD laptops. When PSR is enabled (your dcdebugmask=0 means it is, if the panel supports it), the panel sometimes keeps showing its internal stale frame while the system renders new ones — the result is horizontal tear bands during scroll, content that appears to jump back-and-forth (the "infinite up/down"), and it's content-dependent (exactly your 50/50 sites). It would hit both browsers and both input devices equally, and nothing we've changed so far touches it — which fits everything you've reported.

The fix if PSR is active: add amdgpu.dcdebugmask=0x10 to the kernel command line in /boot/limine.conf (one line, needs sudo) and reboot. That bit disables PSR; it's the standard fix for AMD laptop flicker/tear artifacts.

Also worth doing while you're at it: if you can, record a quick clip of the behavior with omarchy screenrecord --fullscreen then omarchy screenrecord --stop and tell me the output path — I can extract frames and see the artifact with my own eyes instead of reasoning about it blind.

Linar46 avatar Sep 02 '26 19:09 Linar46

Phone recording of a related scroll-wheel failure on Omarchy (Chromium, 2026-09-21):

https://www.youtube.com/watch?v=X-1-8Jh2llE&list=PLPd55o9BYEkQ

What the clip shows: spinning the mouse wheel on a long page (grok.com) until it hits the bottom of the scrollable view. The page does not simply stop. The screen flashes, a purple overlay pops in and out, and the browser then hard-flashes to another tab (Slack). It reads as an overscroll bounce turning into a refresh / tab-switch loop, rather than only the infinite up/down wiggle in the original report.

Unlisted, on a new Omarchy playlist. Happy to add system details if useful.

lukejmorrison avatar Sep 21 '26 17:09 lukejmorrison

I read this report and the comments against the current quattro source. I did not try to reproduce it: our test machines are virtual machines with an emulated GPU, and this only shows up on hybrid NVIDIA laptops with real hardware acceleration.

What Omarchy does on these machines. Both machines described here are hybrid laptops where the integrated GPU drives the screen and the NVIDIA card does not. Up to and including 4.0.4, default/hypr/nvidia.lua set LIBVA_DRIVER_NAME=nvidia and __GLX_VENDOR_LIBRARY_NAME=nvidia for the whole session whenever a recent NVIDIA GPU was present. The second report confirms those were set. That points the browser's video and GL driver selection at NVIDIA while it renders on the integrated GPU, and it is the known cause of broken browser rendering on hybrid laptops in #8215. On quattro, 6ecf4bf (#11690) only sets those two when the NVIDIA card is the boot display device, which covers both AMD and Intel hybrids. It is not in a release yet, and it needs a reboot after updating to take effect.

What is not established. I can't show that those variables cause the scroll oscillation in particular. The --use-angle=egl comparison is suggestive, but it changed more than the ANGLE backend: it also used a fresh profile and dropped every Omarchy flag (Wayland, the overscroll history navigation feature, the password store and the bundled extensions). The upstream Brave issue it cites, brave/brave-browser#52266, is a different bug: UI corruption after the screen blanks and wakes, reported against Chromium 144. It doesn't describe scroll oscillation, and it predates Chromium 152. Panel Self Refresh is an AMD display setting, so it can't explain the Intel machine in the second report. For that reason we are not adding --use-angle=egl to Omarchy's default flags on this evidence.

The recording of the mouse wheel making Chromium flash and switch tabs looks like a different problem. If it keeps happening, please open it as its own issue with your system details.

What would settle it. @Linar46, @spencerflagg: please turn hardware acceleration back on, quit the browser completely, then start it from a terminal with only the NVIDIA overrides removed and nothing else changed (same profile, same page):

env -u LIBVA_DRIVER_NAME -u __GLX_VENDOR_LIBRARY_NAME -u NVD_BACKEND chromium

(or brave in place of chromium). Then tell us whether the scroll still oscillates, along with your omarchy-version and the text of chrome://gpu from that run (brave://gpu in Brave), which shows which backend actually ran. If it stops, this is the hybrid NVIDIA environment, and the fix on quattro covers it. If it doesn't, the browser's graphics backend is the next suspect, and we'll compare --use-angle against an otherwise identical launch.

Codex at medium effort reviewed this diagnosis as a second opinion and agreed with it, though its independence from this review isn't guaranteed. This issue is waiting on the test above.

omarchybot avatar Oct 09 '26 09:10 omarchybot

Hardware Acceleration turned on

pkill brave
env -u LIBVA_DRIVER_NAME -u __GLX_VENDOR_LIBRARY_NAME -u NVD_BACKEND brave-origin. 

Fixed screen tearing

Linar46 avatar Oct 10 '26 17:10 Linar46

to permanently apply flags write this: /usr/bin/brave-origin:

#!/usr/bin/env bash

XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"${HOME}/.config"}"

CONF_FILE="${XDG_CONFIG_HOME}/brave-origin-flags.conf"

CONF_LIST=()
FLAG_LIST=()

if test -f "${CONF_FILE}"; then
    mapfile -t CONF_LIST < "${CONF_FILE}"
fi

for CONF_LINE in "${CONF_LIST[@]}"; do
    if ! [[ "${CONF_LINE}" =~ ^[[:space:]]*(#|$) ]]; then
        FLAG_LIST+=("${CONF_LINE}")
    fi
done

export CHROME_VERSION_EXTRA='stable'

unset LIBVA_DRIVER_NAME
unset __GLX_VENDOR_LIBRARY_NAME
unset NVD_BACKEND

exec /opt/brave-origin-bin/brave-origin "${FLAG_LIST[@]}" "$@"

Linar46 avatar Oct 10 '26 17:10 Linar46

Thanks @Linar46, that settles the cause. With hardware acceleration on and only LIBVA_DRIVER_NAME, __GLX_VENDOR_LIBRARY_NAME and NVD_BACKEND removed from Brave's environment, the scrolling is fixed, so this is the session-wide NVIDIA environment Omarchy sets on hybrid laptops, not Chromium's ANGLE backend. --use-angle=egl is not needed.

Where the fix is. Up to 4.0.4, default/hypr/nvidia.lua sets the first two whenever a recent NVIDIA GPU is present, which sends the browser to NVIDIA's video and GL drivers while it draws on the integrated GPU. On quattro, 6ecf4bf (#11690) sets them only when the NVIDIA card is the boot display device, and 28405af asks for a reboot after updating, since Hyprland only picks up its environment at startup. NVD_BACKEND is still set, but it is read only by NVIDIA's VA-API driver, which the browser no longer loads once LIBVA_DRIVER_NAME is gone. The fix is not in a release yet; #13902 backports it to 4.0.4 and is waiting on the maintainer.

Until it ships, your wrapper works, or the same three env -u overrides in a desktop entry. Remove it after updating and rebooting.

One thing would confirm the fix detects your machine correctly, if you have a moment: the output of grep . /sys/bus/pci/devices/*/boot_vga. The fix relies on the integrated Radeon reporting 1 there and the RTX 3050 not.

I read the reply against the current quattro source and did not run anything; this needs real hybrid hardware. Codex at medium effort reviewed it as a second opinion: it agreed the change stops setting the two variables that matter, and pointed out that a machine where no GPU claims the boot display keeps the old behaviour, which is what the check above is for. Its independence from this review isn't guaranteed. This issue is waiting on the maintainer to release the fix.

omarchybot avatar Oct 11 '26 02:10 omarchybot

~ ❯ grep . /sys/bus/pci/devices/*/boot_vga
1

Linar46 avatar Oct 11 '26 10:10 Linar46

Thanks @Linar46, that answers it. A single 1 with no filename in front means exactly one device on your machine has a boot_vga file, and it is the boot display. The kernel only creates that file for VGA-class devices: on AMD and NVIDIA hybrid laptops like the Ideapad 5, the integrated Radeon is a VGA device and the RTX 3050 is a "3D controller" that never gets one. bin/omarchy-hw-nvidia-display therefore sees a non-NVIDIA boot display and no NVIDIA one, and skips LIBVA_DRIVER_NAME and __GLX_VENDOR_LIBRARY_NAME, which are the variables your test showed cause the problem. The only way that output could mean something else is if the laptop were set to use the NVIDIA card alone, and then NVIDIA really does drive the screen and setting them is correct.

So the fix on quattro (6ecf4bf, #11690) will detect your machine correctly. It is not in a release yet; #13902 backports it to 4.0.4 and is waiting on the maintainer. Keep your wrapper until you have updated and rebooted, then remove it.

I read your output against the detector on quattro and ran nothing, since this needs the real hardware. Codex at medium effort checked the same reasoning as a second opinion and agreed the detector returns "not the display" on this layout; it raised the NVIDIA-only setup as the one exception, covered above. Its independence from this review isn't guaranteed. This issue is waiting on the maintainer to release the fix.

omarchybot avatar Oct 11 '26 10:10 omarchybot

Fixed in Omarchy 4.0.5 by #11690. Update with omarchy update (or Update > Omarchy). If it still happens on 4.0.5, comment here and we'll reopen.

emirb avatar Oct 18 '26 07:10 emirb