Nvidia sway glitches + invisible mouse cursor

I choose the “kernel boot graphic” category but it’s certainly half-way between several topics.
So I have a NVIDIA Corporation GP107 GeForce GTX 1050, and it seems to wreak havoc with sway (1.8.1). There are constant glitches where the wallpaper flash through whatever application is in on top, and the mouse is invisible. Which makes using the computer nigh unusable, obviously.
Right now, I have xf86-video-nouveau installed, but I tried with nvidia-inst: same exact thing.

Thanks for your oh-so-appreciated help.

what do you have in ~/.profile ?


you can try

copy /etc/sway/config.d/50-systemd-user.conf to $home$/.config/sway/config.d
and make in ~/.config/environment.d/30-envars.conf some environmental as last resort…but …

would check this : Sway with Nvidia Tutorial

1 Like

Oh, thanks, the mouse’s back.
Now it’s “utterly unusable” to "usable but just super ugly :wink:
But with some chance, wlroots-nvidia will do away with the upper half screen glitches, which are mentioned for gaming but I suppose it can happen at any time.
now I can’t install it:

gpg: failed to receive from key server: No data
error: failed to launch: gpg --recv-keys 4100929B33EEB0FD1DB852797BC79407090047CA 9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A:

I would like to add, that the tutorial I wrote is out of date and things might have changed. Also try to uninstall xf86-video-nouveau if you want to go the Nouveau route. The wlroots-nvidia package will probably not help you, if you don’t also build sway from the AUR.

I would suggest you try installing the wlroots and sway git package and see if that helps.

yay -Syu wlroots-git sway-git

wait, I have to uninstall the nouveau driver to use nouveau ? I don’t get it

The nouveau driver is inside the mesa package. The xf86… driver is for DDX in Xorg. It may simply not be necessary or even cause problems.

Just try the git packages first, then disable . Most likely that will help a lot.

Are you using the --unsupported-gpu flag for sway, while trying the official nvidia package?

git is for me a choice…i dont have nvidia also :slight_smile:

git can have other things too i dont know whats up there only do when you know what you doing :slight_smile:

Meh, I don’t care either way, as long as it works. It’s a backup computer, I don’t intend to do gaming on it fortunately.
the compilations seems to fail:

sway 1.10-dev
xwayland : YES
gdk-pixbuf : YES
tray : YES
man-pages : YES
wlroots : NO Neither a subproject directory nor a wlroots.wrap file was found.
User defined options
auto_features : enabled
buildtype : plain
libexecdir : lib
prefix : /usr
sbindir : bin
wrap_mode : nodownload
python.bytecompile: 1
b_lto : true
b_pie : true
sd-bus-provider : libsystemd
Found ninja-1.11.1 at /usr/bin/ninja
==> Lancement de pkgver()…
==> Version mise à jour : sway-git 1.10.r7281.f7a0f06-1
==> Les sources sont prêtes.
==> Création du paquet sway-git 1.10.r7281.f7a0f06-1 (seg 05 fev 2024 19:24:20)
==> Vérification des dépendances pour l’exécution…
==> Vérification des dépendances pour la compilation…
==> ATTENTION : Utilisation de l’arbre $srcdir/ existant
==> Lancement de pkgver()…
==> Lancement de build()…
+ exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_lto=true -D b_pie=true -D python.bytecompile=1 sway-git build -D sd-bus-provider=libsystemd
The Meson build system
Version: 1.3.1
Source dir: /home/drm/.cache/yay/sway-git/src/sway-git
Build dir: /home/drm/.cache/yay/sway-git/src/build
Build type: native build
WARNING: failed to process netrc file: ~/.netrc access too permissive: access permissions must restrict access to only the owner (None, line None).
Project name: sway
Project version: 1.10-dev
C compiler for the host machine: cc (gcc 13.2.1 “cc (GCC) 13.2.1 20230801”)
C linker for the host machine: cc ld.bfd 2.42.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Neither a subproject directory nor a wlroots.wrap file was found.
Subproject wlroots is buildable: NO (disabling)

Ok, the glitches seem to have gone away, super !
But now I can watch videos (locally, not talking of youtube.
mpv says:

drm@drm-a960dv2 ~/I/animaux_portugal> mpv WhatsApp\ Video\ 2023-05-07
\ at\ 12.04.33.mp4
libEGL warning: egl: failed to create dri2 screen
(+) Video --vid=1 () (h264 352x640 29.752fps)
(+) Audio --aid=1 (
) (aac 2ch 48000Hz)
fish: Job 1, ‘mpv WhatsApp\ Video\ 2023-05-07…’ terminated by signal SIGSEGV (Erreur de frontière d’adresse)

Some files do open, with the same initial message and without segsegv signal, but takes a long time to open.

You crashed my system. No joke.
Now sway doesn’t open either, because of the same “warning” of libEGL. Please help to correct. I tried reverting to normal mesa and wlroots and sway but it doesn’t give a damn.
Thank god open box could install and work out of the box, at least something can be relied on in this day and age !

Ctrl+alt+ F4 should bring you to a tty. From there just do pacman -Syu wlroots0.16 sway. That should reverse everything.

No it didn’t. No change.

00:00:00.005 [ERROR] [sway/main.c:62] !!! Proprietary Nvidia drivers are in use !!!
libEGL warning: egl: failed to create dri2 screen
00:00:00.078 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: “DRI2: failed to create screen”
libEGL warning: egl: failed to create dri2 screen
00:00:00.086 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: “DRI2: failed to create screen”
libEGL warning: egl: failed to create dri2 screen
00:00:00.093 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: “DRI2: failed to create screen”
00:00:00.093 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: “eglInitialize”
00:00:00.093 [ERROR] [wlr] [render/egl.c:264] Failed to initialize EGL
00:00:00.093 [ERROR] [wlr] [render/egl.c:554] Failed to initialize EGL context
00:00:00.093 [ERROR] [wlr] [render/gles2/renderer.c:679] Could not initialize EGL
00:00:00.093 [ERROR] [wlr] [render/wlr_renderer.c:333] Could not initialize renderer
00:00:00.093 [ERROR] [sway/server.c:79] Failed to create renderer

Well, then sway won’t work properly with the propriatary nvidia drivers. Uninstall them and see if nouveau work.

One thing you could do is to try out hyprland. It’s somewhat similar to sway, but works better with nvidia.

Edit: did you try modesetting the nvidia driver and blacklisting the nouveau driver as mentioned inside the guide linked in the second post? Keep in mind endeavourOS uses dracut nowadays and not mkinitcpio.

Also keep in mind, Nvidia GPUs simply aren’t officially supported by sway. There will be times sway will not work with your setup.

I tried kde, mate, cinnamon, budgie, everything crashes. Does it mean the only reliable way to install anything complex on arch-based distros is to reinstall completely ?

Depends on what you did along the way. Usually installing different DEs beside one another is no problem. In your case it seems you broke something fundamental along the way, if nothing works.

Most likely your graphics drivers are not installed properly.

1 Like