View previous topic :: View next topic |
Author |
Message |
elparitacaliente n00b
Joined: 27 Dec 2023 Posts: 3
|
Posted: Wed Dec 27, 2023 10:28 pm Post subject: Cannot start Sway. I use Nvidia |
|
|
Hello everyone
I'm trying to start Sway but I keep getting errors like "EGL_NOT_INITIALIZED", "DRI2: failed to load driver", and "Failed to create renderer". I have an Nvidia graphics card and I have set nouveau in my video cards USE flags.
Let me know if I should provide more info and thanks for your time |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1445 Location: Earth
|
Posted: Thu Dec 28, 2023 12:23 am Post subject: |
|
|
Welcome to Gentoo,
please try by starting sway --unsupported-gpu - look here https://wiki.archlinux.org/title/sway#Installation
or edit as root /usr/share/wayland-sessions/sway.desktop
if you using Openrc / elogind dbus-run-session sway --unsupported-gpu
and maybe you also need some of the following variables which can be set in .profile file in your users Home - create as user, e.g. touch .profile (<<< there's a DOT at the beginning).
Code: | # NVIDIA
export WLR_NO_HARDWARE_CURSORS,1
export LIBVA_DRIVER_NAME,nvidia
export __GLX_VENDOR_LIBRARY_NAME,nvidia
export GBM_BACKEND,nvidia-drm
export __NV_PRIME_RENDER_OFFLOAD,1
export __VK_LAYER_NV_optimus,NVIDIA_only
export WLR_DRM_NO_ATOMIC,1
export NVD_BACKEND,direct
# FOR VM and POSSIBLY NVIDIA
export WLR_RENDERER_ALLOW_SOFTWARE,1
# nvidia firefox (for hardware acceleration on FF)?
# check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration
export = MOZ_DISABLE_RDD_SANDBOX,1
export NVD_BACKEND,direct
export EGL_PLATFORM,wayland |
you can also use it as a script file which you have to tell sway to initiate at start.
here is an example https://github.com/crispyricepc/sway-nvidia/blob/main/wlroots-env-nvidia.sh
and read the WiKi - you'll find most infos https://github.com/swaywm/sway/wiki
i'am not sure, because i use AMD.
EDIT:
or try with Hyprland - it is a fork of Sway with nice eye candy
https://wiki.hyprland.org/hyprland-wiki/pages/Nvidia/
try with the dots from https://github.com/JaKooLit/Hyprland-Dots _________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Thu Dec 28, 2023 2:18 am Post subject: |
|
|
do you have: nvidia-drm.modeset=1 on your kernel command line? _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
elparitacaliente n00b
Joined: 27 Dec 2023 Posts: 3
|
Posted: Thu Dec 28, 2023 10:17 am Post subject: |
|
|
CooSee wrote: | Welcome to Gentoo,
please try by starting sway --unsupported-gpu - look here https://wiki.archlinux.org/title/sway#Installation
or edit as root /usr/share/wayland-sessions/sway.desktop
if you using Openrc / elogind dbus-run-session sway --unsupported-gpu
and maybe you also need some of the following variables which can be set in .profile file in your users Home - create as user, e.g. touch .profile (<<< there's a DOT at the beginning).
Code: | # NVIDIA
export WLR_NO_HARDWARE_CURSORS,1
export LIBVA_DRIVER_NAME,nvidia
export __GLX_VENDOR_LIBRARY_NAME,nvidia
export GBM_BACKEND,nvidia-drm
export __NV_PRIME_RENDER_OFFLOAD,1
export __VK_LAYER_NV_optimus,NVIDIA_only
export WLR_DRM_NO_ATOMIC,1
export NVD_BACKEND,direct
# FOR VM and POSSIBLY NVIDIA
export WLR_RENDERER_ALLOW_SOFTWARE,1
# nvidia firefox (for hardware acceleration on FF)?
# check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration
export = MOZ_DISABLE_RDD_SANDBOX,1
export NVD_BACKEND,direct
export EGL_PLATFORM,wayland |
you can also use it as a script file which you have to tell sway to initiate at start.
here is an example https://github.com/crispyricepc/sway-nvidia/blob/main/wlroots-env-nvidia.sh
and read the WiKi - you'll find most infos https://github.com/swaywm/sway/wiki
i'am not sure, because i use AMD.
EDIT:
or try with Hyprland - it is a fork of Sway with nice eye candy
https://wiki.hyprland.org/hyprland-wiki/pages/Nvidia/
try with the dots from https://github.com/JaKooLit/Hyprland-Dots |
First of all thanks for the detailed answer. I've tried all of that but it did not work. Even Hyprland crashes on start. |
|
Back to top |
|
|
elparitacaliente n00b
Joined: 27 Dec 2023 Posts: 3
|
Posted: Thu Dec 28, 2023 10:20 am Post subject: |
|
|
Naib wrote: | do you have: nvidia-drm.modeset=1 on your kernel command line? |
Yep, did that as well but to no avail |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2727
|
Posted: Thu Dec 28, 2023 2:22 pm Post subject: |
|
|
elparitacaliente wrote: | Naib wrote: | do you have: nvidia-drm.modeset=1 on your kernel command line? | Yep, did that as well but to no avail | fwiw you don't need to set that when USE=wayland is set on nvidia-drivers (it's set by default in nvidia.conf then). USE=wayland on nvidia-drivers is of course required for other reasons too, I do assume it's set globally if you're using wayland.
That aside, I hope this isn't some dual gpu / optimus setup, that tend to confuse everything esp. with wayland. The situation should be a little bit better with nvidia-545 though, so you could try 545 if not already (~testing-only due to being a non-production branch).
Haven't tried sway with nvidia-drivers in like a year, so haven't kept up with quirks to help more with that. Not sure but don't recall I needed to set/change anything to make it "at least" start (with my single gpu) except passing the (now renamed) my-next-gpu-wont-be-nvidia option Not that there wasn't other quirks after that (like needing to disable hw cursor). |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 325 Location: Naarm/Melbourne, Australia
|
Posted: Thu Dec 28, 2023 10:55 pm Post subject: |
|
|
elparitacaliente wrote: | Even Hyprland crashes on start. |
Out of interest, have you tested whether a non-wlroots-based compositor works? |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2727
|
Posted: Fri Dec 29, 2023 2:19 am Post subject: |
|
|
flexibeast wrote: | elparitacaliente wrote: | Even Hyprland crashes on start. |
Out of interest, have you tested whether a non-wlroots-based compositor works? | plasma/kwin and gnome/mutter tend to always work fine given upstreams care to keep nvidia working to some degree (I give both a quick try whenever I stabilize new nvidia-drivers in a passthrough VM I use for this). They both work "out of the box" without anything special for me, except that gdm can be a bit picky about letting you start it with wayland when using nvidia (may try to force Xorg), so I use sddm for both to avoid the hassle.
Otherwise there's also weston for non-wlroots I guess, but I never really played with that one and not sure how it fares with nvidia.
End of the day, I still use Xorg myself though, will reconsider in a few years |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Fri Dec 29, 2023 6:46 pm Post subject: |
|
|
Everybody went into discussing nvidia-drivers, but did not original poster say that he is using nouveau ? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|