FreeBSD as my new desktop, frequent total freeze

Hi,

I made the big jump and setup FreeBSD as my desktop
First I have to say the installation and setup of Wayland, XWayland, the login manager and Sway was a clear path and flawless. Thanks to the excellent FreeBSD handbook.

Now the big problem:
I have one of those very common Intel N100 with an Alder Lake-N UHD graphics

vgapci0@pci0:0:2:0: class=0x030000 rev=0x00 hdr=0x00 vendor=0x8086 device=0x46d1 subvendor=0x0000 subdevice=0x0000
vendor = 'Intel Corporation'
device = 'Alder Lake-N [UHD Graphics]'
class = display
subclass = VGA

And I knew there might be some issues:
https://bsd-hardware.info/?id=pci:8086-46d1
20241212 - needs drm-610 package, min FreeBSD 14, still kernel panics occasionally, hardware decoding via vaapi/vdupa crashes. Open GL Works

I have installed drm-kmod gpu-firmware-kmod and drm-61-kmod

Problems:
1/ When suspend with
acpiconf -s 3
I see a lot of error at wake up and get about 2min30 of those messages:

Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Controller timeout
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ============== REGISTER DUMP ==============
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x00001002
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Present: 0x1fff0000 | Host ctl: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Power: 0x0000000b | Blk gap: 0x00000080
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x0000fa07
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff003b
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Caps: 0x546ec881 | Caps2: 0x80000807
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Max curr: 0x00000000 | ADMA err: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ADMA addr:0x00000000 | Slot int: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ===========================================
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Controller timeout
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ============== REGISTER DUMP ==============
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x00001002
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000

I can live with that... no problem.

2/ I get a lot of total freeze with the only GUI application I use:
- `chromium` (I tried both `--ozone-platform=wayland` and `--ozone-platform=x11`)
- but I got them with librewolf too
- qutebrowser just throw a `Trace/BPT trap (core dumped)` at startup

When it freeze I can't even get to a tty.
Sometimes only one of my monitor freeze.

Some things I collected:

> doas kldstat
Password:
Id Refs Address Size Name
1 90 0xffffffff80200000 1f41500 kernel
2 1 0xffffffff82143000 5e9328 zfs.ko
3 1 0xffffffff8272d000 7808 cryptodev.ko
4 1 0xffffffff82735000 1c5e8 geom_eli.ko
5 1 0xffffffff831e5000 1e0228 i915kms.ko
6 2 0xffffffff833c6000 85090 drm.ko
7 1 0xffffffff8344c000 22b8 iic.ko
8 2 0xffffffff8344f000 4120 linuxkpi_video.ko
9 3 0xffffffff83454000 7350 dmabuf.ko
10 4 0xffffffff8345c000 3378 lindebugfs.ko
11 1 0xffffffff83460000 c338 ttm.ko
12 1 0xffffffff8346d000 4250 ichsmb.ko
13 1 0xffffffff83472000 2178 smbus.ko
14 1 0xffffffff83475000 b1270 if_iwlwifi.ko
15 1 0xffffffff83527000 6020 ig4.ko
16 1 0xffffffff8352e000 3360 uhid.ko
17 1 0xffffffff83532000 4364 ums.ko
18 1 0xffffffff83537000 5640 ng_ubt.ko
19 4 0xffffffff8353d000 abb8 netgraph.ko
20 3 0xffffffff83548000 a250 ng_hci.ko
21 2 0xffffffff83553000 2670 ng_bluetooth.ko
22 1 0xffffffff83556000 2260 pflog.ko
23 1 0xffffffff83559000 4f978 pf.ko
24 1 0xffffffff835a9000 2a80 mac_ntpd.ko

