Solved Graphic environment quite slow in FreeBSD-15 and drm-61-kmod

rosorio

Developer
New laptop, another headache...
I currently using a new Lenovo thinkbook with an Intel Raptor Lake-P, which is nicely supported by
the drm-61-kmod which let me plug 2 external outputs (HDMI + USB-C to HDMI) with a pretty decent
definition(1920x1200 and 1920x1080).

The issue comes when I start using firefox or thunderbird who become really slow. Using 'sysctl kern.sched.steal_thresh=1' improves the situation, specially for videos and youtube, but using
videoconferencing tools is a pain.
In fact I see the computer slowdown and the cpu consumption rising every time I refreshing webpages.

Any suggestion about to how improve the situation ?
 
Videoconferencing? Do you have working microphone-in with that thing?

Can you clarify? It is only slow when using external monitors?
 
 
Is 15 kernel built without debug options? It's been a while since I've looked but at one point I think CURRENT was built with kernel debug options on that included memory checks and lock order reversal checks. That kind of stuff may slow down the system
 
Is 15 kernel built without debug options? It's been a while since I've looked but at one point I think CURRENT was built with kernel debug options on that included memory checks and lock order reversal checks. That kind of stuff may slow down the system
makes sense, I didn't expect such difference with the GENERIC and GENERIC-NODEBUG.
So rebuilding the kernel using GENERIC-NODEBUG does the job :)
Thanks
 
  • Like
Reactions: mer
makes sense, I didn't expect such difference with the GENERIC and GENERIC-NODEBUG.
So rebuilding the kernel using GENERIC-NODEBUG does the job :)
Thanks

Yeah, the difference is big. But I am surprised that the DRM driver is affected so much.
 
Ok, moving to GENERIC-NODEBUG improves the situation but not at all, this is the btop output with 2 computer,

one running FreeBSD 13-amd64 with an Intel Core i7-5600U CPU @ 2.60GHz (2594.11-MHz K8-class CPU) and 8G of memory
and the Lenovo thinkbook and its Intel Core i7-13700H 2918.40-MHz
Both runs 3 Firefox instances playing youtube videos

travelmate.png


thinkbook.png


As you can see the old Acer PC runs pretty smooth, when the new Thinkbook is clearly overloaded. :'‑(
 
X-Video Extension version 2.2
screen #0
Adaptor #0: "GLAMOR Textured Video"
number of ports: 16
port base: 150
operations supported: PutImage
supported visuals:
depth 24, visualID 0x21
number of attributes: 5
"XV_BRIGHTNESS" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_CONTRAST" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_SATURATION" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_HUE" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_COLORSPACE" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
maximum XvImage size: 8192 x 8192
Number of image formats: 3
id: 0x32315659 (YV12)
guid: 59563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x30323449 (I420)
guid: 49343230-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x3231564e (NV12)
guid: 4e563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 2
type: YUV (planar)
 
First try libvdpau-va-gl was missing, once installed I got this:

libva info: VA-API version 1.20.0libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.solibva info: Found init function __vaDriverInit_1_20ioctl(I915_GEM_USERPTR) failed. Try running as root but expect poor stability.libva info: va_openDriver() returns 0[0000000819080560] avcodec decoder: Using OpenGL/VAAPI backend for VDPAU for hardware decoding

As far as I understand "ioctl(I915_GEM_USERPTR) failed." seems to be the issue
Adding myself to the operator group doesn't help.

In firefox I also see

[Child 6267, MediaDecoderStateMachine #2] WARNING: Decoder=5c2aa35c6900 Decode error: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - virtual mozilla::MediaResult mozilla::FFmpegVideoDecoder<46465650>::DoDecode(mozilla::MediaRawData *, uint8_t *, int, bool *, MediaDataDecoder::DecodedData &): avcodec_send_packet error: Cannot allocate memory: file /wrkdirs/usr/ports/www/firefox/work/firefox-122.0/dom/media/MediaDecoderStateMachineBase.cpp:166

I think I have new elements to explore
 
Back
Top