You are not logged in.
Dear Arch Community,
TLDR; Question + ideal situation: why does the nouveau driver cause system freezes after some (random?) time? How might I further inspect this? I hope to run Wayland + Sway in the future
Background + specs:
I bought the Lenovo Yoga Slim 7 Pro X (14ARH7) in November 2022, and have used it with Arch ever since.
I cloned a previous install (Acer laptop with Intel + NVIDIA; arch + i3, in use since March, 2020) to the Lenovo laptop using Clonezilla, and have not experienced problems in daily use (work + leisure).
Current setup: (last 'sudo pacman -Syu': 13-06-23)
Kernel: 6.3.7-arch1-1
AMD system + NVIDIA; other specs as per (1)
xrandr
NVIDIA driver (nouveau module is blacklisted using kernel parameters)
optimus-manager + optimus-qt
i3wm
LVM on LUKS as per (2)
boot manager: rEFInd with Catalina theme
Links:
(1) Lenovo Yoga Slim 7 Pro X (Arch Wiki)
(2) LVM on LUKS (Arch Wiki)
Problem:
I would like to switch to Wayland to improve multi-monitor support on my system: using the 3K laptop monitor with a 1080p external monitor is challenging - scaling the windows is very difficult / annoying.
However, NVIDIA drivers are not officially supported on Wayland.
So far, I've tried starting Sway with the NVIDIA drivers using the 'unsupported' option from tty --> this does not work: Sway immediately identifies the NVIDIA drivers being installed and cancels launching.
This is also the case when starting Sway from tty after making sure that the integrated AMD drivers are active (using optimus-manager).
I've swapped the NVIDIA drivers for the nouveau drivers, and again tried running Sway --> this works, but after some (random?) time (5-10 minutes; maybe sooner), the system would freeze completely.
This behaviour of the nouveau driver is documented in the Arch Wiki (Lenovo Yoga Slim 7 Pro X (Video).
Unfortunately, no information as to why these freezes occur, is provided.
I've searched for a solution on Google, Reddit (Arch Linux subreddit; Linux subreddit; Lenovo subreddit; AMD subreddit; general search bar), and the Arch Forums using combinations/synonyms of:
"Lenovo", "Lenovo Yoga Slim Pro 7X"; "nouveau"; "system freeze", "freeze"; "Wayland"; "Sway"
Unfortunately, I could not find more information on this topic.
Finally, Hyprland (without following all modifications as per the Hyprland wiki) would attempt to start, but could not get past activating a seat; further, Hyprland seems not my taste in terms of animations etc. (I prefer working without those).
TLDR; Question + ideal situation: why does the nouveau driver cause system freezes after some (random?) time? How might I further inspect this? I hope to run Wayland + Sway in the future
Thank you in advance!
PS This is my first post - I'm happy to provide any extra information
PPS Edit: formatting
Last edited by polycythaemiavera (2023-06-19 08:49:06)
Offline
Get rid of optimus-manager in any and all cases for a system this new. Basic requirement for nvidia wayland anything to work is enabling modesetting https://wiki.archlinux.org/title/NVIDIA … de_setting did you do that?
Also the sway option is "--unsupported-gpu" did you use that? You mentioned using "--unsupported" which would be wrong.
Also note: https://github.com/swaywm/sway/wiki#i-h … -not-start
As for why the nouveau driver causes issues, that's the nouveau driver with modern nvidia cards, it simply not all too stable.
Last edited by V1del (2023-06-13 21:35:17)
Offline
Dear V1del,
Thank you for your quick response.
I can confirm that I started Sway using '--unsupported-gpu' instead of '--unsupported' as I posted yesterday.
Further, I did specify 'nvidia_drm.modeset=1' as a kernel parameter.
Since I use rEFInd, I added this to both:
/boot/refind_linux.conf
/boot/EFI/refind/refind.conf (manual boot stanza)
I did not add 'nvidia' etc. as a module to /etc/mkinitcpio.conf.
I'll try to install Sway again after deleting optimus-manager in the weekend and will report back in this post - also taking into account the information from the Sway wiki that you referenced.
Do you have any recommendations regarding turning off the dedicated GPU on this Optimus laptop?
Is nvidia-prime my best option when I want to switch between integrated/dedicated graphics on the fly?
Kind Regards!
Offline
Dear V1del,
I looked further into my issues regarding Wayland/Sway, and I've been able to successfully install and run both software packages.
I've taken the following steps:
Install sway (Wayland is a dependency of sway) and foot (default terminal in Sway, bound to $mod+Enter):
sudo pacman -S sway foot
Set DKMS for NVIDIA using nvidia_drm.modeset=1 --> set as kernel parameters in
/boot/refind_linux.confand
/boot/EFI/refind/refind.conf
Reboot into TTY
Within TTY, check which card Sway will use for starting:
udevadm info -a -n /dev/dri/card1 | grep boot_vga | rev | cut -c 2(as per your link to the Sway wiki) --> in my case, /dev/dri/card0 was the only card recognised while in TTY
WLR_DRM_DEVICES=/dev/dri/card0 sway --unsupported-gpu--> this would start Sway successfully [though with a warning that NVIDIA drivers are loaded] but freezing would occur after about 5 minutes
Uninstall optimus-manager and optimus-manager-qt as per your suggestions regarding NVIDIA/Optimus; reboot and re-start Sway --> after this, freezes did no longer occur - I'm not sure why this solved the issue as optimus-manager was not started automatically after starting Sway but maybe it is because optimus-manager is only meant for Xorg (as per https://github.com/Askannz/optimus-mana … us-manager --> perhaps the optimus-manager systemd service caused the freezes while on Wayland?
Install nvidia-prime to offload NVIDIA, as an alternative to optimus-manager --> this does not introduce freezes; I've been able to run Sway for 45 consecutive minutes without freezing
Messed around with configuring Sway and wofi, without issues so far
I had polkit already installed, so I did not need to look into seatd.
The only downside that I've discovered so far is (1) possibly decreased battery life (although using nvidia-prime needs further testing - I've never used it before), and (2) having to look into Wayland-compatible programs (e.g., wofi) but this was expected.
I know xorg-xwayland might solve #2 but I would prefer using Wayland-native programmes as much as possible.
Anyways, it seems this issue may be marked as solved as the freezes no longer occur.
I'll look further into migrating to Wayland in terms of software but that is besides this original issue.
Thank you for the help and time - really appreciate it!
Offline