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

Even with nvidia DRM driver installed?
I think Linux has one much earlier than FreeBSD.
Note that x11/linux-nvidia-libs port does not build drivers included in it.
I have :
kld_list="nvidia nvidia-drm nvidia-modeset radeonkms drm"
 
I remember that I was able to to use sway with the nvidia-drm driver with a similar card (I no longer have access to the card to further test it). There was some issue with the screen flickering when I tested it, all I had to do was to only load nvidia-drm (there was an issue with other nvidia module that was loaded before this one) and to specify to sway which drm device to use (WLR_DRM_DEVICES).
 
which do you mean? Upstream to nvidia? Or to FreeBSD project?
Some maintainers requires the former the first, and only works on adapting to updated upstream. But as far as I know, the maintainer of x11/nvidia-driver, danfe@, is not such a person.
For the latter, PR 277028 itself is upstreaming. I'm waiting for maintainer approval and commit to the ports tree.

And what I've done for the patch uploaded at PR 277028 is to adapt ports to 550.54.14. NO PORTS CAN AUTOMATICALLY TRACK UPDATES ON UPSTREAM AND ADAPTING WITH IT. What I've done is just the thing.

Only possoble candidate for upstreaming to nvidia is relocation of single man page from under /usr/local/man/ into /usr/local/share/man/.
This is currently ongoing to all ports having manpages under /usr/local/man/. No functuonal chanes.


Now I'm puzzled what you actualy want to do.
Do you want reinventing the wheel?
If you can make better patch for this, feel free to upload it at PR 277028. The maintainers (or committer who want to handle it after 2 weeks or more as MAINTAINER TIMEOUT) would prefer whichever they think better, or request more fixes, or fixing by themselves.
To do so, please read Porter's Handbook before you start the job.

Note that I'm not a maintainer, a committer nor nvidia-insider. Just a volunteer user who want x11/nvidia-driver port to be up-to-date with nvidia's Production Branch Driver and keep the way to try latest Beta and/or New Feature Branch.

Correct me if I'm wrong : if the patches haven't been upstreamed on the ports tree,does it make sense that I make the installation of the driver like this ?

# nano Makefile

DISTVERSION?= 550.54.14

# make makesum
# make
# make install

If I have understood well,the driver will be installed without the proper patches applied,right ? In other words I haven't understood how should I apply the patches. Do you want to write here the full detailed commands to issue to install the nvidia driver 550.54.14 with the patches ? thanks.
 
Freebsd 14 p5 quarterly running Nvidia driver 535.146.02

i had issues with the earlier drivers not working
but 535.146.02 works like a charm

nv-sglrun nvidia-smi

Code:
NVIDIA-SMI 535.146.02             Driver Version: 535.146.02   CUDA Version: 12.2
 
Anyway,Im sure that Wayfire / Wayland don't work because the nvidia driver is bugged. Yesterday I tried with the integrated intel gpu and I didn't see any seg fault.
 
Correct me if I'm wrong : if the patches haven't upstreamed ont the ports tree,does it make sense that I make the installation of the driver like this ?



If I have understood well,the driver will be installed without the proper patches applied,right ? In other words I haven't understood how should I apply the patches. Do you want to write here the full detailed commands to issue to install the nvidia driver 550.54.14 with the patches ? thanks.
This time, assuming you need x11/nvidia-driver only, you are on ports main branch and ignore relocation of manmages, you don't need ever editing anything. And additionally, assuming you are already installed in-tree version (535.146.02) of driver.

Just cd to /usr/ports/x11/nvidia-driver and runing


make DISTVERSION=550.54.14 -DNO_CHECKSUM fetch
make DISTVERSION=550.54.14 -DNO_CHECKSUM
make DISTVERSION=550.54.14 -DNO_CHECKSUM deinstall reinstall clean


are sufficient.

This method is described in comments of x11/nvidia-driver/Makefile as below.
# To simplify testing of new feature branches and beta driver versions,
# the port aims to support building against arbitrary DISTVERSION, i.e.
# ``make DISTVERSION=xxx.yy.zz -DNO_CHECKSUM'' should typically work.
This is true unless additions/deletions/moves/library version bump are not done at all.

Fortunately, there are not applicable with this update for x11/nvidia-driver.

Note that DISTVERSION=550.54.14 specifies to override DISTVERSION?= line in Makefile from command line and -DNO_CHECKSUM forces ports framework not to check distfiles' checksum.

If you need x11/linux-nvidia-libs , too, applying patch at PR 277028 is needed. This is because
  • 2 libraries are bumped which are not in sync with DISTVERSION.
  • Addition and deletion of libraries happened.
Makefile of x11/nvidia-driver and x11/linux-nvidia-libs are both complexed, because both are master ports of legacy versions (such as 470) and need to handle the differences.

And with the same reason, distinfo of both ports includes informations of multiple versions.
So blindly running
make makesum
causes informations for legacy versions to be vanished.
 
