Solved Unable to start Wayland compositor

Hello,

I just installed FreeBSD on an older laptop.
% unami -a
FreeBSD freebsd 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC amd64


% pciconf -lv|grep -B4 VGA
vgapci0@pci0:0:2:0: class=0x030000 rev=0x0e hdr=0x00 vendor=0x8086 device=0x0f31 subvendor=0x17aa subdevice=0x3986
vendor = 'Intel Corporation'
device = 'Atom Processor Z36xxx/Z37xxx Series Graphics & Display'
class = display
subclass = VGA


I have followed the handbook and installed drm-kmod and executed the following command:

# sysrc kld_list+=i915kms

Afterwards I additionally installed libva-intel-driver, mesa-libs as well as mesa-dri.

Then I added the user to the video group and installed wayland and seatd. Since I am using the fish shell I added the following line to ~/.config/fish/config.fish:
set -gx XDG_RUNTIME_DIR "/var/run/user/$(id -u)"

And here I am unsure if I did it right. Please correct this if necessary.

Next I ran the subsequent commands:
# sysrc seatd_enable="YES"
# service seatd start


Lastly I installed LabWC and Hikari and configured them. Unfortunately, I am not able start either. Here is the output I get:

% hikari -c ~/.config/hikari/hikari.conf
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:53.363 [INFO] [seatd/server.c:146] New client connected (pid: 83989, uid: 1001, gid: 1001)
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:53.363 [INFO] [seatd/seat.c:170] Added clientt 1 to seat0
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:53.365 [INFO] [seatd/seat.c:480] Opened client 1 on seat0
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:54.002 [INFO] [seatd/client.c:471] Client disconnected
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:54.002 [INFO] [seatd/client.c:418] No clients on seat0 to activate
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:54.002 [INFO] [seatd/client.c:524] Closed client 1 on seat0
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:54.002 [INFO] [seatd/client.c:192] Removed client 1 from seat0
fish: Job 1, 'hikari -c ~/.config/hikari/hika…' terminated by signal SIGABRT (Abort)


Do you have any idea what is wrong? I appreciate any help.
 
hi mate

freebsd 14.1 creates the XDG_RUNTIME_DIR in a new location
and exports the location so you dont need to set it in your shell

XDG_RUNTIME_DIR new location
where username is your username

Code:
/var/run/xdg/username/

the old location was

Code:
/var/run/user/1001

you shouldnt need to set the XDG_RUNTIME_DIR in your shell config
so comment that out

Code:
# set -gx XDG_RUNTIME_DIR "/var/run/user/$(id -u)"

you might need to log out and back in again for the changes to take affect
then run printenv

Code:
printenv

you should see the XDG_RUNTIME_DIR is automatically set

Code:
XDG_RUNTIME_DIR=/var/run/xdg/username

if that doesnt work you could try setting the location in your fish shell config
where username is your username

Code:
set -gx XDG_RUNTIME_DIR "/var/run/xdg/username"

labwc install guide


dwl




i tried hikari but i think it has been abandoned
it still uses wlroots 0.15 and hasnt been updated to use the latest version of wlroots

labwc is ok but i couldnt find a bar that worked with it

dwl is the best wayland compositor on freebsd
the reason is because it has independent workspaces per display
 
Thank you. I removed the XDG_RUNTIME_DIR from my shell config. After a relogin the XDG_RUNTIME_DIR was properly set as you described. However, my problem persists as I still cannot start Wayland with the same abort message as above.

What is the correct way to start LabWC? Perhaps #labwc -c ~/.config/labwc/autostart?
 
hi mate

when i used labwc this is how i started it

Code:
exec dbus-launch --exit-with-session labwc

i just created a script called labwc-start

Code:
#!/bin/sh

# labwc start
exec dbus-launch --exit-with-session labwc

and then just run

Code:
labwc-start

see if that works for you
no need to specify the path to the config
 
When I run exec dbus-launch --exit-with-session labwc it shows me that
Code:
Option '--exit-with-session' is unknown.

And then I am logged out…
 
ah maybe you dont have dbus set up

edit your /etc/rc.conf

Code:
/etc/rc.conf

try enabling dbus

Code:
# kld list
kld_list="i915kms"
# wayland
seatd_enable="YES"
# dbus
dbus_enable="YES"

and reboot

and run

Code:
exec dbus-launch --exit-with-session labwc

if that doesnt work try enabling linux as well
using the kld_list and linux enable

Code:
# kld list
kld_list="linux linux64 i915kms"
# wayland
seatd_enable="YES"
# dbus
dbus_enable="YES"
# linux
linux_enable="YES"
 
I now enabled both dbus and linux but I still get same message and get logged out.

When I run exec dbus-launch --exit-with-session labwc it shows me that
Code:
Option '--exit-with-session' is unknown.

And then I am logged out…
 
you have everything set up for wayland

are you running the fish shell when you try and start labwc
just wondering if fish is causing an issue

do you get the same issue with the default shell
try switching to sh

Code:
sh

then try starting labwc

