black screen when I closed a playing youtube video on firefox 90.

hello, I am new to freebsd.
I installed freebsd 13 on my ThinkCentre m93p with i5-4590T, 16G ram and an intel ssd. That works fine on installing setps.
And then I installed xorg, slim, xfce and drm-kmod firefox mpv by pkg.

pkg install xorg slim xfce drm-kmod firefox mpv

Below is the situation that I haven't connect the dp port to my screen.

# cat /dev/sndstat
Installed devices:
pcm0: <Intel Haswell (HDMI/DP 8ch)> (play) default
pcm1: <Realtek ALC283 (Analog 3.1)> (play)
No devices installed from userspace.

Below is the situation that I have connected the dp port to my screen.

# cat /dev/sndstat
Installed devices:
pcm0: <Intel Haswell (HDMI/DP 8ch)> (play)
pcm1: <Realtek ALC283 (Front Analog)> (play/rec) default
pcm2: <Realtek ALC283 (Rear Analog Mic)> (rec)
No devices installed from userspace.

Below is my rc.conf file

# cat /etc/rc.conf
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable


My question is:

I opened a youtube video and firefox worked fine but no voice. I can drag the video progress bar as I want. Everything is ok but voice.

Then I executed sysctl hw.snd.default_unit=0 and refresh youtube page. Now I got voice.

But when I drag the video progress bar once, my screen became black (blink once) and later I got the right position of the video. The screen became totally black when I drag the progress bar twice, no came back.

When I opend a youtube video, started to play, and then close the page, I got screen blacked and no came back.

I used mpv to play a mp4 video and then got the same performance with youtube page.

So, what should I do?
Remove these two. They belong in /boot/loader.conf. But you don't need to load them anyway. Both sound(4) and snd_hda(4) are already built-in with the GENERIC kernel so they don't need to be loaded.
Thank you for reminding me. I removed the two lines, but the problem is still here.

I guess the screen blink and blacked screen may caused by Realtek ALC283 driver or intel HD4400 (i915) driver?

Realtek ALC283 is my default audio out device, but I am sure no voice out from it. After I selected Intel Haswell (HDMI/DP 8ch) as my voice out device, the screen problem happned.
Have you tried switching to an older video driver i915kms that comes with the kernel? Looks like you might be using the newer one.