You are not logged in.

#1 2024-04-26 22:11:17

Opifex
Member
Registered: 2020-05-11
Posts: 13

Screen regurlary freezes for a couple of seconds.

Hi all,

I installed Arch on a new PC a couple of weeks ago (this is only my 5th Arch install or so).
I've been a fan of i3 for years, but a colleague suggested I'd try Sway and Wayland. So that's what I did.

It took me a while to get everything working because I have an Nvidia GPU. On the Wiki it says Sway does not support the proprietary drivers. Only Nouveau. Thing is... initially the Nouveau drivers didn't work for me, but the proprietary ones did. Later on, after experiencing some more issues I tried the Nouveau again and this time it did work.
So now I run Sway with the `--unsupported-gpu` option, along with the Nouveau drivers.

So far, so good. Problem is... sometimes my screen freezes for a few seconds. Nothing moves, not even my mouse pointer. Sometimes it happens 5 times in a minute, sometimes it doesn't occur for half an hour. Sometimes it's half a second, sometimes it's more like 5 seconds frozen. It's not consistent.

I tried plotting graphs of CPU and memory usage, but they don't show any suspicious spikes. I also don't see anything popping up in the dmesg or journalctl when the freezes occur.


The main suspect for my problem would be the nouveau driver, because officially it doesn't support my GPU yet. (4060) However, I would like to confirm it somehow. I would like to find the "smoking gun" for my problem. Be it in logs or plots or whatever. I just want to be sure that I didn't do anything else wrong that might be causing this problem.

Anyone who can point me in the right direction for this?

Thanks!

Last edited by Opifex (2024-04-27 10:18:34)

Offline

#2 2024-04-26 22:30:06

seth
Member
Registered: 2012-09-03
Posts: 51,826

Re: Screen regurlary freezes for a couple of seconds.

The main suspect for my problem would be the nouveau driver

So now I run Sway with the `--unsupported-gpu` option, along with the Nouveau drivers.

the "--unsupported-gpu" is only necessary for but will allow you to run sway w/ the nvidia driver and this is mostly historic anyway, before nvidia supported GBM.

Offline

#3 2024-04-27 10:17:56

Opifex
Member
Registered: 2020-05-11
Posts: 13

Re: Screen regurlary freezes for a couple of seconds.

I wanted to try and remove the option, to check if what you said is true and it would still work, but.... I noticed it was already gone. I must have removed it before smile I will edit the start post to remove that.

Do you know if there's any way to check what's causing the stuttering though? Any ideas?

Offline

#4 2024-04-27 15:11:27

seth
Member
Registered: 2012-09-03
Posts: 51,826

Re: Screen regurlary freezes for a couple of seconds.

You wrote:

The main suspect for my problem would be the nouveau driver

Check the behavior w/ the nvidia driver, you however will require the parameter again.

Offline

#5 2024-04-27 18:32:56

Opifex
Member
Registered: 2020-05-11
Posts: 13

Re: Screen regurlary freezes for a couple of seconds.

I installed the nvidia drivers again, added nouveau to blacklist.conf and added --unsupported-gpu.

I now see flickering all the time, on all windows. This is not usable.

I wonder though if it might be related to not uninstalling the nouveau packages? Because I seem to be unable to do that, due to a bunch of dependencies.

Offline

#6 2024-04-27 19:00:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,831

Re: Screen regurlary freezes for a couple of seconds.

No nouveau should not be relevant beyond blacklisting the module (which nvidia-utils will do for you anyway) it sounds like you might be running on simpledrm instead.

Did you make sure to use the nvidia-drm.modeset=1 kernel parameter (not a modprobe.conf!)? https://wiki.archlinux.org/title/NVIDIA … de_setting which is both a basic requirement for Wayland and disables simpledrm as a side effect on Arch kernels

Last edited by V1del (2024-04-27 19:02:36)

Offline

#7 2024-04-27 20:27:04

Opifex
Member
Registered: 2020-05-11
Posts: 13

Re: Screen regurlary freezes for a couple of seconds.

V1del wrote:

(...) it sounds like you might be running on simpledrm instead.

Did you make sure to use the nvidia-drm.modeset=1 kernel parameter (not a modprobe.conf!)? https://wiki.archlinux.org/title/NVIDIA … de_setting which is both a basic requirement for Wayland and disables simpledrm as a side effect on Arch kernels

$ sudo cat /sys/module/nvidia_drm/parameters/modeset
Y

Should be correct, right?

I also tried the fbev option now. Same effect.

Offline

#8 2024-04-27 20:43:59

seth
Member
Registered: 2012-09-03
Posts: 51,826

Re: Screen regurlary freezes for a couple of seconds.

Make sure to use the kernel parameter, not a modprobe.d configlet, to get rid of the simpledrm device.
Is this possibly an optimus system?

lspci -k
cat /proc/cmdline