thanks. Yes,I need it. Can you explain how to apply patch at PR 277028,please ? very thanks.
Visit PR 277028, and download patch titled Patch for updating to 550.54.14 without graphics/nvidia-drm-*-kmod updates. For your convenience, linked to the uploaded patch itself.
Save displayed contents with your browser menu into anywhere you want. If you do not changed the filename, it should be patch-nvidia-550.54.14-without-drm.diff. Below, assuming you saved it to directory /anywhere/you/want/. Re-read it what directory where you actually saved.

cd /usr/ports
patch -p1 -C -i /anywhere/you/want/patch-nvidia-550.54.14-without-drm.diff


If any error happenes here, please let me know and never go ahead to next step.
If there were no problem, run the second command dropping -C option as below.
patch -p1 -i /anywhere/you/want/patch-nvidia-550.54.14-without-drm.diff

Now you are ready to build both x11/nvidia-driver and x11/linux-nvidia-libs of 550.54.14.
If you are not using any tools like portupgrade, portmaster or pkg_replace and want to classic way, in both ports directory, run

make fetch && make && make deinstall reinstall && make clean

With running like this, if fetch fails, following make should not run.
Same for later steps connected with &&.
 
Your previous instructions are still valid ? If not,please,elaborate more the sequence of commands to issue. Thanks.
 
Your previous instructions are still valid ? If not,please,elaborate more the sequence of commands to issue. Thanks.
The patch landed on main branch of port tree.
If you are using main branch (I assumed so), it is NO LONGER NEEDED, as it is alreay the official port tree, except relocation of manpage (it would be done by the maintainer in another way).

So if you already applied the patch, revert it by
cd /usr/ports
patch -p1 -R -C -i /anywhere/you/want/patch-nvidia-550.54.14-without-drm.diff

If any error happenes here, please let me know and never go ahead to next step.
If there were no problem, run the second command dropping -C option as below.
cd /usr/ports
patch -p1 -R -i /anywhere/you/want/patch-nvidia-550.54.14-without-drm.diff


If not already applied the patch, the process above is NOT NEEDED.

Then update ports tree just as usual.
 
ok. I've installed the new nvidia-driver. Unfortunately nothing is changed. I get the same errors as before. I'm going to report the bug here :


but before to do that,I would ask you : on the NapoleonWils0n youtube tutorial I see that I should install the package nvidia-drm-515-kmod ; but now I'm using the driver nvidia-550.54.14 ; I imagine that I should install the package or the port called "nvidia-drm-550-kmod" ; is it ready ?
 
Forget my question : It worked like a charme.

Code:
mario@marietto-I5:/usr/ports/graphics/nvidia-drm-kmod # make

....
awk -f /usr/src/sys/conf/kmod_syms.awk nvidia-drm.ko.full  export_syms | xargs -J% objcopy % nvidia-drm.ko.full
--- nvidia-drm.ko.debug ---
objcopy --only-keep-debug nvidia-drm.ko.full nvidia-drm.ko.debug
--- nvidia-drm.ko ---
objcopy --strip-debug --add-gnu-debuglink=nvidia-drm.ko.debug  nvidia-drm.ko.full nvidia-drm.ko
===>  Staging for nvidia-drm-515-kmod-550.54.14
===>   nvidia-drm-515-kmod-550.54.14 depends on file: /boot/modules/drm.ko - found
===>   nvidia-drm-515-kmod-550.54.14 depends on file: /boot/modules/nvidia.ko - found
===>   Generating temporary packing list
install -T release -o root -g wheel -m 555   nvidia-drm.ko /usr/ports/graphics/nvidia-drm-515-kmod/work/stage/boot/modules/
/bin/mkdir -p /usr/ports/graphics/nvidia-drm-515-kmod/work/stage/usr/local/share/X11/xorg.conf.d/
install  -m 0644 /usr/ports/graphics/nvidia-drm-515-kmod/work/20-nvidia-drm-outputclass.conf /usr/ports/graphics/nvidia-drm-515-kmod/work/stage/usr/local/share/X11/xorg.conf.d/
====> Compressing man pages (compress-man)
===>  Installing for nvidia-drm-515-kmod-550.54.14
===>  Checking if nvidia-drm-515-kmod is already installed
===>   Registering installation for nvidia-drm-515-kmod-550.54.14 as automatic
Installing nvidia-drm-515-kmod-550.54.14...
Modesetting must be enabled to use nvidia-drm.ko for graphics. This can be done
by setting the modeset sysctl, the equivalent of the modeset kernel parameter
on Linux.

hw.nvidiadrm.modeset=1

This must be set before loading nvdidia-drm.ko, most easily done by placing the
above in /boot/loader.conf.

===>   nvidia-drm-kmod-550.54.14 depends on file: /boot/modules/nvidia-drm.ko - found
===>   Returning to build of nvidia-drm-kmod-550.54.14
===>   Generating temporary packing list
====> Compressing man pages (compress-man)

mario@marietto-I5:/usr/ports/graphics/nvidia-drm-kmod # make install

