Solved drm-kmod installed but sway won't start

Hi everyone,

After successfully setup my workstation (FreeBSD 12.1/drm-kmod binary), i tried to install FreeBSD 12.2 on my Lenovo T495.

When i try to launch sway -d i get the following error:
Code:
00:00:00.000 [sway/main.c:326] Sway version 1.5.1
00:00:00.002 [sway/main.c:153] FreeBSD kusanagi.rollniak.eu 12.2-RELEASE-p1 FreeBSD 12.2-RELEASE-p1 GENERIC  amd64
00:00:00.002 [sway/main.c:169] Contents of /etc/os-release:
00:00:00.002 [sway/main.c:153] NAME=FreeBSD
00:00:00.002 [sway/main.c:153] VERSION=12.2-RELEASE-p2
00:00:00.002 [sway/main.c:153] VERSION_ID=12.2
00:00:00.002 [sway/main.c:153] ID=freebsd
00:00:00.002 [sway/main.c:153] ANSI_COLOR="0;31"
00:00:00.002 [sway/main.c:153] PRETTY_NAME="FreeBSD 12.2-RELEASE-p2"
00:00:00.002 [sway/main.c:153] CPE_NAME=cpe:/o:freebsd:freebsd:12.2
00:00:00.002 [sway/main.c:153] HOME_URL=https://FreeBSD.org/
00:00:00.002 [sway/main.c:153] BUG_REPORT_URL=https://bugs.FreeBSD.org/
00:00:00.002 [sway/main.c:141] LD_LIBRARY_PATH=(null)
00:00:00.002 [sway/main.c:141] LD_PRELOAD=(null)
00:00:00.002 [sway/main.c:141] PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/rollniak/bin
00:00:00.002 [sway/main.c:141] SWAYSOCK=(null)
00:00:00.002 [sway/server.c:43] Preparing Wayland server initialization
00:00:00.003 [ERROR] [libseat] [libseat/libseat.c:73] libseat_open_seat: No backend was able to open a seat
00:00:00.003 [ERROR] [backend/session/libseat.c:102] Unable to create seat: Function not implemented
00:00:00.003 [INFO] [backend/session/direct-freebsd.c:208] Using tty /dev/ttyv8
00:00:00.005 [INFO] [backend/session/direct-freebsd.c:298] Successfully loaded direct session
00:00:00.010 [INFO] [backend/backend.c:157] Found 0 GPUs
00:00:00.010 [ERROR] [backend/backend.c:303] Failed to open any DRM device
00:00:00.013 [sway/server.c:49] Unable to create backend

Laptop configuration:
I put my user account in video group during the installation of FreeBSD:
Code:
rollniak wheel operator video

Because i have already get this issue PR 250700 on my workstation, i build the port graphics/drm-kmod on my laptop then i edited the file /etc/rc.conf:
Code:
clear_tmp_enable="YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="kusanagi.rollniak.eu"
ifconfig_re1="DHCP"
ifconfig_re1_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
kld_list="amdgpu"

Partial output of pkg install sway
Code:
=====
Message from wlroots-0.12.0:

--
Known issues:
- On FreeBSD 11.* kernel needs to be rebuilt with EVDEV_SUPPORT
- On FreeBSD 11.* drm-kmod needs https://github.com/FreeBSDDesktop/kms-drm/pull/213

When built with LIBSEAT enabled you may see the following:

    [ERROR] [libseat] [libseat/libseat.c:73] libseat_open_seat: No backend was able to open a seat
    [ERROR] [backend/session/libseat.c:102] Unable to create seat: Function not implemented

Possible solutions (select one):
- Ignore libseat errors to let wlroots use direct session
- Start seatd (e.g., `service seatd onestart`) and optionally
  prevent compositor from using SUID (e.g., `chmod u-s $(which sway)`)
- Rebuild sysutils/seatd with SUID enabled
=====
Message from sway-1.5.1:

--
Experimental features:
- HiDPI support for X11 applications. For instructions see
  https://github.com/swaywm/wlroots/pull/2064#issuecomment-622647075

At this time i rebooted my laptop.

