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

My mouse works now. This is the start script which works well :

Code:
#!/usr/local/bin/zsh
env WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session dbus-run-session wayfire

the last problem : the keyboard mapping is the english one,but I would like the italian. Im trying to change the keyboard layout from us to it. Can someone tell me what-s the exact parameters to change please ? This is what I did :

Code:
nano /home/marietto/.config/wayfire.ini

[input]
xkb_layout = it
xkb_variant = dvorak,bepo

nope,this does not work. The keyboard mapping is still configured as us.
 
in your shell configuration ( maybe it is .zshrc or .zprofile, i never used zsh, so i can't tell where it is ) put following:
export XKB_DEFAULT_LAYOUT=it,us export XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle
then, source .zshrc ( or source .zprofile )
this will use Alt + Shift to change it to us, that is you hit both Alt and Shift at the same time.
 
Another solution would be starting Wayfire via shell script using /bin/sh, having the first line
sh:
#!/bin/sh
and executable flag set.
 
in your shell configuration ( maybe it is .zshrc or .zprofile, i never used zsh, so i can't tell where it is ) put following:
export XKB_DEFAULT_LAYOUT=it,us export XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle
then, source .zshrc ( or source .zprofile )
this will use Alt + Shift to change it to us, that is you hit both Alt and Shift at the same time.

I-ve added these parameters to .zshenv (because I see that inside of this file there are already a lot of exports,but not in .zshrc)

Code:
export XKB_DEFAULT_LAYOUT=it,us
export XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle

it didnt work. The mapping is us even if I press ALT + SHIFT.
 
Another solution would be starting Wayfire via shell script using /bin/sh, having the first line
sh:
#!/bin/sh
and executable flag set.

I tried like this :

Code:
#!/bin/sh (and csh)
setenv WLR_NO_HARDWARE_CURSORS 1 LIBSEAT_BACKEND consolekit2
ck-launch-session dbus-run-session wayfire

and
 
set WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session dbus-run-session wayfire

and

env WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session dbus-run-session wayfire


both didnt work. Is there another method to make it work ?
 
Solution that works for me :

Code:
wayfire.ini :

xkb_layout = it
xkb_model = 104
#xkb_options = ctrl:swap_lalt_lctl,caps:none
xkb_rules = evdev
#xkb_variant = mac
#xkb_variant = dvorak,bepo
 
setenv WLR_NO_HARDWARE_CURSORS 1 LIBSEAT_BACKEND consolekit2 ck-launch-session dbus-run-session wayfire
This is the syntax for csh.

For sh, in formal syntax, it should be
sh:
set WLR_NO_HARDWARE_CURSORS=1
export WLR_NO_HARDWARE_CURSORS
set LIBSEAT_BACKEND=consolekit2
export LIBSEAT_BACKEND
ck-launch-session dbus-run-session wayfire

but casually, you can write it like
sh:
export WLR_NO_HARDWARE_CURSORS=1
export LIBSEAT_BACKEND=consolekit2
ck-launch-session dbus-run-session wayfire
as export command can also set the value to to-be-exported variable.
 
Is anyone else encountering the error like below?
EE 06-03-24 01:01:53.655 - [src/main.cpp:62] Unable to drop root (we shouldn't be able to restore it after setuid), refusing to start
Attached is the file merging startup script (stripping commented out remnants for tests), command line, outputs shown on stderr (not redirected, so copy-pasted from vty) and redirected stdout. The error appears at last line.
Some googling told me to create XDG_RUNTIME_DIR under /tmp instead of /var/run, without luck as shown in attached file.

Using
dbus-launch --exit-with-session wayfire -c ~/.config/wayfire/wayfire.ini
instead of wayfire -c ~/.config/wayfire/wayfire.ini didn't help, too.
Prepending env WLR_NO_HARDWARE_CURSORS=1 didn't help here.
There may be any suid'ed binary when running wayfire, but currently I cannot determined them yet.
 

Attachments

  • 20240306-001-wayfire_log.txt
    9.2 KB · Views: 22
yes,I saw that error. It happens when I run the startup script as root. Developers say that it should run as a normal user or it should be patched if you want to run it as root.
 
yes,I saw that error. It happens when I run the startup script as root. Developers say that it should run as a normal user or it should be patched if you want to run it as root.
But I saw this error starting the script as regular user (belongs to wheel as primary group and also video and some others as additional group). Never ran it as root. Strange. :(
 
Today,when I started again Wayland / wayfire it didn't work. I don't remember that yesterday I've applied hard changes,so I'm not able to understand if and what changes can I revert to make it work again. The startup script that I use :

Code:
#!/usr/local/bin/zsh
# env WLR_DRM_NO_MODIFIERS=1
env WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session dbus-run-session wayfire

Code:
[src/main.cpp:334] Starting wayfire version v0.8.0
[libseat] [libseat/libseat.c:66] Seat opened with backend 'consolekit2'
[libseat] [libseat/backend/consolekit2.c:92] Ping failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.9" (uid=1001 pid=25032 comm="") interface="org.freedesktop.DBus.Peer" member="Ping" error name="(unset)" requested_reply="0" destination="org.freedesktop.ConsoleKit" (uid=0 pid=90025 comm="")
[backend/session/session.c:109] Successfully loaded libseat session
[backend/backend.c:220] Found 1 GPUs
[backend/drm/backend.c:200] Initializing DRM backend for /dev/dri/card0 (nvidia-drm)
[backend/drm/drm.c:253] Found 4 DRM CRTCs
[backend/drm/drm.c:180] Found 12 DRM planes
[render/egl.c:201] Supported EGL client extensions: EGL_EXT_platform_base EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_EXT_platform_device EGL_MESA_platform_surfaceless EGL_EXT_explicit_device EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_KHR_platform_gbm EGL_MESA_platform_gbm EGL_EXT_platform_xcb
EE 06-03-24 10:23:41.031 - [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available"
[EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In function eglQueryDeviceStringEXT(), string query failed at backend"
[EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
[EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
[EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
[EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"
[render/egl.c:264] Failed to initialize EGL
[render/egl.c:554] Failed to initialize EGL context
[render/gles2/renderer.c:679] Could not initialize EGL
[src/main.cpp:134] Fatal error: Segmentation fault
#1  0x363b40 <main+0x1580> at /usr/local/bin/wayfire
#2  0x82bdcb53f <pthread_sigmask+0x53f> at /lib/libthr.so.3
#3  0x82bdcaafb <pthread_setschedparam+0x83b> at /lib/libthr.so.3
#4  0x8215222d3 <???> at ???
#5  0x8223fb9c4 <wlr_renderer_get_render_formats+0x24> at /usr/local/wlroots016/lib/libwlroots.so.11
#6  0x82240af23 <wlr_allocator_init+0x83> at /usr/local/wlroots016/lib/libwlroots.so.11
#7  0x362a59 <main+0x499> at /usr/local/bin/wayfire
#8  0x82ae5dafa <__libc_start1+0x12a> at /lib/libc.so.7
 
Today,when I started again Wayland / wayfire it didn't work. I don't remember that yesterday I've applied hard changes,so I'm not able to understand if and what changes can I revert to make it work again. The startup script that I use :

Code:
#!/usr/local/bin/zsh
# env WLR_DRM_NO_MODIFIERS=1
env WLR_NO_HARDWARE_CURSORS=1 LIBSEAT_BACKEND=consolekit2 ck-launch-session dbus-run-session wayfire

Code:
[src/main.cpp:334] Starting wayfire version v0.8.0
[libseat] [libseat/libseat.c:66] Seat opened with backend 'consolekit2'
[libseat] [libseat/backend/consolekit2.c:92] Ping failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.9" (uid=1001 pid=25032 comm="") interface="org.freedesktop.DBus.Peer" member="Ping" error name="(unset)" requested_reply="0" destination="org.freedesktop.ConsoleKit" (uid=0 pid=90025 comm="")
[backend/session/session.c:109] Successfully loaded libseat session
[backend/backend.c:220] Found 1 GPUs
[backend/drm/backend.c:200] Initializing DRM backend for /dev/dri/card0 (nvidia-drm)
[backend/drm/drm.c:253] Found 4 DRM CRTCs
[backend/drm/drm.c:180] Found 12 DRM planes
[render/egl.c:201] Supported EGL client extensions: EGL_EXT_platform_base EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_EXT_platform_device EGL_MESA_platform_surfaceless EGL_EXT_explicit_device EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_KHR_platform_gbm EGL_MESA_platform_gbm EGL_EXT_platform_xcb
EE 06-03-24 10:23:41.031 - [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In internal function: Additional INFO may be available"
[EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In function eglQueryDeviceStringEXT(), string query failed at backend"
[EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
[EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
[EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
[EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"
[render/egl.c:264] Failed to initialize EGL
[render/egl.c:554] Failed to initialize EGL context
[render/gles2/renderer.c:679] Could not initialize EGL
[src/main.cpp:134] Fatal error: Segmentation fault
#1  0x363b40 <main+0x1580> at /usr/local/bin/wayfire
#2  0x82bdcb53f <pthread_sigmask+0x53f> at /lib/libthr.so.3
#3  0x82bdcaafb <pthread_setschedparam+0x83b> at /lib/libthr.so.3
#4  0x8215222d3 <???> at ???
#5  0x8223fb9c4 <wlr_renderer_get_render_formats+0x24> at /usr/local/wlroots016/lib/libwlroots.so.11
#6  0x82240af23 <wlr_allocator_init+0x83> at /usr/local/wlroots016/lib/libwlroots.so.11
#7  0x362a59 <main+0x499> at /usr/local/bin/wayfire
#8  0x82ae5dafa <__libc_start1+0x12a> at /lib/libc.so.7
This seems to be what I struggled with before.
Not 100% sure it was the timing, but if I recall correctly, after setting
sh:
kld_list="${kld_list} i915kms.ko nvidia-modeset.ko nvidia-drm.ko linux.ko linux64.ko"
in /etc/rc.conf, this stopped happening. The loaing order of these modules could be essential.

What I still not sure is that I've disalbed iGPU in UEFI firmware configuration and using nvidia dGPU only.
 
try to run it without the user being in the wheel group
If it is needed, the option for me would be to stick with xorg.
(Testing is possible, but not enough usable for me.)
The computer I'm running FreeBSD is not used by anyone else, so I'm a user and the admin at the same time.
Not to excessibly pollute history, and it is basically discouraged, I use a user belonging in wheel and su to root when needed (histories of administrative tasks are recorded only for root), and if the regular user does not belong to wheel, I'm forced to su to non-root user belonging to wheel and then su to root. Too annoying. Only root (both UID and GID is 0) should be rejected, not whole wheel users (Only GID is 0).

I've asked a lot of questions here : https://github.com/WayfireWM/wayfire/ ; they are soo kind to help.
Unfortunately, I haven't registered to github before MS purchased it, and I want no more tied-to-MS accounts. If it is possible to ask something there without registering, of course I'm happy to ask for help there, though.
 

T-Aoki :​

kld_list="${kld_list} i915kms.ko nvidia-modeset.ko nvidia-drm.ko linux.ko linux64.ko"

until yesterday this sequence worked great for me :

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

so,the loading order of these modules can't make the difference.
 
So another possibility.
I've, silly enough, did another operation when I've changed kld_list.
As some noted that /var/run/ on ZFS could cause problem (because of, if I recall correctly, the lack of posix_fallocate(2)() functionality).
First, formerly to this changes, I've tried /var/run/user/ as tmfs but didn't help and instantly dropped to single user mode when rc scripts tries to create the tmpfs and needed late mount option, maybe because it happenes before dataset for /var is mounted.

The change indirectly helped could be the next trial.
To test making /var/run as tmpfs, I've created /var/run2 and mv(1)'ed everything under /var/run/ there in single user mode, thus, cleared /var/run/.
.Of course, as I've overlooked the fact why tmpfs on /var/run/user failed without late option, it failed without late option and caused some files to be masked by tmpfs, caused crash or hang.

So I reverted the changes, but not restored the backed up contents formerly existed in /var/run/ (restore only when something stopped working, maybe because directory under /var/run/ which are created on install time).

Maybe I should better migrating /var itself to / dataset, keeping datasets under it as independent datasets. And if tmpfs as /var/run goes OK with it even if ZFS-on-Root, adjusting /etc/rc.conf[.local] with current default var_run_enable="YES" and var_run_autosave="YES" on main branch (not MFC'ed) could help.
Note that their comments should be fixed to reflect reality.
 
I had the same issue with tmpfs on /var/run/user
So I'm not alone ;) .
The workaround is something like export
sh:
XDG_RUNTIME_DIR=/tmp/`id -u`-xdg-runtime
and its variants, which make XDG_RUNTIME_DIR points to somewhere under /tmp/, which Linux guys notes here and there.
It helps mount race problem, but doesn't help
EE 06-03-24 01:01:53.655 - [src/main.cpp:62] Unable to drop root (we shouldn't be able to restore it after setuid), refusing to start
error, unfortunately.:(
 
my settings

Code:
export XDG_RUNTIME_DIR="/var/run/user/`id -u`"

commands

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

working on my Dell XPS 15 and Macbook air 2011
 
sudo chown -R "${USER}":"$(id -u)" /var/run/user/"$(id -u)"
Does it really work? It should be expanded, if UID is 1234, at runtime, into
sh:
sudo chown -R 1234:1234 /var/run/user/1234
even if the user having UID 1234 belongs to guest (GID 31 by default).

According to chown(8) manpage, shouldn't it as below?
sh:
sudo chown -R "${USER}":"$(id -g)" /var/run/user/"$(id -u)"

Or is intentionally specifying usually-nonexistent GID the culprit?
I think usually a regular user has UID larger than 1000, and in /usr/ports/GIDs, there is a comment stating as below.
# DO NOT USE: 1000-65532
I'm a bit confused.
 
Back
Top