> dmesg
...
drmn0: [drm] *ERROR* [CRTC:80:pipe A] flip_done timed out
WARNING new_crtc_state->event failed at /wrkdir/usr/ports/graphics/drm-61-kmod/work/drm-kmod-drm_v6.1.128_6/drivers/gpu/drm/drm_atomic_helper.c:2485
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [CRTC:80:pipe A] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [CONNECTOR:195:HDMI-A-1] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [PLANE:31:plane 1A] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [PLANE:76:cursor A] commit wait timed out
drmn0: [drm] *ERROR* [CRTC:80:pipe A] flip_done timed out
WARNING new_crtc_state->event failed at /wrkdir/usr/ports/graphics/drm-61-kmod/work/drm-kmod-drm_v6.1.128_6/drivers/gpu/drm/drm_atomic_helper.c:2485
drmn0: [drm] *ERROR* [CRTC:131:pipe B] flip_done timed out
WARNING new_crtc_state->event failed at /wrkdir/usr/ports/graphics/drm-61-kmod/work/drm-kmod-drm_v6.1.128_6/drivers/gpu/drm/drm_atomic_helper.c:2485
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [CRTC:80:pipe A] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [CRTC:131:pipe B] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [CONNECTOR:195:HDMI-A-1] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [CONNECTOR:202:HDMI-A-2] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [PLANE:31:plane 1A] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [PLANE:76:cursor A] commit wait timed out
drmn0: [drm] *ERROR* flip_done timed out
drmn0: [drm] *ERROR* [PLANE:82:plane 1B] commit wait timed out
...

cat /var/log/messages
...
Nov 6 12:58:50 lander2 pulseaudio[31035]: [] cli-command.c: stat('/usr/local/etc/pulse/default.pa.d'): No such file or directory
Nov 6 13:03:50 lander2 devd[72439]: check_clients: dropping disconnected client
Nov 6 15:09:53 lander2 kernel: drmn0: [drm] *ERROR* [CRTC:80:pipe A] flip_done timed out
Nov 6 15:09:53 lander2 kernel: WARNING new_crtc_state->event failed at /wrkdir/usr/ports/graphics/drm-61-kmod/work/drm-kmod-drm_v6.1.128_6/drivers/gpu/drm/drm_atomic_helper.c:2485
Nov 6 15:21:32 lander2 kernel: drmn0: [drm] *ERROR* [CRTC:131:pipe B] flip_done timed out
Nov 6 15:21:32 lander2 kernel: WARNING new_crtc_state->event failed at /wrkdir/usr/ports/graphics/drm-61-kmod/work/drm-kmod-drm_v6.1.128_6/drivers/gpu/drm/drm_atomic_helper.c:2485
Nov 6 15:21:45 lander2 seatd[13433]: 05:21:03.850 [INFO] [seatd/seat.c:673] Switching from VT 2 to VT 3
Nov 6 15:21:45 lander2 seatd[13433]: 05:21:03.851 [INFO] [seatd/seat.c:606] Disabling client 2 on seat0
Nov 6 15:22:00 lander2 kernel: drmn0: [drm] *ERROR* flip_done timed out
Nov 6 15:22:00 lander2 kernel: drmn0: [drm] *ERROR* [CRTC:80:pipe A] commit wait timed out
Nov 6 15:22:07 lander2 kernel: drmn0: [drm] *ERROR* flip_done timed out
Nov 6 15:22:07 lander2 kernel: drmn0: [drm] *ERROR* [CRTC:131:pipe B] commit wait timed out
Nov 6 15:22:37 lander2 kernel: drmn0: [drm] *ERROR* flip_done timed out
Nov 6 15:22:37 lander2 kernel: drmn0: [drm] *ERROR* [CONNECTOR:195:HDMI-A-1] commit wait timed out
Nov 6 15:22:37 lander2 kernel: drmn0: [drm] *ERROR* flip_done timed out
Nov 6 15:22:37 lander2 kernel: drmn0: [drm] *ERROR* [CONNECTOR:202:HDMI-A-2] commit wait timed out
Nov 6 15:22:37 lander2 kernel: drmn0: [drm] *ERROR* flip_done timed out
Nov 6 15:22:37 lander2 kernel: drmn0: [drm] *ERROR* [PLANE:31:plane 1A] commit wait timed out
Nov 6 15:22:56 lander2 seatd[13433]: 05:22:14.071 [INFO] [seatd/seat.c:625] Disabled client 2 on seat0
Nov 6 15:22:56 lander2 kernel: drmn0: [drm] *ERROR* flip_done timed out
Nov 6 15:22:56 lander2 kernel: drmn0: [drm] *ERROR* [PLANE:76:cursor A] commit wait timed out
Nov 6 15:22:56 lander2 kernel: drmn0: [drm] *ERROR* flip_done timed out
Nov 6 15:22:56 lander2 kernel: drmn0: [drm] *ERROR* [PLANE:82:plane 1B] commit wait timed out
Nov 6 15:23:40 lander2 devd[72439]: check_clients: dropping disconnected client
Nov 6 15:37:34 lander2 seatd[13433]: 05:36:51.961 [INFO] [seatd/seat.c:563] Opened client 2 on seat0
...

