Other Unable to get Sway compositor working on FreeBSD 14.0

Hi all,
I decided to try running Sway on my new FreeBSD 14.0 install. The system is already set up with X11 and i3wm. I wanted to see if I could also have an instance of Wayland and Sway as an option.
I followed the FreeBSD handbook, and after booting up, Sway is listed as an option in Lightdm. However, I have been unable to login successfully to Sway. I have listed what I have done below. Have I missed anything? I have an NVIDIA GPU. Is that a potential issue?
sudo pkg install wayland seatd
export XDG_RUNTIME_DIR=/var/run/user/`id -u`
sudo sysrc seatd_enable=”YES”
sudo service seatd start
sudo pkg install sway swayidle swaylock-effects alacritty dmenu-wayland dmenu
mkdir ~/.config/sway
cp /usr/local/etc/sway/config ~/.config/sway
Any help would be appreciated. And, if it turns out that it won't work with NVIDIA, that's fine. At least I'll know. Thanks ;-)
 
For nvidia, you need to install the drm driver x11/nvidia-drm-515-kmod (in addition to the regular one), and only explicitly load the nvidia-drm module (the kld_list should not contain other nvidia parts).
Then you need to export the variable WLR_NO_HARDWARE_CURSORS=1 to have a visible cursors.
Beware that you may have a lot of flickering on the screen.
 
I haven't gotten it working with NVidia. I tried with the drm-kmod--510 at the time, I think, and had no luck (with labwc, not sway, but I don't think it mattered.) Putting in the kmod wound up messing up my X11, so I gave up---but I haven't tried for a few months. FWIW, I did get labwc and dwl (a dwm substitute) working without problem on a laptap with an amdgpu.

Hopefully, at some point, the handbook will have a better chapter on wayland with NVidia, but for the moment, it doesn't work for me.
 
Thanks for the quick response. I am using older hardware and the current version of the drm driver is not compatible with the older NVIDIA graphics driver I have to use.
Thanks for your help. I will have another go shortly on a different laptop with AMD graphics.
Cheers.
 
Back
Top