Code:
exec dbus-launch --exit-with-session labwc
 
When switching back to sh and running

Code:
exec dbus-launch --exit-with-session labwc

I get these kind of messages again:

Code:
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:53.363 [INFO] [seatd/server.c:146] New client connected (pid: 83989, uid: 1001, gid: 1001)
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:53.363 [INFO] [seatd/seat.c:170] Added clientt 1 to seat0
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:53.365 [INFO] [seatd/seat.c:480] Opened client 1 on seat0
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:54.002 [INFO] [seatd/client.c:471] Client disconnected
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:54.002 [INFO] [seatd/client.c:418] No clients on seat0 to activate
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:54.002 [INFO] [seatd/client.c:524] Closed client 1 on seat0
Oct 8 17:18:42 freebsd seatd[95184]: 00:48:54.002 [INFO] [seatd/client.c:192] Removed client 1 from seat0

But this time with no abort message, however I still get logged out…
 
the only thing i can think of is maybe its an issue with your labwc config

heres the location of the default labwc config files
Code:
ls -l /usr/local/share/examples/labwc

Code:
total 40
-rw-r--r--  1 root wheel   178 19 Jul 22:06 README
-rw-r--r--  1 root wheel  1250 19 Jul 22:06 autostart
-rw-r--r--  1 root wheel  3024 19 Jul 22:06 environment
-rw-r--r--  1 root wheel  1779 19 Jul 22:06 menu.xml
-rw-r--r--  1 root wheel   929 19 Jul 22:06 rc.xml
-rw-r--r--  1 root wheel 20769 19 Jul 22:06 rc.xml.all
-rw-r--r--  1 root wheel   155 19 Jul 22:06 shutdown
-rw-r--r--  1 root wheel  3302 19 Jul 22:06 themerc

heres my labwc config

Code:
~/.config/labwc

 
Thank you for your help. This is why I also installed Hikari and now Sway as well. I just use the default configs but when I want to run any of them always get the same messages and cannot start.

I am wondering if i915kms is correct for my old laptop. When I run vainfo I get this:

Code:
Trying display: wayland
Trying display: x11
Trying display: drm
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Bay Trail - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileNone                   :    VAEntrypointVideoProc
 
i have these vaapi and vdpau packages installed

Code:
libva-2.22.0                   VAAPI wrapper and dummy driver
libva-intel-driver-2.4.1_3     VAAPI legacy driver for Intel GMA 4500 (Gen4) to UHD 630 (Gen9.5)
libva-intel-hybrid-driver-1.0.2_3 Hybrid VP8 encoder and VP9 decoder for Intel GPUs
libva-utils-2.22.0             Collection of tests and utilities for VAAPI
libvdpau-1.5                   VDPAU wrapper and tracing library
libvdpau-va-gl-0.4.2_5         VDPAU driver with OpenGL/VAAPI backend

this is the output of vainfo on my system
i dont have xorg installed

Code:
Trying display: wayland
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_22
error: failed to resolve wl_drm_interface(): Undefined symbol "wl_drm_interface"
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Coffee Lake - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSlice
      VAProfileVP9Profile2            : VAEntrypointVLD
 
I was only missing libvdpau-va-gl. Now after adding it the output of vainfo looks like this:

Code:
Trying display: wayland
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Trying display: x11
error: can't connect to X server!
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Bay Trail - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileNone                   :    VAEntrypointVideoProc

This looks definitely wrong… And I have no idea why suddenly XDG_RUNTIME_DIR is not set!

I did not have drm-515-kmod. Upon installation drm-kmod was removed by the package manager but besides that nothing else changed.
 
these errors are weird

Code:
Trying display: wayland
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Trying display: x11
error: can't connect to X server!
Trying display: drm

error: XDG_RUNTIME_DIR is invalid or not set in the environment.

does printenv show if the XDG_RUNTIME_DIR is set

maybe you need to set it in your fish shell
changing username to your username in the command below

Code:
set -gx XDG_RUNTIME_DIR "/var/run/xdg/username"

these are the only XDG settings i export

Code:
~/.zshenv

Code:
# xdg directories
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"

my XDG_RUNTIME_DIR

Code:
# ls -l /var/run/xdg/djwilcox/

Code:
total 7
dr-xr-xr-x  11 djwilcox djwilcox 704  8 Oct 20:53 .fcdm-jail
-r--r--r--   1 djwilcox djwilcox   0  8 Oct 20:53 .fcdm-lock
srwxr-xr-x   1 djwilcox djwilcox   0  8 Oct 12:53 Alacritty-wayland-0-73211.sock
drwx------   2 djwilcox djwilcox   3  8 Oct 12:53 at-spi
drwx------   3 djwilcox djwilcox   3  8 Oct 12:53 dbus-1
drwx------   2 djwilcox djwilcox   3  8 Oct 12:53 dconf
drwx------   2 djwilcox djwilcox   2  8 Oct 12:54 doc
drwx------   2 djwilcox djwilcox   3  8 Oct 12:53 dwlb
drwx------   2 djwilcox djwilcox   3  8 Oct 12:53 emacs
drwx------   2 djwilcox djwilcox   2  8 Oct 13:12 pulse
-rw-------   1 djwilcox djwilcox   0  8 Oct 12:54 tofi.lock
srwxr-xr-x   1 djwilcox djwilcox   0  8 Oct 12:53 wayland-0
-rw-r-----   1 djwilcox djwilcox   0  8 Oct 12:53 wayland-0.lock
-rwx------   1 root     djwilcox   0  8 Oct 12:53 xdg_session.0
 
