starting wayland (wayfire) fails using nvidia card [Found 0 GPUS]

--> startup script issues

I don't have any startup script issue

Code:
-->  #!/usr/local/bin/zsh

it works. I don't see errors.

--> opt directory

I have installed a newer version of wayland and wayfire in /opt/wayfire
Code:
-->  export LD_LIBRARY_PATH=/opt/wayfire/lib/$libdir
-->  export PATH=/opt/wayfire/bin:$PATH

wayland / wayfire don't start without these exports.

Code:
--> env WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session wayfire

this works. I know for sure because I have added a not supported parameter for the nvidia gpus (WLR_DRM_NO_MODIFIERS=1 ) just after "env" ; it has been detected as not compatible and wayfire refused to start ; I have removed it and wayfire has been able to start again.
 
Code:
~/.zshenv

Code:
typeset -U PATH path
path=("/opt/wayfire/bin" "$path[@]")
export PATH

the reason you set the path like this is to ensure there are no duplicate entries in the shell path

echo path

Code:
echo "${PATH}"

will output this

Code:
/opt/wayfire/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin

if you just export the path as you have done you can end up with duplicate entries in the shell path like this

Code:
/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/opt/wayfire/bin:/opt/wayfire/bin:

Code:
typeset -U PATH path

sets the path to exclude duplicate entries
 
Code:
--> dbus_enable="YES"

I have it.

Code:
--> sudo chmod 700 user/"$(id -u)"
--> sudo chown -R "${USER}":wheel /var/run/user/"$(id -u)"
--> sudo chmod 700 /var/run/user/"$(id -u)"

these commands are replaced by the parameter "LIBSEAT_BACKEND=consolekit2" ; it does the same thing because wayfire starts correctly.

Code:
--> pw groupmod video -m user

I did that a lot of time ago.

Code:
#!/bin/sh

--> # start wayfire with dbus
--> exec dbus-launch --exit-with-session wayfire

wayfire starts also with ---> ck-launch-session wayfire
 
wayfire may start with the option you used

but if the XDG_RUNTIME_DIR doesnt exist when you are running wayfire
then you may run into issue with other applications that expect it to exist

from memory i think mpv video player uses the xdg runtime directory to play hardware accelerated video

this is the output of my /var/run/user/1001
as you can see its used by quite a few applications

Code:
Yes Master ? ls -l /var/run/user/1001
total 6
srwxr-xr-x  1 djwilcox wheel    0 10 Mar 13:56 Alacritty-wayland-0-5202.sock
drwx------  2 djwilcox wheel    3 10 Mar 13:57 at-spi
drwx------  3 djwilcox wheel    3  1 Dec 15:04 dbus-1
drwx------  2 djwilcox wheel    3 10 Mar 13:57 dconf
drwx------  2 djwilcox wheel    3 10 Mar 13:56 dwlb
drwx------  2 djwilcox wheel    3 10 Mar 13:57 emacs
drwx------  3 djwilcox wheel    3 27 Dec 00:17 gnupg
drwx------  2 djwilcox djwilcox 2  9 Mar 17:52 pulse
drwx------  4 djwilcox wheel    4  3 Mar 13:46 speech-dispatcher
-rw-------  1 djwilcox wheel    0 10 Mar 13:57 tofi.lock
srwxr-xr-x  1 djwilcox wheel    0 10 Mar 13:56 wayland-0
-rw-r-----  1 djwilcox wheel    0 10 Mar 13:56 wayland-0.lock

some application may fall back to using another location if the directory doesnt exist
other apps may just fail
 
ok let's see what happens now :

Code:
[root@marietto /var/run/user]==> rsync -avxHAX 1001 1001_

sending incremental file list
1001/
1001/ICEauthority
1001/at-spi/
1001/at-spi/bus_0
1001/dbus-1/
1001/dbus-1/services/
1001/dconf/
1001/dconf/user
1001/gvfsd/
1001/pulse/
1001/pulse/native
1001/pulse/pid

sent 747 bytes  received 107 bytes  1.708,00 bytes/sec
total size is 170  speedup is 0,20

[root@marietto /var/run/user]==> chmod 700 1001_
[root@marietto /var/run/user]==> chown -R marietto:wheel 1001_
[root@marietto /var/run/user]==> sudo chmod 700 /var/run/user/1001_

wayfire-start :

Code:
#!/usr/local/bin/zsh
export LD_LIBRARY_PATH=/opt/wayfire/lib/$libdir
export PATH=/opt/wayfire/bin:$PATH
export XDG_RUNTIME_DIR=/var/run/user/1001_
export PKG_CONFIG_PATH=/opt/wayfire/share/pkgconfig:/opt/wayfire/libdata/pkgconfig
env WLR_NO_HARDWARE_CURSORS=1 ck-launch-session dbus-run-session wayfire
 
there are 2 fixes you need for firefox

add these 2 settings to your

Code:
 ~/.zshenv

MOZ_ENABLE_WAYLAND=1 is needed so Firefox works with Wayland
MOZ_DISABLE_WAYLAND_PROXY=1 is needed for Firefox 123.01,2 on Freebsd