Also related to the suspend problem:

Nov 6 16:44:21 lander2 kernel: vgapci0: child drmn0 requested pci_set_powerstate
Nov 6 16:44:21 lander2 kernel: pci0: failed to set ACPI power state D3 on \_SB_.PC00.GFX0: AE_BAD_PARAMETER
Nov 6 16:44:21 lander2 kernel: acpi0: cleared fixed power button status
Nov 6 16:44:21 lander2 kernel: vgapci0: child drmn0 requested pci_set_powerstate
Nov 6 16:44:21 lander2 kernel: vgapci0: child drmn0 requested pci_enable_io
Nov 6 16:44:21 lander2 syslogd: last message repeated 1 times
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Controller timeout
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ============== REGISTER DUMP ==============
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x00001002
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Present: 0x1fff0000 | Host ctl: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Power: 0x0000000b | Blk gap: 0x00000080
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x0000fa07
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff003b
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Caps: 0x546ec881 | Caps2: 0x80000807
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Max curr: 0x00000000 | ADMA err: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ADMA addr:0x00000000 | Slot int: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ===========================================
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Controller timeout
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ============== REGISTER DUMP ==============
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x00001002
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Present: 0x1fff0000 | Host ctl: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Power: 0x0000000b | Blk gap: 0x00000080
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x0000fa07
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff003b
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Caps: 0x546ec881 | Caps2: 0x80000807
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Max curr: 0x00000000 | ADMA err: 0x00000000
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ADMA addr:0x00000000 | Slot int: 0x00000001
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: ===========================================
Nov 6 16:44:21 lander2 kernel: sdhci_pci0-slot0: Controller timeout

I will make a bug report once I have more insight in this thread.

My questions are:
Am I right assuming this is related to the Alder Lake-N UHD graphics driver WIP ?
Do you think there is something I could do to make FreeBSD usable on this hardware while things progress? (like disabling HW acceleration in chrome, GPU, etc., directly going for FreeBSD 15 BETA ).
The most fancy thing I do is maybe watch youtube video in HD, so I could live with some feature disable.
If not I will have to format and go back to Linux for the time being because this is just unusable, I have to hard reboot every 10 minutes.

Many thanks for your help !


By the way, just sharing an opinion:
I always hear Wifi drivers are a big barrier to the adoption of FreeBSD on the desktop and never understood why.
If I need Wifi I have one of those $30 GL iNet mini access point running OpenWRT and an Ethernet cable, no big deal. But finding a board and GPU available on the market and that is well supported is much harder.
 
I'll just answer the comment on wireless. I have an AX200 on a Beelink SER5 and it runs quite well, comparable to Linux speeds. Wireless is getting better and better, at present some cards only run at relatively slow speeds, but some, such as my AX200 are as functional as they are on Linux. (I don't have Windows, so I don't know if Linux wireless speed compares to Linux.
 
Do you think there is something I could do to make FreeBSD usable on this hardware while things progress? (like disabling HW acceleration in chrome, GPU, etc., directly going for FreeBSD 15 BETA ).
FreeBSD 15.0 (possibly other versions) has drm-latest-kmod that might be better on newer UHD (works for UHD 630)

I have this in loader.conf:

Code:
hw.i915kms.modeset=1
hw.i915kms.nuclear_pageflip=1
hw.i915kms.fastboot=1
hw.i915kms.enable_psr=0
hw.i915kms.enable_psr2_sel_fetch=0
hw.i915kms.panel_use_ssc=0
hw.i915kms.enable_ips=0
hw.i915kms.enable_fbc=0
hw.i915kms.enable_dc=0
hw.i915kms.disable_power_well=0
hw.i915kms.enable_guc=3
hw.i915kms.guc_log_level=0
hw.i915kms.verbose_state_checks=0
hw.i915kms.error_capture=0

