You are not logged in.
Hello,
When the browser is not scrolling anything and the page standing still for a little time (about 3 seconds) the scroll after this time happens with a noticeable lag.
I am using multi GPU laptop and external monitor:
lspci -v | grep -e VGA -e driver | grep VGA -A 1
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-S UHD Graphics (rev 04) (prog-if 00 [VGA controller])
Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] (rev a1) (prog-if 00 [VGA controller])
Kernel driver in use: nvidiaThe WM is sway, I run it with *--unsupported-gpu* flag:
exec sway --unsupported-gpu -d 2>/tmp/sway.logThe DRM is enabled:
sudo cat /sys/module/nvidia_drm/parameters/modeset
YThis issue present for both firefox and chromium. I run firefox with prime offloading:
exec env __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json __NV_PRIME_RENDER_OFFLOAD=1 EGL_PLATFORM=wayland LIBVA_DRIVER_NAME=nvidia MOZ_DISABLE_RDD_SANDBOX=1 MOZ_ENABLE_WAYLAND=1 NVD_LOG=1 NVD_BACKEND=direct firefoxnvidia-smi
Tue Jul 15 10:49:30 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.64 Driver Version: 575.64 CUDA Version: 12.9 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4060 ... On | 00000000:01:00.0 On | N/A |
| N/A 40C P8 2W / 55W | 428MiB / 8188MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 3744 G sway 2MiB |
| 0 N/A N/A 4061 G /usr/lib/firefox/firefox 147MiB |
| 0 N/A N/A 4822 G /usr/bin/something 138MiB |
| 0 N/A N/A 6802 G kitty 23MiB |
| 0 N/A N/A 7146 G kitty 7MiB |
| 0 N/A N/A 8737 G kitty 7MiB |
+-----------------------------------------------------------------------------------------+I have managed to get rid of this issue if I tell wlroots to use only nvidia card for everything:
ls -l /dev/dri/by-path
total 0
lrwxrwxrwx 1 root root 8 Jul 15 10:27 pci-0000:00:02.0-card -> ../card1
lrwxrwxrwx 1 root root 13 Jul 15 10:27 pci-0000:00:02.0-render -> ../renderD128
lrwxrwxrwx 1 root root 8 Jul 15 10:27 pci-0000:01:00.0-card -> ../card0
lrwxrwxrwx 1 root root 13 Jul 15 10:27 pci-0000:01:00.0-render -> ../renderD129exec env WLR_DRM_DEVICES=/dev/dri/card0 sway --unsupported-gpu -d 2>/tmp/sway.logBut in this scenario, my eDP remains black and not detected by sway.
The same behavior completely is true for hyprland, which makes me think the issue is somewhere in the wlroots (for the eDP not detected issue) or in the laptop.
The only difference between hyprland and sway behavior is that setting this env:
env = AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1Makes hyprland detect eDP, while
WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1for sway makes no difference, the eDP detected only if this env is not present.
I would really like to know the root cause both of this issues if possible and understand how to debug and solve it. Thanks in advance for your wisdom.
Last edited by GuyWithNvidia (2025-10-06 08:42:45)
Offline
Why are you running your browser with PRIME offloading, can you reproduce if you don't? Very little of what you're going to do in. a browser will require the power the nvidia GPU provides and this might very well be the copying overhead becoming visible.
Offline
I do that because performance noticeably worse and browser has stable stuttering if I dont use PRIME. It seems like the issue with the scrolling lag is gone, however. To clarify, I test browser performance on external monitor with https://www.testufo.com/animation-time-graph.
Offline
I also believe this lag is a configuration issue with multi-GPU setup for the reason that I encountered that issue before, on different laptop also with the same GPU pair (Intel + nvidia), proprietary drivers and firefox with PRIME offloading. I would appreciate any advice on how to debug it, maybe I will be able to patch drivers or something and so on.
Offline
I test browser performance on external monitor
The external output being attached to the nvidia GPU…
I have managed to get rid of this issue if I tell wlroots to use only nvidia card for everything:
Can you disable the IGP in the UEFI?
The DRM is enabled:
Otherwise you'd not be running anything wayland on that chip.
However, add "nvidia_drm.modeset=1" to the https://wiki.archlinux.org/title/Kernel_parameters to block the simplydumb device and restore the normal card order.
All of that aside: https://wiki.archlinux.org/title/PRIME# … Management & enable the nvidia-persistenced.service (or disable RTD3)
Offline
Can you disable the IGP in the UEFI?
Yes, it worked, no noticeable stuttering and eDP works. Thank you, I will use this method if there will be nothing better.
"nvidia_drm.modeset=1"
Tried it, nothing changed.
All of that aside: https://wiki.archlinux.org/title/PRIME# … Management & enable the nvidia-persistenced.service
I installed https://aur.archlinux.org/packages/nvidia-prime-rtd3pm and enabled nvidia-persistenced, nothing seems to change.
(or disable RTD3)
I would like to try it but not sure how to do it
Offline
Thank you, I will use this method if there will be nothing better.
If you intend to permanently run an output and various clients or the entire session on the GPU anyway, this is by far the best solution.
I would like to try it but not sure how to do itYou set /sys/class/drm/card*/device/power_state to "on"
Offline
You set /sys/class/drm/card*/device/power_state to "on"
And how... do I do it? I suppose I cannot just write to it:
[root@arch ~]# echo "on" > /sys/class/drm/card0/device/power_state
-bash: echo: write error: Input/output errorthis might very well be the copying overhead becoming visible.
Could you please elaborate? How to debug/verify it or see some logs? I would love to know this.
On the side note, if disabling iGPU entirely is my best option, shall I mark it as solved or as workaround or how? In general this solution seems like an overhead to me.
Offline
Sorry, careless copypasta.
echo on | sudo tee /sys/class/drm/card*/device/power/controlOffline
echo on | sudo tee /sys/class/drm/card*/device/power/control
I tried it, no noticeable effects.
Offline
Hmm.. I might be getting crazy but I think the lag didnt do away, just became less, but the root cause is still there. I will try to setup debugging logs for the GPU drivers, maybe there will be something to work with
Offline
Just to close the thread I would like to tell that testing with https://www.testufo.com/animation-time-graph revealed the problem with firefox on wide monitors. Same monitor with same resolution on chromium side by side with firefox does not report any issues, which suggest this is a firefox thing.
Offline
Please don't use "closed", that's for moderators when they lock threads.
Use sth. like "solved" or "abandoned" - wrt the browser differences, is either an xwayland client?
https://wiki.archlinux.org/title/Waylan … plications
https://wiki.archlinux.org/title/Firefox#Xwayland
Offline