===>  Installing for nvidia-drm-kmod-550.54.14
===>  Checking if nvidia-drm-kmod is already installed
===>   Registering installation for nvidia-drm-kmod-550.54.14
Installing nvidia-drm-kmod-550.54.14...
Modesetting must be enabled to use nvidia-drm.ko for graphics. This can be done
by setting the modeset sysctl, the equivalent of the modeset kernel parameter
on Linux.

hw.nvidiadrm.modeset=1

This must be set before loading nvdidia-drm.ko, most easily done by placing the
above in /boot/loader.conf.
 
Hello. I'm following the video tutorial of NapoleonWilson step by step and I've reached the point where I need to convert his script written in .zsh in the same script for .csh. I would like to know by someone if I made some mistake and how to fix it. This is the original script :

Code:
# nano /home/marietto/.zshenv

# Path
typeset -U PATH path
path=("$HOME/bin" "/usr/local/bin" "$path[@]")
export PATH

# xdg directories
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_RUNTIME_DIR="/var/run/user/`id -u`"

# firefox
export MOZ_ENABLE_WAYLAND=1

# qt5
export QT_QPA_PLATFORMTHEME=qt5ct

# ssh-add
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"

# less
export LESSHISTFILE="${XDG_CONFIG_HOME}/less/history"
export LESSKEY="${XDG_CONFIG_HOME}/less/keys"

# set emacsclient as editor
#export ALTERNATE_EDITOR=""
#export EDITOR="emacsclient -a emacs"
#export VISUAL="emacsclient -a emacs"

# tell ls to be colourfull
#export LSCOLORS=ExFxCxDxBxegedabagacad
#export CLICOLOR=1

# vi mode
export KEYTIMEOUT=1

# mpd host variable for mpc
export MPD_HOST="/home/djwilcox/.config/mpd/socket"

this is the version for the shell csh. I hope there aren't mistakes.

Code:
# nano /home/marietto/.cshrc

# Path
typeset -U PATH path
setenv path ("$HOME/bin" "/usr/local/bin" "$path[@]")
setenv PATH

# xdg directories
setenv XDG_CONFIG_HOME "$HOME/.config"
setenv XDG_CACHE_HOME "$HOME/.cache"
setenv XDG_DATA_HOME "$HOME/.local/share"
setenv XDG_RUNTIME_DIR "/var/run/user/`id -u`"

# firefox
setenv MOZ_ENABLE_WAYLAND 1

# qt5
setenv QT_QPA_PLATFORMTHEME qt5ct

# ssh-add
setenv SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/ssh-agent.socket"

# less
setenv LESSHISTFILE "${XDG_CONFIG_HOME}/less/history"
setenv LESSKEY "${XDG_CONFIG_HOME}/less/keys"

# vi mode
setenv KEYTIMEOUT 1

# mpd host variable for mpc
setenv MPD_HOST "/home/djwilcox/.config/mpd/socket"
 
Since I'm getting this error :
Code:
[src/main.cpp:334] Starting wayfire version v0.8.0
[backend/x11/backend.c:395] Creating X11 backend
[backend/x11/backend.c:478] X11 does not support shared pixmaps
[backend/x11/backend.c:607] Failed to query DRI3 DRM FD
[src/main.cpp:134] Fatal error: Segmentation fault
#1 0x363b40 <main+0x1580> at /usr/local/bin/wayfire
#2 0x82d7db53f <pthread_sigmask+0x53f> at /lib/libthr.so.3
#3 0x82d7daafb <pthread_setschedparam+0x83b> at /lib/libthr.so.3
#4 0x820f1b2d3 <???> at ???
#5 0x82309b5d4 <wlr_backend_get_drm_fd+0x4> at /usr/local/wlroots016/lib/libwlroots.so.11
#6 0x362a3a <main+0x47a> at /usr/local/bin/wayfire
#7 0x82aeb7afa <__libc_start1+0x12a> at /lib/libc.so.7

I have opened a bug ticket on the wayfire github. You can read what the developers are saying :


btw at the moment I don't understand how to fix the error.
 
Maybe I found the error. When I have installed this driver :

Installing nvidia-drm-515-kmod-550.54.14...

It said :

Modesetting must be enabled to use nvidia-drm.ko for graphics. This can be done by setting the modeset sysctl, the equivalent of the modeset kernel parameter on Linux.

So I have added this parameter to sysctl.conf :

hw.nvidiadrm.modeset=1

unfortunately my system does not accept it as is. It gives an error.
 
Discussed briefly with ashafer under <https://discord.com/channels/727023752348434432/831066226074976267/1213576936450953306>.

My thoughts:

… nvidia-drm-515-kmod …

If you first kldload nvidia-drm, then does sysctl -d hw.nvidiadrm.modeset present a description?

Side note: take care to not copy and paste the typo from the current edition of the package message.

<https://www.freshports.org/graphics/nvidia-drm-515-kmod/#message>

<https://reviews.freebsd.org/D44073#1008190>
 
add nvidia-modeset to your kld list

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

or manually edit the config file

/etc/rc.conf

then add the code below to /etc/rc.conf

Code:
kld_list="nvidia-modeset nvidia-drm linux linux64"
 
Back
Top