I have set now the XDG_RUNTIME_DIR in my fish shell config and that fixed it. But the rest remains the same…

Code:
# vainfo
Trying display: wayland
Trying display: x11
error: can't connect to X server!
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Bay Trail - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileNone                   :    VAEntrypointVideoProc
 
do you have these packages installed

Code:
sudo pkg install wayland wayland-protocols seatd wlroots qt5-wayland

also does you fstab have this line

Code:
/etc/fstab

Code:
proc /proc procfs rw 0 0
 
Which of the following firmware should I install?

Code:
# pkg search gpu-firmware
gpu-firmware-intel-kmod-alderlake-20230625 Firmware modules for alderlake Intel GPUs
gpu-firmware-intel-kmod-broxton-20230625 Firmware modules for broxton Intel GPUs
gpu-firmware-intel-kmod-cannonlake-20230625 Firmware modules for cannonlake Intel GPUs
gpu-firmware-intel-kmod-dg1-20230625 Firmware modules for dg1 Intel GPUs
gpu-firmware-intel-kmod-dg2-20230625 Firmware modules for dg2 Intel GPUs
gpu-firmware-intel-kmod-elkhartlake-20230625 Firmware modules for elkhartlake Intel GPUs
gpu-firmware-intel-kmod-geminilake-20230625 Firmware modules for geminilake Intel GPUs
gpu-firmware-intel-kmod-icelake-20230625 Firmware modules for icelake Intel GPUs
gpu-firmware-intel-kmod-kabylake-20230625 Firmware modules for kabylake Intel GPUs
gpu-firmware-intel-kmod-rocketlake-20230625 Firmware modules for rocketlake Intel GPUs
gpu-firmware-intel-kmod-skylake-20230625 Firmware modules for skylake Intel GPUs
gpu-firmware-intel-kmod-tigerlake-20230625 Firmware modules for tigerlake Intel GPUs

Code:
# pciconf -lv|grep -B4 VGA
vgapci0@pci0:0:2:0:    class=0x030000 rev=0x0e hdr=0x00 vendor=0x8086 device=0x0f31 subvendor=0x17aa subdevice=0x3986
    vendor     = 'Intel Corporation'
    device     = 'Atom Processor Z36xxx/Z37xxx Series Graphics & Display'
    class      = display
    subclass   = VGA
 
I have followed the handbook and installed drm-kmod and executed the following command:
Which of the following firmware should I install?
After pkg install drm-kmod (this is a meta package) you should have all the (intel) firmware files; something like this:
Code:
 # pkg info | grep firmware-intel
gpu-firmware-intel-kmod-alderlake-20230625 Firmware modules for alderlake Intel GPUs
gpu-firmware-intel-kmod-broxton-20230625 Firmware modules for broxton Intel GPUs
gpu-firmware-intel-kmod-cannonlake-20230625 Firmware modules for cannonlake Intel GPUs
gpu-firmware-intel-kmod-dg1-20230625 Firmware modules for dg1 Intel GPUs
gpu-firmware-intel-kmod-elkhartlake-20230625 Firmware modules for elkhartlake Intel GPUs
gpu-firmware-intel-kmod-geminilake-20230625 Firmware modules for geminilake Intel GPUs
gpu-firmware-intel-kmod-icelake-20230625 Firmware modules for icelake Intel GPUs
gpu-firmware-intel-kmod-kabylake-20230625 Firmware modules for kabylake Intel GPUs
gpu-firmware-intel-kmod-rocketlake-20230625 Firmware modules for rocketlake Intel GPUs
gpu-firmware-intel-kmod-skylake-20230625 Firmware modules for skylake Intel GPUs
gpu-firmware-intel-kmod-tigerlake-20230625 Firmware modules for tigerlake Intel GPUs

Your N2840 - GPU has rather ordinary Intel Integrated Graphics (aka HD Graphics). I don't know the exact firmware it uses, but if you have the complete list, then you should not have any problem in that area. If you were to try Xorg (instead of Wayland), you could see (in the Xorg log file) what firmware file is being used.
 
It turns out that I already had installed all of the gpu firmware above. I did not realize this before and am sorry about that. So that is not the problem…

I appreciate all your help very much but I decided to go with a different OS for this laptop.
 
in rc.conf shall be i915kms.ko not i915kms
That is interesting. In the handbook the command given is:

# sysrc kld_list+=i915kms

Can others please confirm that i915kms.ko is correct here? I might give it another try because I would love to have FreeBSD on the laptop…
 
Back
Top