Output of kldstat(8)
Code:
Id Refs Address                Size Name
1   64 0xffffffff80200000  227ad00 kernel
2    2 0xffffffff8247b000     a448 opensolaris.ko
3    1 0xffffffff82486000   3bad38 zfs.ko
4    1 0xffffffff82841000    1e7b0 geom_eli.ko
5    1 0xffffffff82860000     eed8 aesni.ko
6    1 0xffffffff832fa000   24f2c4 amdgpu.ko
7    2 0xffffffff8354a000    75c50 drm.ko
8    5 0xffffffff835c0000    12d30 linuxkpi.ko
9    4 0xffffffff835d3000    13f30 linuxkpi_gplv2.ko
10    2 0xffffffff835e7000      6d0 debugfs.ko
11    1 0xffffffff835e8000     f061 ttm.ko
12    1 0xffffffff835f8000    16bf0 if_iwm.ko
13    1 0xffffffff8360f000     2698 intpm.ko
14    1 0xffffffff83612000      b40 smbus.ko
15    1 0xffffffff83613000   28debf iwm9260fw.ko
16    1 0xffffffff838a1000     4260 ng_ubt.ko
17    3 0xffffffff838a6000     9bd0 netgraph.ko
18    2 0xffffffff838b0000     9128 ng_hci.ko
19    1 0xffffffff838ba000      9b0 ng_bluetooth.ko
20    1 0xffffffff838bb000      acf mac_ntpd.ko

And then i have the issue.

I didn't need to start seatd on my workstation to make sway working. but i tried to on this T495 to check if i would see a difference :

Code:
$ sudo service seatd onestart
$ sway -d
00:00:00.000 [sway/main.c:326] Sway version 1.5.1
00:00:00.002 [sway/main.c:153] FreeBSD kusanagi.rollniak.eu 12.2-RELEASE-p1 FreeBSD 12.2-RELEASE-p1 GENERIC  amd64
00:00:00.002 [sway/main.c:169] Contents of /etc/os-release:
00:00:00.002 [sway/main.c:153] NAME=FreeBSD
00:00:00.002 [sway/main.c:153] VERSION=12.2-RELEASE-p2
00:00:00.002 [sway/main.c:153] VERSION_ID=12.2
00:00:00.002 [sway/main.c:153] ID=freebsd
00:00:00.002 [sway/main.c:153] ANSI_COLOR="0;31"
00:00:00.002 [sway/main.c:153] PRETTY_NAME="FreeBSD 12.2-RELEASE-p2"
00:00:00.002 [sway/main.c:153] CPE_NAME=cpe:/o:freebsd:freebsd:12.2
00:00:00.002 [sway/main.c:153] HOME_URL=https://FreeBSD.org/
00:00:00.002 [sway/main.c:153] BUG_REPORT_URL=https://bugs.FreeBSD.org/
00:00:00.002 [sway/main.c:141] LD_LIBRARY_PATH=(null)
00:00:00.002 [sway/main.c:141] LD_PRELOAD=(null)
00:00:00.002 [sway/main.c:141] PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/rollniak/bin
00:00:00.002 [sway/main.c:141] SWAYSOCK=(null)
00:00:00.002 [sway/server.c:43] Preparing Wayland server initialization
00:00:00.008 [ERROR] [backend/backend.c:303] Failed to open any DRM device
00:00:00.009 [sway/server.c:49] Unable to create backend

