You are not logged in.

#1 2021-10-17 03:06:38

KorvinSilver
Member
Registered: 2018-10-27
Posts: 21

Random freezes and glitches on laptop with RTX 3050 Ti

Hi,

I've been experiencing issues with random freezes and other glitches whenever I set my dGPU as the primary GPU. Since I bought it I updated the kernel and driver multiple times but nothing changed and I simply can't find any solution anywhere. Randomly the mouse freezes for a very short time, maybe half a second, then jumps to wherever I wanted to move it. I think everything else freezes as well but impossible to confirm since there's no time. I don't see any suspicious hardware usage, everything seems normal in any system monitor. The keyboard also acts up, as I type sometimes it just lags for a moment, and sometimes a keypress gets stuck and repeats at full speed until I press something else. This is not hardware specific, any keyboard, the internal and external ones do it. The same for the cursor freezes, I can reproduce it with the touchpad, mice and my trackball. Also not environment specific, I have this in KDE, Gnome, LXQt, Xfce, anything graphical. I don't if I run Wayland but so far I couldn't figure out how to make the nvidia drivers load so that's not relevant.
Weirdly I don't see these glitches if I run games, they either don't occur or these freezes are just "visual" issues, but could be that the game hides them somehow... and I also don't type long sentences while gaming, so can't compare the two. If I remove everything nvidia specific from the kernel parameters and GRUB config and let only the Intel driver load, it doesn't have any of these issues. Actually I don't have any specific driver installed, only what comes with the base setup.

I tried adding things to my Xorg config files that could help freezes according to forums, I also tried installing evdev and using that with USB devices, but nothing helped. There's also another issue that some windows are black. If I send an embedded video in Discord to fullscreen, it's just a black screen. The playback starts but can't see anything, and the origin of the video doesn't matter, it can be YouTube, Facebook, Reddit or other, doesn't matter. I also see a black screen only if I open Steam, both versions. The window is visible but everything inside is black. The Big Picture mode works, however and games can be started. Something similar happens with Minecraft, in KDE if I hide the window borders, the rest of the game goes black, but that comes back after I minimize it.

I followed the guide on the Arch Wiki on how to set "NVIDIA graphics only".

Asus TUF Gaming F15 with
16 GB RAM
Intel Core i7-11800H
Nvidia GeForce RTX 3050 Ti

/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
----
Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    Option "AllowIndirectGLXProtocol" "off"
    Option "TripleBuffer" "on"
    Option "ForceFullCompositionPipeline" "true"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection
.xinitrc
----
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
/etc/default/grub
----
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
#GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 nvidia-drm.modeset=1 usbcore.autosuspend=-1"
[...]
/etc/mkinitcpio.conf
----
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
#MODULES=(crc32c-intel vmd)
MODULES=(crc32c-intel vmd nvidia nvidia_modeset nvidia_uvm nvidia_drm)
[...]

`crc32c-intel vmd` is for encryption.

Here's my Xorg.0.log https://0x0.st/-klf.log
Here's one from when the evdev config was active https://0x0.st/-gVb.log
My journal since boot https://0x0.st/-klO.txt
And a journal from a boot with evdev in the config files https://0x0.st/-gVc.txt

This was the config file for evdev, currently backed up: https://0x0.st/-gVh.bak
And this is the one for libinput, using this now: https://0x0.st/-gVF.conf

Last edited by KorvinSilver (2021-10-17 03:09:28)

Offline

#2 2021-10-17 20:39:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,487

Re: Random freezes and glitches on laptop with RTX 3050 Ti

Drop composition pipeline and triplebuffer from the config and add i915 to your mkinitcpio modules would be my first suggestions here.

FWIW with hardware this new you might also be interested to just opt for nvidia prime rather than running the entire session on the nvidia card: https://wiki.archlinux.org/title/PRIME# … er_offload

Last edited by V1del (2021-10-17 20:41:19)

Online

#3 2021-10-19 11:52:57

KorvinSilver
Member
Registered: 2018-10-27
Posts: 21

Re: Random freezes and glitches on laptop with RTX 3050 Ti

V1del wrote:

Drop composition pipeline and triplebuffer from the config and add i915 to your mkinitcpio modules would be my first suggestions here.

Tried it, no difference.

V1del wrote:

FWIW with hardware this new you might also be interested to just opt for nvidia prime rather than running the entire session on the nvidia card: https://wiki.archlinux.org/title/PRIME# … er_offload

Tried that but the performance hit is just too bad. Also tried nvidia-xrun but it messes with KDE, I often have to reboot to get back in (if I stay logged in, the session can just break). I also often lose my favorites in Kickoff. Not sure why Xfce in another X interferes with it. Right now I have linux and linux-lts set up and manually configure linux-lts without the nvidia modules and remove the nvidia-specific parameters from grub.cfg on its entries. It's a reboot when I want to switch but so far this is the least problematic workaround.

Edit: forgot about it but also tried optimus-manager, but no graphics with it at all. The logs don't show why, it just doesn't start and couldn't figure it out yet.

Last edited by KorvinSilver (2021-10-19 12:03:44)

Offline

#4 2021-10-19 12:50:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,487

Re: Random freezes and glitches on laptop with RTX 3050 Ti

All of these other methods aside from PRIME offload are in essence the same thing as you configure with the xorg config, so these can by definition not give you different "better" results, or if they did you could copy the relevant xorg config adjustments

I am thinking that this might also be related to some intel GPU regressions that we've had recently. Can you try downgrading mesa to 21.1.6 ? https://wiki.archlinux.org/title/Arch_Linux_Archive

You mention the LTS kernel, can you reproduce the same issue if you actively use nvidia on LTS? That would've been another suggestion to check whether it might be a regression in newer kernels.

Online

#5 2021-10-19 16:50:04

KorvinSilver
Member
Registered: 2018-10-27
Posts: 21

Re: Random freezes and glitches on laptop with RTX 3050 Ti

V1del wrote:

All of these other methods aside from PRIME offload are in essence the same thing as you configure with the xorg config, so these can by definition not give you different "better" results, or if they did you could copy the relevant xorg config adjustments

I am thinking that this might also be related to some intel GPU regressions that we've had recently. Can you try downgrading mesa to 21.1.6 ? https://wiki.archlinux.org/title/Arch_Linux_Archive

You mention the LTS kernel, can you reproduce the same issue if you actively use nvidia on LTS? That would've been another suggestion to check whether it might be a regression in newer kernels.

LTS has the same issue, that was among the first things I tried, and I also tried the beta nvidia driver. I'll check with downgrading mesa

Offline

#6 2021-10-21 20:50:52

KorvinSilver
Member
Registered: 2018-10-27
Posts: 21

Re: Random freezes and glitches on laptop with RTX 3050 Ti

mesa 21.1.6, same issues.

Offline

#7 2021-11-03 15:58:05

KorvinSilver
Member
Registered: 2018-10-27
Posts: 21

Re: Random freezes and glitches on laptop with RTX 3050 Ti

I'm not entirely certain yet due to the nature of the issue but so far after upgrading to nvidia 495.44 it seems fine. I'll close this as solved if it won't come back in a day or two after I ran the system with only the nvidia card continuously.

knock
wood

Last edited by KorvinSilver (2021-11-03 16:00:02)

Offline

Board footer

Powered by FluxBB