Code:
export MOZ_ENABLE_WAYLAND=1
# need for firefox 123.01,2
export MOZ_DISABLE_WAYLAND_PROXY=1
 
Anyway I have another two problems to fix now. Firefox does not start. When I invoke it I see a lot of noise,maybe the cpu is overloaded and the firefox window does not open. And the sound does not work. Maybe it will work when I will be able to run Firefox.
 
you can test the settings by sourcing your zshenv
and then running firefox in the terminal so it picks up the settings

source ~/.zshenv

Code:
source ~/.zshenv

run firefox

Code:
firefox

or just reboot
 
Firefox is working great now. I did these changes :

Code:
export MOZ_ENABLE_WAYLAND=1
export XDG_RUNTIME_DIR=/var/run/user/1001_
export MOZ_DISABLE_WAYLAND_PROXY=1

now is the sound that does not work.
 
Enable Xwayland support in Wayfire

edit your wayfire.ini config file

Code:
~/.config/wayfire.ini

and under [core] set xwayland to true

Code:
xwayland = true

you may need to logout and back in again to pick up the changes

wayfire logout

Code:
Ctrl+Alt+Bkspc

Fun with Xwayland

now you Xwayland enabled you can create a window like this

Code:
Xwayland -host-grab -geometry 1920x1080 :01 &

and then run an application in the window like this

Code:
DISPLAY=:1 firefox

firefox will then open in the Xwayland window

Xwayland windows can be used to display applications from a linuxulator chroot
by exporting the DISPLAY variable in the chroots shell config

~/.zshenv in the chroot

Code:
export DISPLAY=:1

so you create the window and then from inside the chroot start an application and it will be displayed in the Xwayland window on Freebsd
 
I advanced with nvidia & wayland.
I could make it work with nvidia opensource drivers on Linux.
With proprietary drivers it even fails on Linux.
 
Sound works now. It didn't work because I have enabled PRIME and I have chosen the intel gpu as primary and modesetting and the nvidia gpu as secondary. (without this configuration wayfire does not start). For this reason,the audio input and output channels have changed.

This is the setup that I have used :

Code:
$ nano /etc/sysctl.conf
hw.snd.default_unit=8

$ kldload nvidia-drm

$ nano /usr/local/etc/X11/xorg.conf.d/20-nvidia-drm-outputclass.conf

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    ModulePath "/usr/local/lib/nvidia/xorg"
    ModulePath "/usr/local/lib/xorg/modules"
EndSection

$ nano /usr/local/etc/X11/xorg.conf.d/20-intel.conf

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
    Option "PrimaryGPU" "yes"
EndSection
 
im not sure the open source nvidia drivers work with CUDA but i may be wrong

these are the package i installed on my dell xps 15

Code:
sudo pkg install nvidia-driver nvidia-settings nvidia-drm-515-kmod libva-intel-driver libva-utils

and my kldlist in /etc/rc.conf

Code:
sudo sysrc kld_list+="i915kms nvidia-modeset nvidia-drm linux linux64"

Code:
kld_list="i915kms nvidia-modeset nvidia-drm linux linux64"

packages for cuda

Code:
sudo pkg install nvidia-driver linux-nvidia-libs libc6-shim libvdpau-va-gl libva-nvidia-driver

 
im not sure the open source nvidia drivers work with CUDA but i may be wrong

these are the package i installed on my dell xps 15

Code:
sudo pkg install nvidia-driver nvidia-settings nvidia-drm-515-kmod libva-intel-driver libva-utils

and my kldlist in /etc/rc.conf

Code:
sudo sysrc kld_list+="i915kms nvidia-modeset nvidia-drm linux linux64"

Code:
kld_list="i915kms nvidia-modeset nvidia-drm linux linux64"

packages for cuda

Code:
sudo pkg install nvidia-driver linux-nvidia-libs libc6-shim libvdpau-va-gl libva-nvidia-driver


Your setup is not the same as mine.

On /etc/rc.conf I have :

Code:
kld_list="i915kms linux linux64 ext2fs"

as soon as I reach the login prompt,I do : "kldload nvidia-drm",otherwise xorg will not start.
 
It didn't work because I have enabled PRIME and I have chosen the intel gpu as primary and modesetting and the nvidia gpu as secondary on the BIOS and for Xorg. For this reason,the default audio input and output channel is changed and should be configured again on /etc/sysctl.conf.
 
if you are running a wlroots wayland compositor the you need to install a couple of packages

xdg-desktop-portal backend for wlroots

Code:
sudo pkg install xdg-desktop-portal-wlr

wlrobs screen capture for obs studio

Code:
sudo pkg install wlrobs

Wayland screen capture plugin for obs-studio

grim

Code:
sudo pkg install grim

Grab images from a Wayland compositor
 
if you are running a wlroots wayland compositor the you need to install a couple of packages

xdg-desktop-portal backend for wlroots

Code:
sudo pkg install xdg-desktop-portal-wlr

wlrobs screen capture for obs studio

Code:
sudo pkg install wlrobs

Wayland screen capture plugin for obs-studio

grim

Code:
sudo pkg install grim

Grab images from a Wayland compositor

Code:
[marietto@marietto /usr/home/marietto]$ grim
Nothing happens.
 
Back
Top