And in /usr/local/etc/profile.d/general-tweaks.sh (custom-created) I have this to disable graphics pipeline/GPL shaders (caused Dota 2 Vulkan to randomly crash Linux and FreeBSD):

Code:
# Intel
export ANV_NO_GPL='1'

I'm thinking atomic errors might be resolved with hw.i915kms.nuclear_pageflip=0. Flip if I understand right is usually related to Vsync, so theoretically the less apps/things trying to respect Vsync might have less-errors reported; I'm not sure how to do that with Wayland, but Xorg I force Intel's DDX (not default modesetting) and disable a bunch of Vsync stuff with a xorg.conf snippet:

Code:
Section "OutputClass"
    Identifier "Intel (intel custom)"
    MatchDriver "i915"
    Driver "intel"
    Option "AccelMethod" "SNA"
    Option "DRI" "3"
    Option "TearFree" "0"
    Option "VSync" "0"
    Option "PageFlip" "0"
    Option "SwapbuffersWait" "0"
    Option "TripleBuffer" "0"
    Option "LinearFramebuffer" "1"
    Option "Throttle" "0"
EndSection

Putting this into a similar profile.d file might work:

Code:
# Vsync
export vblank_mode=0
export MESA_VK_WSI_PRESENT_MODE=immediate

If I need Wifi I have one of those $30 GL iNet mini access point running OpenWRT and an Ethernet cable, no big deal. But finding a board and GPU available on the market and that is well supported is much harder.
I used to do that with a full-sized router :p (it worked pretty good!). I bought a AX210 card later specifically for FreeBSD, and it seemingly works good (faster speeds than previous AC 9560 card). I bought this card on Amazon for $17.
 
Thanks ! that gives me a lot of path to explore and test 😁

Of course I first tried the quick and dumb way, copied your full loader.conf What gave me an opportunity to learn about system rescue on FreeBSD...
So time to do it the slow/smart way and try to understand what I am doing
:D
 
Welcome to FreeBSD, hope you'll have fun :)
If I'm not mistaken, suspend and resume is not working well on FreeBSD, for my part I don't use it because it will crash my session. Is it a laptop or a desktop that you install the bestie on ? which model ?
 
I've run a desktop on an N100 mini pc with 14.3 release, but using X11, not wayland. Didn't have any problems. Although I use windowmaker and firefox, not chromium.

I suggest checking that you've installed the cpu microcode, as described here
 
I also at times had problems with Wayland (in my case: Hyprland) locking up from time to time.

Xorg has been stable for me though.

Maybe you want to check if Xorg behaves differently for you, too.
 
Welcome to FreeBSD, hope you'll have fun :)
If I'm not mistaken, suspend and resume is not working well on FreeBSD, for my part I don't use it because it will crash my session. Is it a laptop or a desktop that you install the bestie on ? which model ?

Thanks !
I have 2 of those Chuwi Larkbox X 2023 https://www.chuwi.com/product/items/chuwi-larkbox-x-2023/specs.html
It was recommended on various forums and I have been using one of them as a FreeBSD home server for a year now to test.
I have been very happy about it (Linux Desktop and FreeBSD server)

bsd-hardware.info is down right now but I saw a lot of people run OPNsense on it.
 
I've run a desktop on an N100 mini pc with 14.3 release, but using X11, not wayland. Didn't have any problems. Although I use windowmaker and firefox, not chromium.

I suggest checking that you've installed the cpu microcode, as described here

Yes ;) I saw this post while searching and while my microcode was a few months old I updated it yesterday.
 
I also at times had problems with Wayland (in my case: Hyprland) locking up from time to time.
Yes I started with Hyprland and when the freeze happened I immediately switched to Sway to be sure it wasn't compositor related.

Xorg has been stable for me though.

Maybe you want to check if Xorg behaves differently for you, too.
This could be an option I just need Kitty and Chromium to feel comfortable. But looking at this forum I saw mostly people complaining of crash with this setup on X (probably because there are more Xorg users...)

Right now I am just trying to understand how the whole drm-kmod, modules and settings works, read dmesg and /var/log/messages so I can make changes and test methodically.
I am still confused about all the hw.i915kms.* options but I guess it is normal :p
 
Back
Top