Code:
--<<BOOT>>---
Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.2-RELEASE-p1 GENERIC amd64
FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
VT(efifb): resolution 1920x1080
CPU: AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx (2295.74-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x810f81  Family=0x17  Model=0x18  Stepping=1
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
  Structured Extended Features=0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  AMD Extended Feature Extensions ID EBX=0x1007<CLZERO,IRPerf,XSaveErPtr>
  SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=32768
  TSC: P-state invariant, performance statistics
real memory  = 25769803776 (24576 MB)
avail memory = 22778937344 (21723 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <LENOVO TP-R12  >
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 hardware threads
random: unblocking device.
ioapic0: MADT APIC ID 32 != hw id 0
ioapic1: MADT APIC ID 33 != hw id 0
ioapic0 <Version 2.1> irqs 0-23 on motherboard
ioapic1 <Version 2.1> irqs 24-55 on motherboard
Launching APs: 5 7 1 2 4 3 6
Timecounter "TSC-low" frequency 1147868130 Hz quality 1000
random: entropy device external interface
kbd1 at kbdmux0
000.000023 [4336] netmap_init               netmap: loaded module
[ath_hal] loaded
module_register_init: MOD_LOAD (vesa, 0xffffffff81115e40, 0) error 19
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
nexus0
efirtc0: <EFI Realtime Clock> on motherboard
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cryptosoft0: <software crypto> on motherboard
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS,SHA1,SHA256> on motherboard
acpi0: <LENOVO TP-R12> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 350
Event timer "HPET1" frequency 14318180 Hz quality 350
Event timer "HPET2" frequency 14318180 Hz quality 350
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
acpi_ec0: <Embedded Controller: GPE 0x3> port 0x62,0x66 on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <base peripheral, IOMMU> at device 0.2 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> at device 1.2 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1: <network> at device 0.0 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 1.3 on pci0
pci2: <ACPI PCI bus> on pcib2
nvme0: <Generic NVMe Device> mem 0xd0a00000-0xd0a03fff at device 0.0 on pci2
pcib3: <ACPI PCI-PCI bridge> at device 1.4 on pci0
pci3: <ACPI PCI bus> on pcib3
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0x3400-0x34ff mem 0xd0914000-0xd0914fff,0xd0900000-0xd0903fff at device 0.0 on pci3
re0: Using 1 MSI-X message
re0: ASPM disabled
re0: Chip rev. 0x50000000
re0: MAC rev. 0x00200000
miibus0: <MII bus> on re0
rgephy0: <RTL8251/8153 1000BASE-T media interface> PHY 1 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Using defaults for TSO: 65518/35/2048
re0: Ethernet address: 98:fa:9b:e8:a2:7e
re0: netmap queues/slots: TX 1/256, RX 1/256
pci3: <simple comms, UART> at device 0.1 (no driver attached)
pci3: <simple comms, UART> at device 0.2 (no driver attached)
pci3: <serial bus> at device 0.3 (no driver attached)
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xd0918000-0xd0918fff,0xd0910000-0xd0913fff at device 0.4 on pci3
ehci0: pre-2.0 USB revision (ignored)
usbus0: EHCI version 1.0
usbus0 on ehci0
usbus0: 480Mbps High Speed USB v2.0
pcib4: <ACPI PCI-PCI bridge> at device 1.5 on pci0
pci4: <ACPI PCI bus> on pcib4
pci4: <wireless controller> at device 0.0 (no driver attached)
pcib5: <ACPI PCI-PCI bridge> at device 1.6 on pci0
pci5: <ACPI PCI bus> on pcib5
re1: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0x2000-0x20ff mem 0xd0704000-0xd0704fff,0xd0700000-0xd0703fff at device 0.0 on pci5
re1: Using 1 MSI-X message
re1: ASPM disabled
re1: Chip rev. 0x50800000
re1: MAC rev. 0x00100000
miibus1: <MII bus> on re1
rgephy1: <RTL8251/8153 1000BASE-T media interface> PHY 1 on miibus1
rgephy1:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re1: Using defaults for TSO: 65518/35/2048
re1: Ethernet address: 98:fa:9b:e8:a2:7d
re1: netmap queues/slots: TX 1/256, RX 1/256
pcib6: <ACPI PCI-PCI bridge> at device 1.7 on pci0
pci6: <ACPI PCI bus> on pcib6
pci6: <unknown> at device 0.0 (no driver attached)
pcib7: <ACPI PCI-PCI bridge> at device 8.1 on pci0
pci7: <ACPI PCI bus> on pcib7
vgapci0: <VGA-compatible display> port 0x1000-0x10ff mem 0xc0000000-0xcfffffff,0xd0000000-0xd01fffff,0xd0500000-0xd057ffff at device 0.0 on pci7
hdac0: <ATI (0x15de) HDA Controller> mem 0xd05c8000-0xd05cbfff at device 0.1 on pci7
pci7: <encrypt/decrypt> at device 0.2 (no driver attached)
xhci0: <XHCI (generic) USB 3.0 controller> mem 0xd0200000-0xd02fffff at device 0.3 on pci7
xhci0: 64 bytes context size, 64-bit DMA
xhci0: Unable to map MSI-X table
usbus1 on xhci0
usbus1: 5.0Gbps Super Speed USB v3.0
xhci1: <XHCI (generic) USB 3.0 controller> mem 0xd0300000-0xd03fffff at device 0.4 on pci7
xhci1: 64 bytes context size, 64-bit DMA
xhci1: Unable to map MSI-X table
usbus2 on xhci1
usbus2: 5.0Gbps Super Speed USB v3.0
pci7: <multimedia> at device 0.5 (no driver attached)
hdac1: <AMD Raven HDA Controller> mem 0xd05c0000-0xd05c7fff at device 0.6 on pci7
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button1: <Sleep Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Synaptics Touchpad, device ID 0
battery0: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
uart0: <Non-standard ns8250 class UART with FIFOs> at port 0x3f8 irq 4 flags 0x10 on isa0
uart0: non-PNP ISA device will be removed from GENERIC in FreeBSD 12.
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
ugen2.1: <0x1022 XHCI root HUB> at usbus2
ugen0.1: <(0x10ec) EHCI root HUB> at usbus0
ugen1.1: <0x1022 XHCI root HUB> at usbus1
uhub0: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
uhub1: <(0x10ec) EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub2: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus2
nvd0: <SAMSUNG MZVLB512HBJQ-000L7> NVMe namespace
nvd0: 488386MB (1000215216 512 byte sectors)
hdacc0: <ATI R6xx HDA CODEC> at cad 0 on hdac0
GEOM_ELI: Device nvd0p3.eli created.
hdaa0: GEOM_ELI<ATI R6xx Audio Function Group> at nid 1:  on hdacc0
Encryption: AES-XTS 256
GEOM_ELI:     Crypto: hardware
pcm0: <ATI R6xx (HDMI)> at nid 3 on hdaa0
pcm1: <ATI R6xx (HDMI)> at nid 5 on hdaa0
pcm2: <ATI R6xx (HDMI)> at nid 7 on hdaa0
hdacc1: <Realtek ALC257 HDA CODEC> at cad 0 on hdac1
hdaa1: <Realtek ALC257 Audio Function Group> at nid 1 on hdacc1
pcm3: <Realtek ALC257 (Analog 2.0+HP/2.0)> at nid 20,33 and 18 on hdaa1
pcm4: <Realtek ALC257 (Right Analog Mic)> at nid 25 on hdaa1
Trying to mount root from zfs:zroot/ROOT/default []...
Root mount waiting for: usbus0 usbus1 usbus2
uhub2: 3 ports with 3 removable, self powered
acpi_ec0: EcCommand: no response to 0x84
uhub0: 8 ports with 8 removable, self powered
uhub1: 1 port with 1 removable, self powered
ugen2.2: <vendor 0x8087 product 0x0025> at usbus2
acpi_ec0: EcCommand: no response to 0x84
ugen2.3: <vendor 0x05e3 USB2.0 Hub> at usbus2
uhub3 on uhub2
uhub3: <vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/60.52, addr 2> on usbus2
uhub3: MTT enabled
Root mount waiting for: usbus2
acpi_ec0: EcCommand: no response to 0x84
uhub3: 4 ports with 4 removable, self powered
Root mount waiting for: usbus2
ugen2.4: <Azurewave Integrated Camera> at usbus2
ugen2.5: <Generic EMV Smartcard Reader> at usbus2
Root mount waiting for: usbus2
ugen2.6: <vendor 0x06cb product 0x00bd> at usbus2
[drm] amdgpu kernel modesetting enabled.
intsmb0: <AMD FCH SMBus Controller> at device 20.0 on pci0
smbus0: <System Management Bus> on intsmb0
iwm0: <Intel(R) Dual Band Wireless AC 9260> at device 0.0 on pci1
iwm0: hw rev 0x320, fw ver 34.3125811985.0, address 28:7f:cf:80:9e:ea
lo0: link state changed to UP
re1: link state changed to DOWN
re1: link state changed to UP
re0: link state changed to DOWN
Security policy loaded: MAC/ntpd (mac_ntpd)

Do you have some direction to point me out ?

Thanks
 
Back
Top