Offline

#9 2024-04-27 20:48:48

Opifex
Member
Registered: 2020-05-11
Posts: 13

Re: Screen regurlary freezes for a couple of seconds.

seth wrote:

Make sure to use the kernel parameter, not a modprobe.d configlet, to get rid of the simpledrm device.

I added it to my GRUB config:

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet nvidia_drm.modeset=1 nvidia_drm.fbdev=1"

Is this possibly an optimus system?

I have no idea what an optimus system is, so I'm assuming it's not?

lspci -k
cat /proc/cmdline

lspci
cmdline


EDIT: (Note that the above logs were created after switching back to the nouveau driver)

EDIT2: when starting something that uses the GPU heavily I see nouveau errors in dmesg related to GSP:

nouveau 0000:01:00.0: gsp: cli:0xc1d00002 obj:0x00730000 ctrl cmd:0x00731341 failed: 0x0000ffff

They don't show up when the screen freeze occurs and they don't appear to be having any bad effect, but... maybe they're related to the problem somehow?
I read about the nouveau-fw-gsp online, but it appears to conflict with linux-firmware. I'm hesitant to replace linux-firmware for this one. Especially because my card isn't even supported according to this page.

Last edited by Opifex (2024-04-27 20:52:28)

Offline

#10 2024-04-27 21:57:05

seth
Member
Registered: 2012-09-03
Posts: 51,826

Re: Screen regurlary freezes for a couple of seconds.

Please re-install the nvidia driver and post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

You can also just post an older journal from when it was used "… -b -3…" for 3 boots ago.

The AD107 chip being rather new might be the overall issue here.

Offline

#11 2024-04-27 22:25:19

Opifex
Member
Registered: 2020-05-11
Posts: 13

Re: Screen regurlary freezes for a couple of seconds.

seth wrote:

Please re-install the nvidia driver and post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

I've been swapping between Nouveau by uninstalling nvidia and nivdia-utils through Pacman all the time. (+ adding/removing blacklist + --unsupported-gpu). Was I supposed to do other things when reinstalling the driver?

Here's the journalctl log

The AD107 chip being rather new might be the overall issue here.

That's what I'm also afraid of. But I'm trying to confirm it somehow.

Offline

#12 2024-04-27 22:33:39

seth
Member
Registered: 2012-09-03
Posts: 51,826

Re: Screen regurlary freezes for a couple of seconds.

Was I supposed to do other things when reinstalling the driver?

No.

Have you ever tried the behavior w/o the "nvidia_drm.fbdev=1" parameter?
You're also starting sway from SDDM which itself runs on X11
If you boot only the multi-user.target (2nd link below) or disable SDDM and start https://wiki.archlinux.org/title/Sway#Manually  - do you get the same issues?
Do you also have the same flicker w/ https://wiki.archlinux.org/title/Weston ?

Offline

#13 2024-04-27 23:29:41

Opifex
Member
Registered: 2020-05-11
Posts: 13

Re: Screen regurlary freezes for a couple of seconds.

seth wrote:

Was I supposed to do other things when reinstalling the driver?

Have you ever tried the behavior w/o the "nvidia_drm.fbdev=1" parameter?

Yes. I only tried it for the first time a few hours ago, after seeing it in V1del's link. Before that, I didn't have it enabled.

You're also starting sway from SDDM which itself runs on X11
If you boot only the multi-user.target (2nd link below) or disable SDDM and start https://wiki.archlinux.org/title/Sway#Manually  - do you get the same issues?

Tried it on both nouveau and Nvidia. Nouveau still has the freezing issue, nvidia still has the flicker.

Do you also have the same flicker w/ https://wiki.archlinux.org/title/Weston ?

It appears to not flicker on Weston (Nvidia driver), nor do the freezes occur (Nouveau driver). Interesting...

Offline

#14 2024-04-28 07:13:12

seth
Member
Registered: 2012-09-03
Posts: 51,826

Re: Screen regurlary freezes for a couple of seconds.

So sway bug?
Tested hyprland, river or qtile (short of the fat ones, ie. gnome and KDE)?
https://wiki.archlinux.org/title/Wayland#Compositors

Offline

#15 2024-04-28 19:53:06

Opifex
Member
Registered: 2020-05-11
Posts: 13

Re: Screen regurlary freezes for a couple of seconds.

Okay, Hyprland hasn't displayed the freezing behavior so far. So I guess it's indeed a Sway bug.

So for now I'll stick with Hyprland, with Sway/i3 keybinds smile

Thanks for your help and patience Seth!

EDIT: I cheered too soon... I just got the freezes also on hyprland =/

EDIT2: The screen tearing doesn't appear to pop up though. So maybe this is the solution for now: nvidia driver + hyprland.

Last edited by Opifex (2024-04-28 20:46:40)

Offline

Board footer

Powered by FluxBB