You are not logged in.
Unsure if incomplete update is related; ssh connection dropped while updating (last update was over a week ago). I relogged and started update again, re-installed every package and cleanbuilt where necessary. System boots fine (I have arch + zen kernel) and everything works.. except;
When opening (and running) certain apps, I get massive lag spikes, but no correlated excessive CPU or RAM usage.
Xterm doesn't lag at all, but when I try to open kitty or xfce-terminal, the mouse lags like crazy and it takes several seconds to start the apps.
Same with Steam and Firefox. Firefox seems to calm down after a while and I'm able to login and post this. But if I open a new firefox window, lag spike.
I suspected it was an issue with X (I've got niri and i3, both have the same problem, so not a wayland issue) so I reinstalled packages related to X. Logs don't contain much but I often get:
libinput error: event2 - Lite-On Technology Corp HP USB Slim Keyboard - Skylab: client bug: event processing lagging behind by 78ms, your system is too slow
And similar for mouse.
Maybe a GTK or QT issue? All packages are up to date. Checkrebuild has two unrelated packages, dotnet-runtime-7.0-bin / thinlinc-server.
Any tips on what else I can try or check?
EDIT:
I just tried rolling back the Nvidia drivers (DKMS) since there seems to be issues with the latest available, no luck.
Last edited by luthis (2025-12-17 00:27:37)
Offline
Sanity check, Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General and the output of
glxinfo -BAnd does glxgears cause such lags?
Offline
Nothing in Xorg logs, I'll see if I can fix that.
glxgears does cause lag on open for a few seconds.
I've narrowed it down a bit more, some apps are only having lag on open (Steam) and then after a while the lag stops. Running a game results in periodic lag spikes. Again, no excessive CPU usage, or lines in htop I can see that correlate. Firefox works fine now, but when opening, I get the severe lag.
glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 24576 MB
Total available memory: 24576 MB
Currently available dedicated video memory: 23752 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3090/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 580.95.05
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6.0 NVIDIA 580.95.05
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 580.95.05
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20Haruna has such bad lag, nothing is watchable. mplayer however, works totally fine.
Last edited by luthis (2025-12-15 16:26:58)
Offline
Please use [code][/code] tags. Edit your post in this regard.
Afair mplayer on wayland will run in pure software.
Anything suspicious in the system journal? nvidia errors? IO errors?
Do you have a problem w/ the __GL_SHADER_DISK_CACHE_PATH location?
Is __GL_SHADER_DISK_CACHE=1 ?
Offline
There is absolutely nothing in journal when the issue occurs, but I did notice this earlier:
niri-session[2213]: libinput error: event6 - Logitech G604 : client bug: event processing lagging behind by 48ms, your system is too slow
niri-session[2213]: 2025-12-15T10:56:09.061590Z ERROR smithay::backend::renderer::gles: [GL] GL_INVALID_VALUE error generated. Size and/or offset out of range.
niri-session[2213]: libinput error: client bug: timer button-debounce-debounce-event6: scheduled expiry is in the past (-42ms), your system is too slow
niri-session[2213]: libinput error: event6 - Logitech G604 : client bug: event processing lagging behind by 24ms, your system is too slow
niri-session[2213]: libinput error: event6 - Logitech G604 : client bug: event processing lagging behind by 23ms, your system is too slow
niri-session[2213]: libinput error: event6 - Logitech G604 : client bug: event processing lagging behind by 65ms, your system is too slow
niri-session[2213]: libinput error: client bug: timer button-debounce-debounce-event6: scheduled expiry is in the past (-20ms), your system is too slow
systemd[1]: systemd-timedated.service: Deactivated successfully.
niri-session[2213]: libinput error: client bug: timer button-debounce-debounce-event6: scheduled expiry is in the past (-46ms), your system is too slow
niri-session[2213]: libinput error: client bug: timer button-debounce-debounce-short-event6: scheduled expiry is in the past (-59ms), your system is too slowI have no __GL_* env variables, I'll try find out how and where those are set.
Tested those, no difference.
I have a ~/.nv and ~/.cache/nv, both have 700 permissions
Last edited by luthis (2025-12-15 19:38:14)
Offline
https://wiki.archlinux.org/title/Environment_variables
You're also getting this with not-niri, right?
Offline
Correct, I'm using Awesome (not i3) while testing to remove Wayland from the issue.
And I added these to .bashrc:
export __GL_SHADER_DISK_CACHE=1
export __GL_SHADER_DISK_CACHE_PATH="~/.nv"
After relog to Awesome, no change
I stated earlier that there was no correlating CPU usage, however, Firefox is using most of one core with one tab open. This level of usage shouldn't be causing the level of lag I'm getting though.
One other thing, when I run startx, it used to load the UI pretty quickly. Now, the monitor will report no input and then the desktop loads a couple seconds later. It takes unusually long.
...Firefox just figured out it's problem and now it's not laggy anymore, and usage dropped to 5% from >80%. Something is eating up a bunch of CPU time until whatever it is, gives up or fails and then everything is smooth again. But it's not a separate process I can spot in htop
Last edited by luthis (2025-12-15 20:01:40)
Offline
export __GL_SHADER_DISK_CACHE_PATH="~/.nv"The plan would be to use something like /tmp/nvidia.$USER or so in order to get away from your disk.
no correlating CPU usage, however, Firefox is using most of one core with one tab open … figured out it's problem and now it's not laggy anymore, and usage dropped to 5% from >80%
And what did you change about firefox?
Offline
SOMETHING CHANGED AND IT IS WORKING NOW!
I rebuilt xdg desktop portal (https://wiki.archlinux.org/title/XDG_Desktop_Portal)
And downgraded xdg-desktop-portal-hyprland-git
And also rebooted after adding the exports for the variables above. I have no idea which one of those actions made the difference.
I'll test removing the env vars, etc. Just as soon as I have played some Elite Dangerous...
I did nothing to Firefox, it just stopped being laggy after several minutes. I meant Firefox itself figured out it's own problem
Last edited by luthis (2025-12-15 20:12:49)
Offline
Whatever happened, it reverted itself and the issue returned. I hadn't made any changes, so I'm at a loss.
Only happens in a graphical environment. I run a jellyfin server and there's no lag there, even when I am getting major lag in the DE.
All packages are up to date. System has been rebooted.
I'm starting to wonder if it's time for a re-install.
Offline
Please post your complete system journal for the boot:
sudo journalctl -b | curl -F 'file=@-' 0x0.stOffline
Sure,
https://0x0.st/PrdN.txt Let me know if there's any other info I can provide.
I suspect it is an issue with Xorg, because in htop when it's laggy, it will show high CPU usage (single core) for whatever application, and this for Xorg:
/usr/lib/Xorg -nolisten tcp :0 vt1 -keeptty -auth /tmp/serverauth.K8GoP1GX3m
But it's by no means maxing out my CPU, there are another 11 cores barely utilised when this is happening.
Last edited by luthis (2025-12-18 01:43:57)
Offline
I tried rolling back to 1 Nov, but amazingly, issue still persists.
Offline
The journal is only 10 minutes - it does cover experiencing such lags?
I would have speculated that the issue was maybe reintroduced w/ the nvidia update, https://bbs.archlinux.org/viewtopic.php?id=311055
But apparently not?
Disable dhcpcd and ntpd (you're running NM an systemd-timesync - this could be network an/or time sensitive) and reboot.
And then, in doubt, in doubt dockerd/containerd (mostly worried about the docker vbr devives, we'll see)
Offline
Yep, as soon as the desktop environment loads, it lags. It stops after a while (seconds/minutes) until I open another app like Firefox or steam, and then major lag / stuttering again. The lagging does eventually stop again, but not with any regularity.
I did roll back everything:
lib32-nvidia-utils 580.95.05-1
linux-firmware-nvidia 20251021-1
nvidia-dkms 580.95.05-1
nvidia-settings 580.95.05-1
nvidia-utils 580.95.05-1
opencl-nvidia 580.95.05-1And searched for any pacnew files (there's a few but nothing gfx related)..
but the issue (seemingly) only started happening after an update, that got stopped halfway. Maybe that is a distraction. Maybe there is a cache I should clear.
Using jellyfin (running in docker) has no issues.
It's only ever in the desktop environment, and only when I open apps that are using more modern graphics (ie xterm doesn't have this issue).
I'll try disabling dhcpcd and docker etc and testing, next time I'm able to.
Last edited by luthis (2025-12-18 20:51:11)
Offline
Also revisit
export __GL_SHADER_DISK_CACHE_PATH="~/.nv"The plan would be to use something like /tmp/nvidia.$USER or so in order to get away from your disk.
Temporary hefty GL lags either means lousy IO or the GPU has a hard time powering up so if it's not the above it might be a good idea to disable all power saving efforts
(but for the latter you'd expect no lag if a demanding process is already running, so some gl benchmark, demo or xscreensaver hack like /usr/lib/xscreensaver/glmatrix ![]()
Offline
I created a new user, super minimal configuration.
Issue still happens. So, it's either config or packages, outside of user (probably). I've reverted all packages to Nov 1, before the issue happened.
So I must assume that it's some config somewhere. Perhaps updated by newer packages, and then not reverted..
I tested with Mint on a live USB, and of course, it ran fine.
In the meantime, I've also removed almost everything I can, disabled unnecessary systemd unit files, renamed the .cache folder..
Sometimes in htop I'll see status D (This state is used if the process must wait without interruption or when the event is expected to occur quickly. Like reading to/from a disk. But that should only happen for a fraction of a second.) but this does disappear very quickly.
What bugs me most is that in my initial fiddling around, the issue resolved itself temporarily. But it's unclear if that is due to me or just randomness.
Offline
This may not be an Arch specific issue...
I installed Mint to a different drive, and I get the same problem.
When loading firefox or steam or thunderbird, I'll get the severe lag for 10+ seconds.
Offline
Benchmark all involved drives, https://wiki.archlinux.org/title/Benchmarking#dd
Do you get any of this when runnging https://grml.org/ from a usb key?
(It'll run from RAM and leave your disks alone)
Offline
Benchmarking (unmounted all other drives)
dd if=/dev/zero of=~/tempfile bs=1M count=1024 conv=fdatasync,notrunc status=progress
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.604685 s, 1.8 GB/s
echo 3 > /proc/sys/vm/drop_caches
dd if=tempfile of=/dev/null bs=1M count=1024 status=progress
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.49572 s, 2.2 GB/s
$ dd if=tempfile of=/dev/null bs=1M count=1024 status=progress
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.0536641 s, 20.0 GB/s
$ dd if=tempfile of=/dev/null bs=1M count=1024 status=progress
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.0529418 s, 20.3 GB/s
$ dd if=tempfile of=/dev/null bs=1M count=1024 status=progress
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.0529711 s, 20.3 GB/s
$ dd if=tempfile of=/dev/null bs=1M count=1024 status=progress
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.0529639 s, 20.3 GB/s
$ dd if=tempfile of=/dev/null bs=1M count=1024 status=progress
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.0530464 s, 20.2 GB/sI was not able to replicate the issue (using firefox) with the live distro on USB
Last edited by luthis (2025-12-21 22:44:28)
Offline
At ~2GB/s your $HOME partition doesn't seem to be the problem, but what about the other partitions in use (notably the root partitions)?
Do you get those lags when using nouveau instead of nvidia?
Offline
I haven't tried switching drivers yet, but I am suspecting that isn't the issue.. I've noticed it's taking a really long time to boot:
Startup finished in 34.033s (firmware) + 4.597s (loader) + 1min 31.634s (kernel) + 27.168s (userspace) = 2min 37.433s
graphical.target reached after 27.168s in userspace.
Startup finished in 33.893s (firmware) + 3.797s (loader) + 1min 31.868s (kernel) + 26.688s (userspace) = 2min 36.247s
graphical.target reached after 26.688s in userspace.
Startup finished in 33.827s (firmware) + 5.992s (loader) + 1min 31.652s (kernel) + 27.188s (userspace) = 2min 38.660s
graphical.target reached after 27.187s in userspace.
For comparison, it used to boot in under 30 seconds total.
After the GRUB screen, the loading image takes quite a long time. I removed the swap entries from fstab, because I was using swap on another drive, but no change.
I'll see if there is some disk checks I can run.
..
Hdsentinel says everything is fine.
It's at the 'loading initial ramdisk' step in GRUB that it takes ages. I don't remember this taking that long a couple days ago.
..
I reduced the load time by editing the mkinitcpio.conf
Startup finished in 32.944s (firmware) + 6.102s (loader) + 4.371s (kernel) + 32.758s (userspace) = 1min 16.177s
graphical.target reached after 32.758s in userspace.
#MODULES=(vfio_pci vfio vfio_iommu_type1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)
MODULES=()
#HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block numlock filesystems fsck)
HOOKS=(base udev autodetect modconf block filesystems fsck)this hasn't really helped with the lag though..
Last edited by luthis (2025-12-22 01:05:13)
Offline
I installed nouveau and somehow managed to get it right on the first try.
I can confirm, the issue does *not* occur.
The UI feels slightly laggy in general, but opening firefox/steam etc doesn't cause those massive lag spikes..
However, I tested Elite Dangerous, and in the menu I still get periodic lagging. I am not sure if it is due to the open source drivers, because it gives the same behaviour as the nvidia drivers. Every couple seconds, the sound will glitch and the mouse lags.
Last edited by luthis (2025-12-22 01:42:59)
Offline
For comparison, it used to boot in under 30 seconds total.
Did that also change w/ nouveau?
In any event, please post your complete system journal for a boot w/ the nvidia drivers:
sudo journalctl -b | curl -F 'file=@-' 0x0.stOffline
Startup finished in 16.570s (firmware) + 6.090s (loader) + 4.393s (kernel) + 24.700s (userspace) = 51.755s
graphical.target reached after 24.700s in userspace.
It does seem to have improved the boot time, yes
Logs uploaded:
http://0x0.st/PzHR.txtLast edited by luthis (2025-12-22 20:34:36)
Offline