Hello everyone! I'm new to GhostBSD and I'm trying to make my favorite wayland compositor niri work with it! I have read the wayland section in the handbook and I have installed and enabled seatd as required and I've also set the XDG_RUNTIME_DIR environment variable. The DRM (I have an AMD RX 6600) seems to be already loaded and used by GhostBSD.

The error message I get when trying to launch niri (from the TTY) is the following:

thread 'main' panicked at src/main.rs:188:6:
called \`Result::unwrap()\` on an \`Err\` value: error initializing the TTY backend

Caused by:
    0: Error creating a session. This might mean that you're trying to run niri on a TTY that is already busy, for example if you're running this inside tmux that had been originally started on a different TTY
    1: Failed to open session: Function not implemented (os error 78)
stack backtrace:
   0: rust\_begin\_unwind
   1: core::panicking::panic\_fmt
   2: core::result::unwrap\_failed
   3: niri::main
note: Some details are omitted, run with \`RUST\_BACKTRACE=full\` for a verbose backtrace.

I also tried to use Sway (again from TTY) and it gives me the following error message:

00:00:00.001 \[ERROR\] \[wlr\] \[libseat\] \[libseat/backend/seatd.c:66\] Could not connect to socket /var/run/seatd.sock: Permission denied
00:00:00.001 \[ERROR\] \[wlr\] \[libseat\] \[libseat/backend/consolekit2.c:616\] Could not get session: Unable to lookup session information for process '2439'
00:00:00.001 \[ERROR\] \[wlr\] \[libseat\] \[libseat/libseat.c:83\] No backend was able to open a seat
00:00:00.001 \[ERROR\] \[wlr\] \[backend/session/session.c:83\] Unable to create seat: Function not implemented
00:00:00.001 \[ERROR\] \[wlr\] \[backend/session/session.c:248\] Failed to load session backend
00:00:00.001 \[ERROR\] \[wlr\] \[backend/backend.c:79\] Failed to start a session
00:00:00.001 \[ERROR\] \[wlr\] \[backend/backend.c:407\] Failed to start a DRM session
00:00:00.001 \[ERROR\] \[sway/server.c:228\] Unable to create backend

I suppose something's going one with either my wayland setup or DRM (but Mate works normally? Doesn't X11 use DRM?) Any ideas of what I'm doing wrong?

I also have an rx6600 and working (sort of) Wayland with GhostBSD XFCE. But I'm using wayfire. Do any of the other compositors work? If another compositor works then the issue would be with niri

    Sorry I can't help more but I don't know much about Wayland

    Neville Thank you so much! I also tried Wayfire and it doesn't work. It gives me the following error:

    II 20-01-25 17:10:05.908 - \[src/main.cpp:364\] Starting wayfire version v0.9.0
    EE 20-01-25 17:10:05.908 - \[libseat\] \[libseat/backend/seatd.c:66\] Could not connect to socket /var/run/seatd.sock: Permission denied
    II 20-01-25 17:10:05.908 - \[libseat\] \[libseat/libseat.c:80\] Backend 'seatd' failed to open seat, skipping
    EE 20-01-25 17:10:05.909 - \[libseat\] \[libseat/backend/consolekit2.c:616\] Could not get session: Unable to lookup session information for process '2065'
    II 20-01-25 17:10:05.909 - \[libseat\] \[libseat/libseat.c:80\] Backend 'consolekit2' failed to open seat, skipping
    EE 20-01-25 17:10:05.909 - \[libseat\] \[libseat/libseat.c:83\] No backend was able to open a seat
    EE 20-01-25 17:10:05.909 - \[backend/session/session.c:83\] Unable to create seat: Function not implemented
    EE 20-01-25 17:10:05.909 - \[backend/session/session.c:248\] Failed to load session backend
    EE 20-01-25 17:10:05.909 - \[backend/backend.c:79\] Failed to start a session
    EE 20-01-25 17:10:05.909 - \[backend/backend.c:359\] Failed to start a DRM session
    EE 20-01-25 17:10:05.909 - \[src/main.cpp:141\] Fatal error: Segmentation fault
    EE 20-01-25 17:10:05.909 - #1  0x338f20 <main+0x1900> at /usr/local/bin/wayfire
    EE 20-01-25 17:10:05.909 - #2  0x82bd50730 <pthread\_sigmask+0x540> at /lib/libthr.so.3
    EE 20-01-25 17:10:05.909 - #3  0x82bd4fceb <pthread\_setschedparam+0x84b> at /lib/libthr.so.3
    EE 20-01-25 17:10:05.909 - #4  0x8214122d3 <???> at ???
    EE 20-01-25 17:10:05.909 - #5  0x82179d294 <wlr\_backend\_get\_drm\_fd+0x4> at /usr/local/lib/libwlroots.so.12
    EE 20-01-25 17:10:05.909 - #6  0x337af5 <main+0x4d5> at /usr/local/bin/wayfire
    EE 20-01-25 17:10:05.909 - #7  0x82a953cea <\_\_libc\_start1+0x12a> at /lib/libc.so.7

    So, I'm sure I'm doing something wrong when it comes to seatd...

    On FreeBSD 14.2, I was able to make it work but freebsd didn't worked well for me (on my old RX 560). Btw, do you know if I should upgrade the FreeBSD version that GhostBSD uses? I thought to let it be and wait for the update to GhostBSD itself. Or it doesn't work like that? Sorry, I'm really new on GhostBSD...

    22 days later

    Ensure that the runtime directory path is constructed correctly using the appropriate user ID. Verify that the user ID is set correctly to avoid misconfigurations.

      vimanuelt Hello and thank you for the reply! Yes, the user ID was set correctly!

        Just for background, are you using this package?

        pam_xdg

        If not, just install it. sudo pkg install pam_xdg

          Rempas
          Let me be more specific. You want to do this.
          export XDG_RUNTIME_DIR="/run/user/$(id -u)"

          Do not do this.
          export XDG_RUNTIME_DIR="/run/user/rempas"

          Do not do this.
          export XDG_RUNTIME_DIR="/run/user/1001"

            vimanuelt No, I haven't been using it. I think at least.

            vimanuelt Damn. I was doing it the wrong way I think because I wasn't sure how to use the "$(id -u)" part in the csh so, I thought "1001" is the same thing. Too bad I don't have GhostBSD installed anymore so I cannot test it.

            Thanks for the help anyway!

            No worries. Niri runs smoothly on GhostBSD. I built a Niri setup tool and an ISO last year with Niri as the default. Once GhostBSD transitions to Wayland, I'll refine and release it. The main challenge is going beyond the default hotkeys and optimizing them for GhostBSD. I think standardizing hotkeys across environments would be a great improvement.

              vimanuelt Thank you so much! All that sound so cool and as for Niri, it's the only Window Manager (or compositor I guess, as we're talking about Wayland) that I finally stick to. It's the first and only one that feels natural.

              Thank you for your dedication and help! I'll re-install GhostBSD and setup everything at some point in the near future. Seriously thank you for everything!