Bug 267915 - x11-wm/mutter: after graphics/mesa-* 21.3.8 -> 22.2.3 update OpenGL compositing fails on Intel Iris Pro
Summary: x11-wm/mutter: after graphics/mesa-* 21.3.8 -> 22.2.3 update OpenGL compositi...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-11-22 00:24 UTC by huanghwh
Modified: 2024-06-11 14:29 UTC (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description huanghwh 2022-11-22 00:24:49 UTC
1. Gnome422/GDM get blank login screen and without active mouse pointer;

2. try to kill gnome-shell and got login screen, but gnome reports software rendering: llvmpipe

3. gdm's session.log report: 
  libGL error: failed to authenticate magic 1
  libGL error: failed to load driver: crocus

4. pciconf:

vgapci0@pci0:0:2:0:     class=0x030000 rev=0x08 hdr=0x00 vendor=0x8086 device=0x0d26 subvendor=0x106b subdevice=0x0147
    vendor     = 'Intel Corporation'
    device     = 'Crystal Well Integrated Graphics Controller'
    class      = display
    subclass   = VGA

5. pkg info -x drm
drm-510-kmod-5.10.113_7
drm-kmod-20220907_1
libdrm-2.4.114,1

6. revert back to mesa-*-21.3.8, the problem is gone.
Comment 1 huanghwh 2022-11-22 07:36:05 UTC
# uname -a
FreeBSD mbp.gddsn.org.cn 13.1-RELEASE-p2 FreeBSD 13.1-RELEASE-p2 GENERIC amd64
Comment 2 Jan Beich freebsd_committer freebsd_triage 2022-11-29 06:34:06 UTC
(In reply to huanghwh from comment #1)
>  libGL error: failed to authenticate magic 1
>  libGL error: failed to load driver: crocus

Is it specific to X11? Try running graphics/kmscube under console.
Can you reproduce with newer crocus? Install graphics/mesa-devel (no need to remove mesa-dri).
Comment 3 huanghwh 2022-12-01 09:14:27 UTC
(In reply to Jan Beich from comment #2)
1. before install mesa-devel, kmscube can run
2、after install mesa-devel, kmscube still can run:
 # kmscube 
Using display 0x800c13c00 with EGL version 1.5
===================================
EGL information:
  version: "1.5"
  vendor: "Mesa Project"
  client extensions: "EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless"
  display extensions: "EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_IMG_context_priority EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_context_flush_control EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display "
===================================
OpenGL ES 2.x information:
  version: "OpenGL ES 3.2 Mesa 23.0.0-devel (git-dba75d345df)"
  shading language version: "OpenGL ES GLSL ES 3.20"
  vendor: "Intel"
  renderer: "Mesa Intel(R) Iris(R) Pro Graphics P5200 (HSW GT3)"
  extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_draw_instanced GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_AMD_performance_monitor GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_NV_conditional_render GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_NV_pack_subimage GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_OES_viewport_array GL_ANGLE_pack_reverse_row_order GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_occlusion_query_boolean GL_EXT_robustness GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_NV_pixel_buffer_object GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_debug_label GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_group_vote GL_EXT_shader_implicit_conversions GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_INTEL_performance_query GL_ANDROID_extension_pack_es31a GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5 GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_render_snorm GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_EXT_texture_norm16 GL_EXT_texture_view GL_KHR_blend_equation_advanced GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_NV_image_formats GL_NV_shader_noperspective_interpolation GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_gpu_shader5 GL_OES_primitive_bounding_box GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_float_blend GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_shader_samples_identical GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clear_texture GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_EXT_texture_compression_s3tc_srgb GL_MESA_shader_integer_functions GL_EXT_clip_control GL_EXT_color_buffer_half_float GL_EXT_memory_object GL_EXT_memory_object_fd GL_EXT_semaphore GL_EXT_semaphore_fd GL_EXT_texture_compression_bptc GL_EXT_texture_mirror_clamp_to_edge GL_KHR_parallel_shader_compile GL_NV_alpha_to_coverage_dither_control GL_EXT_EGL_image_storage GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_texture_shadow_lod GL_INTEL_blackhole_render GL_MESA_framebuffer_flip_y GL_NV_compute_shader_derivatives GL_EXT_demote_to_helper_invocation GL_EXT_depth_clamp GL_EXT_texture_query_lod GL_MESA_bgra "
===================================
Rendered 118 frames in 2.000248 sec (58.992678 fps)
Rendered 236 frames in 4.000517 sec (58.992378 fps)
Rendered 354 frames in 6.000764 sec (58.992491 fps)
Rendered 468 frames in 8.001124 sec (58.491786 fps)

3. but Gnome/gdm got the same problem;

4. startx and run glxgears got errors:
# glxgears
libGL error: failed to authenticate magic 1
libGL error: failed to load driver: crocus
libGL error: MESA-LOADER: failed to open swrast: Cannot open "/usr/local/lib/dri-devel/swrast_dri.so" (search paths /usr/local/lib/dri-devel, suffix _dri)
libGL error: failed to load driver: swrast
Error: glXCreateContext failed
Comment 4 Jan Beich freebsd_committer freebsd_triage 2022-12-07 11:33:02 UTC
Can you reproduce after ports 855947ebf7e7 (mesa 22.3.0)?
Can you reproduce with xf86-video-intel instead of "modesetting"? For performance parity enable SNA and DRI3 like described in intel(4x) manpage.
Can you reproduce with KDE, XFCE or non-DE like ctwm?
Can you reproduce a Wayland compositor? For example, see https://docs.freebsd.org/en/books/handbook/wayland/#wayland-wayfire 

Maybe bisect upstream Mesa commits. Start with a known good version, familarize with building outside of ports, apply patches from old versions of mesa-dri or mesa-devel then go git-bisect(1) route. Once the regressing commit is tracked down it should be easier to reason about what to do next (revert the commit, report upstream, debug drm-kmod, etc).
Comment 5 Jan Beich freebsd_committer freebsd_triage 2022-12-07 11:37:23 UTC
Oops, ignore the bisecting advice in comment 4. It's not going to help. mesa-*-21.3.8 used i965 by default on Gen < 8 (pre-Broadwell) unless MESA_LOADER_DRIVER_OVERRIDE=crocus i.e., crocus was probably always broken in your case.
Comment 6 Emmanuel Vadot freebsd_committer freebsd_triage 2022-12-07 12:34:23 UTC
I don't think that this is crocus related, the first error is :
libGL error: failed to authenticate magic 1

That X specific so wayland should work.
I'm not sure yet why this is not working though.
Comment 7 huanghwh 2022-12-09 00:44:19 UTC
(In reply to Jan Beich from comment #4)
> Can you reproduce after ports 855947ebf7e7 (mesa 22.3.0)?

after upgrade to mesa 22.3.0, got same problem

> Can you reproduce with xf86-video-intel instead of "modesetting"? For performance parity enable SNA and DRI3 like described in intel(4x) manpage.

I could not make xf86-video-intel works.

> Can you reproduce with KDE, XFCE or non-DE like ctwm?

I try XFCE and ctwm, works.

> Can you reproduce a Wayland compositor? For example, see https://docs.freebsd.org/en/books/handbook/wayland/#wayland-wayfire 

I try sway, works.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2022-12-09 09:29:53 UTC
Can you reproduce after applying bug 267899 ?
Can you reproduce without GDM? Try using startx + ~/.xinitrc method as described in https://docs.freebsd.org/en/books/handbook/x11/#x11-wm-gnome If gnome-session prints many errors try prepending "ck-launch-session dbus-run-session".

(In reply to huanghwh from comment #7)
> I could not make xf86-video-intel works.

Hmm, Gen7.5 (including 0x0D26) should be supported, and xf86-video-intel may actually fix GNOME. Can you show Xorg.log after failure?

> I try XFCE and ctwm, works.

Can you re-try ctwm with picom? That would test OpenGL-based compositing on X11. IIRC, GNOME uses WM (mutter) with builtin compositor.
Comment 9 huanghwh 2022-12-09 17:32:11 UTC
(In reply to Jan Beich from comment #8)
> Can you reproduce after applying bug 267899 ?
not work

> Can you reproduce without GDM? 
not work

> Can you re-try ctwm with picom? That would test OpenGL-based compositing on X11. IIRC, GNOME uses WM (mutter) with builtin compositor.

ctwm with picom works

if use mutter, mouse click any window with no response
Comment 10 Jan Beich freebsd_committer freebsd_triage 2022-12-09 18:32:22 UTC
Over to gnome@ for ideas.
Comment 11 Patricio Villar 2022-12-09 18:33:15 UTC
OS: FreeBSD 13.1-RELEASE-p5
HW: Intel(R) Core(TM) i7-10510U - CometLake-U GT2 [UHD Graphics]
WM: Openbox, X11
DM: SDDM
Mesa 22.3.0

Hi everyone, I observe a similar situation that is very likely related. 
When I change TTY to any other than vt9 and then go back to X11, I lose hardware acceleration.

If I run glxgears, it reports:
  libGL error: failed to authenticate magic 1
  libGL error: failed to load driver: iris

and CPU usage goes to the roof.

It's important to note that this doesn't happen when using drm-54-kmod. It only started happening when I updated to the new drm-510-kmod.

Also, GPU accel comes back if I logout and then login back again...

So hopefully this helps bring some light to see where the problem originates
Comment 12 Ting-Wei Lan 2022-12-18 16:27:31 UTC
I saw similar problems on FreeBSD 13.1-RELEASE-p5. The hardware is Intel i5-650.

For the DRM part, it is the VT switch problem. If I don't switch VT after Xorg is started, everything seems to be fine. However, if I switch to a different VT and switch back, apps using OpenGL show these messages and use llvmpipe.

libGL error: failed to authenticate magic 1
libGL error: failed to load driver: i965

This issue has been reported: https://github.com/freebsd/drm-kmod/issues/175. Downgrading to drm-54-kmod can fix the problem.

For the Mesa part, it is the modesetting driver problem. Mesa 21.3.8 works fine with the modesetting driver, but Mesa 22.3.0 can't run GNOME Shell with the modesetting driver. I can move the mouse and click things, but GNOME Shell won't update the screen unless I switch to a different VT and switch back.

Using xf86-video-intel instead of the modesetting driver can fix the GNOME Shell problem, but it seems to cause some apps to fail to update the screen. For example, PCManX sometimes fail to completely update the screen when scrolling with keyboard. I have to move the mouse or switch to a different window in order to see the updated screen.
Comment 13 huanghwh 2023-04-15 12:35:23 UTC
Test drm-515-kmod in CURRENT, same problem.
Comment 14 steveh 2024-01-08 18:10:55 UTC
Recreated on freebsd 14.0-RELEASE on a thinkpad X201 using intel integrated graphics.  Please see the following thread:- 

https://forums.freebsd.org/threads/intermittant-bug-in-14-0-release-dri-crocus-driver.91824/

To recreate the bug.

Boot machine, start X server, log into an X session.
Run xdriinfo in a terminal, note output correctly shows "Screen 0: crocus".

Do a VT switch to a different VT, then switch back to VT 9 (the X11 VT).

Repeat the xdriinfo test and note the following erroneous output:-

$ xdriinfo
libGL error: failed to authenticate magic 1
libGL error: failed to load driver: crocus
Screen 0: swrast
Comment 15 steveh 2024-01-08 18:33:33 UTC
The bug is also recreated by a suspend-resume cycle, since that involves a VT switch.
Comment 16 Jan Beich freebsd_committer freebsd_triage 2024-01-08 18:40:55 UTC
I wonder if https://github.com/freebsd/drm-kmod/pull/243 helps. It's part of graphics/drm-61-kmod.
Comment 17 steveh 2024-01-08 18:46:33 UTC
Just for interest, I tried the same test on ubuntu 20.04, I checked that Xorg.0.log shows that is using modesetting driver with crocus for DRI.  I couldn't recreate the bug, which suggests there is a fix somewhere.
Comment 18 steveh 2024-01-08 18:57:16 UTC
I tried running
pkg install graphics/drm-610-kmod
on this system, however I get a message saying that package is not found in the repositories.  This system is on 14.0-RELEASE.
Comment 19 steveh 2024-01-08 19:04:29 UTC
I have some time available and am happy to volunteer some test effort if someone wants to send me some patched drivers to try out.
Comment 20 Emmanuel Vadot freebsd_committer freebsd_triage 2024-01-08 19:29:47 UTC
(In reply to steveh from comment #14)
It's not a mesa problem, it's due to a rewriting of the vt intergration, and the last rewrite didn't fixed it.
SO yeah that's something that someone (tm) should work on but since I don't have the problem with wayland on suspend/resume and I never switch VT I don't have the motivation right now.
Comment 21 steveh 2024-01-08 19:37:30 UTC
Haha fair enough.  Shame though since a lot of people are still using X11 and VT's.
Comment 22 steveh 2024-01-09 11:01:19 UTC
For anyone else reading this, in a nutshell, the bug is that switching to another VT once the gui is running kills GPU hardware acceleration and forces the system to fall back to an unaccelerated software driver. In my testing I found this has various consequences depending on what program is being run; I found it is pathological for watching a video fullscreen with mpv, in which case you are locked out of the desktop until the video ends with no way to recover; that was the most severe adverse consequence I have seen so far; of course my testing is not exhaustive.

The bug also happens on suspend-resume, at least on my machine. I found after a resume, restarting the X server by logging out and back in was enough to get hardware accel working again. Whereas following a manual VT switch, the only reliable way to get accel working was a full reboot. But maybe I just got lucky with the suspend-resume case.
Comment 23 steveh 2024-01-10 08:53:18 UTC
Following discussion on the user forum, a workaround has been found for the suspend-resume case for X11.  Setting sysctl kern.vt_suspendswitch=0 prevents the VT switch on suspend-resume and hence prevents the bug from occurring in the suspend-resume case.  The problem still occurs after doing any manual VT switch while the x display is running.
Comment 24 steveh 2024-01-10 10:02:18 UTC
(In reply to Emmanuel Vadot from comment #20)
Hi Emmanuel, just for interest, is  kern.vt.suspendswitch set to 0 when Wayland is used?  Is that the reason you don't see the loss of hardware acceleeration on a suspend-resume cycle when using wayland, rather than wayland itself?  Cheers
Comment 25 Emmanuel Vadot freebsd_committer freebsd_triage 2024-01-10 11:37:14 UTC
(In reply to steveh from comment #24)

No this sysctl isn't changed by anything (at least with sway).
Comment 26 Jan Beich freebsd_committer freebsd_triage 2024-01-10 14:37:08 UTC
VT switch does NOT break GPU acceleration on Wayland: neither wayfire (wlroots) nor niri (smithay) nor xwayland-devel (DRI3) are affected. I use VT switch often e.g., test Wayland compositor updates, benchmark X11/Wayland clients under different Wayland compositors.

Also, Xorg performance even with GPU acceleration is very bad (but not as bad as llvmpipe) on my machine. See https://lists.freebsd.org/pipermail/freebsd-x11/2021-May/028125.html
Comment 27 Alexey Dokuchaev freebsd_committer freebsd_triage 2024-01-10 14:54:02 UTC
(In reply to steveh from comment #23)
> Setting sysctl kern.vt_suspendswitch=0 prevents the VT switch on
> suspend-resume and hence prevents the bug from occurring in the
> suspend-resume case.  The problem still occurs after doing any manual
> VT switch while the X display is running.
Note that this had been also reported as bug 271995 and was just confirmed with another user on @freebsd_ru group in Telegram.
Comment 28 steveh 2024-01-10 19:15:51 UTC
(In reply to Jan Beich from comment #26)
Good.  I've been testing the workaround for the suspend-resume case with X11 all afternoon and can confirm it solves the problem in that case reliably, at least on my machine!  So as far as I'm concerned the only remaining bug is a manual VT switch knocking out hardware acceleration when switching back to X.
Comment 29 steveh 2024-01-10 19:17:21 UTC
Good to hear the bug does not occur with Wayland.
Comment 30 steveh 2024-01-10 19:30:42 UTC
I have updated the user forum to state the problem does not occur with a wayland gui.
Comment 31 huanghwh 2024-03-12 11:13:09 UTC
after update to latest PKG, the problem is gone under X11:

% pkg info -x gdm
gdm-42.0_7
% pkg info -x mutter
mutter-42.4_3
% pkg info -x mesa
libosmesa-24.0.2
mesa-dri-24.0.2
mesa-libs-24.0.2
Comment 32 steveh 2024-03-23 22:55:49 UTC
Bug still occurs on my hardware (thinkpad X201) running 14.0-RELEASE-p5
(post freebsd-update fetch and install)

However, I note the following package version numbers:-
mesa-demos-8.4.0_3
mesa-dri-23.3.4
mesa-libs-23.3.4

Presumably the fix reported by huanghwh@gmail.com is in the development branch?
Comment 33 tom+fbsdbugzilla 2024-05-15 06:32:03 UTC
I am still having this issue on my computer
Hardware: Thinkpad T430
CPU: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (2594.18-MHz K8-class CPU)

% pkg info -x mesa
libosmesa-24.0.6
mesa-dri-24.0.6
mesa-gallium-va-24.0.6
mesa-gallium-vdpau-24.0.6

% cat /etc/os-release 
NAME=FreeBSD
VERSION="14.0-RELEASE-p6"
VERSION_ID="14.0"
ID=freebsd
ANSI_COLOR="0;31"
PRETTY_NAME="FreeBSD 14.0-RELEASE-p6"
CPE_NAME="cpe:/o:freebsd:freebsd:14.0"
HOME_URL="https://FreeBSD.org/"
BUG_REPORT_URL="https://bugs.FreeBSD.org/"

% dmesg
---<<BOOT>>---
Copyright (c) 1992-2023 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 14.0-RELEASE-p6 #0: Tue Mar 26 20:26:20 UTC 2024
    root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
VT(efifb): resolution 1600x900
CPU: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (2594.18-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x306a9  Family=0x6  Model=0x3a  Stepping=9
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7fbae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  Structured Extended Features=0x281<FSGSBASE,SMEP,ERMS>
  Structured Extended Features3=0x9c000400<MD_CLEAR,IBPB,STIBP,L1DFL,SSBD>
  XSAVE Features=0x1<XSAVEOPT>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 8589934592 (8192 MB)
avail memory = 7999488000 (7628 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <COREv4 COREBOOT>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-23
Launching APs: 1 3 2
Cuse v0.1.37 @ /dev/cuse
random: entropy device external interface
kbd1 at kbdmux0
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
smbios0: <System Management BIOS> at iomem 0x7fcfb000-0x7fcfb01e
smbios0: Version: 3.0, BCD Revision: 3.3
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS>                                                                                                                      
acpi0: <COREv4 COREBOOT>                                                                                                                                               
acpi0: Power Button (fixed)                                                                                                                                            
ACPI Error: No handler for Region [ERAM] (0xfffff8000196f900) [EmbeddedControl] (20221020/evregion-292)                                                                
ACPI Error: Region EmbeddedControl (ID=3) has no handler (20221020/exfldio-428)                                                                                        
ACPI Error: Aborting method \134_SB.PCI0.LPCB.EC.BAT0._STA due to previous error (AE_NOT_EXIST) (20221020/psparse-689)
ACPI Error: No handler for Region [ERAM] (0xfffff8000196f900) [EmbeddedControl] (20221020/evregion-292)
ACPI Error: Region EmbeddedControl (ID=3) has no handler (20221020/exfldio-428)
ACPI Error: Aborting method \134_SB.PCI0.LPCB.EC.BAT1._STA due to previous error (AE_NOT_EXIST) (20221020/psparse-689)
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 550
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
Event timer "HPET3" frequency 14318180 Hz quality 440
Event timer "HPET4" frequency 14318180 Hz quality 440
atrtc0: <AT realtime clock> port 0x70-0x77 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,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x508-0x50b on acpi0
acpi_ec0: <Embedded Controller: GPE 0x11> port 0x62,0x66 on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x1000-0x103f mem 0x8ec00000-0x8effffff,0x90000000-0x9fffffff at device 2.0 on pci0
vgapci0: Boot video device
xhci0: <Intel Panther Point USB 3.0 controller> mem 0x8f820000-0x8f82ffff at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
xhci0: Port routing mask set to 0xffffffff
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
em0: <Intel(R) 82579LM> port 0x1040-0x105f mem 0x8f800000-0x8f81ffff,0x8f834000-0x8f834fff at device 25.0 on pci0
em0: EEPROM V0.13-3
em0: Using 1024 TX descriptors and 1024 RX descriptors
em0: Using an MSI interrupt
em0: Ethernet address: 28:d2:44:07:78:3f
em0: netmap queues/slots: TX 1/1024, RX 1/1024
ehci0: <Intel Panther Point USB 2.0 controller> mem 0x8f836000-0x8f8363ff at device 26.0 on pci0
usbus1: EHCI version 1.0
usbus1 on ehci0
usbus1: 480Mbps High Speed USB v2.0
hdac0: <Intel Panther Point HDA Controller> mem 0x8f830000-0x8f833fff at device 27.0 on pci0
pcib1: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1: <unknown> at device 0.0 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 28.1 on pci0
pci2: <ACPI PCI bus> on pcib2
ath0: <Atheros AR9485> mem 0x8eb00000-0x8eb7ffff at device 0.0 on pci2
ar9300_flash_map: unimplemented for now
Restoring Cal data from DRAM
Restoring Cal data from EEPROM
Restoring Cal data from Flash
Restoring Cal data from Flash
Restoring Cal data from OTP
ar9300_hw_attach: ar9300_eeprom_attach returned 0
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 RX streams; 1 TX streams
ath0: AR9485 mac 576.1 RF5110 phy 0.0
ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0000
pcib3: <ACPI PCI-PCI bridge> at device 28.2 on pci0
ehci1: <Intel Panther Point USB 2.0 controller> mem 0x8f837000-0x8f8373ff at device 29.0 on pci0
usbus2: EHCI version 1.0
usbus2 on ehci1
usbus2: 480Mbps High Speed USB v2.0
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
ahci0: <Intel Panther Point AHCI SATA controller> port 0x1080-0x1087,0x1090-0x1093,0x1088-0x108f,0x1094-0x1097,0x1060-0x107f mem 0x8f835000-0x8f8357ff at device 31.2 on pci0
ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich4: <AHCI channel> at channel 4 on ahci0
cpu0: <ACPI CPU> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz1: <Thermal Zone> 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]
WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 15.0.
psm0: model Synaptics Touchpad, device ID 0
acpi_acad0: <AC Adapter> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
battery1: <ACPI Control Method Battery> on acpi0
acpi_button0: <Sleep Button> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_ibm0: <ThinkPad ACPI Extras> on acpi0
acpi_ibm0: Firmware version is 0x100
est0: <Enhanced SpeedStep Frequency Control> on cpu0
Timecounter "TSC-low" frequency 1297053702 Hz quality 1000
Timecounters tick every 1.000 msec
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC269 (Analog)> at nid 20 and 24 on hdaa0
pcm1: <Realtek ALC269 (Analog)> at nid 21 and 18 on hdaa0
hdacc1: <Intel Panther Point HDA CODEC> at cad 3 on hdac0
hdaa1: <Intel Panther Point Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel Panther Point (HDMI/DP 8ch)> at nid 5 on hdaa1
pcm3: <Intel Panther Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm4: <Intel Panther Point (HDMI/DP 8ch)> at nid 7 on hdaa1
ugen2.1: <Intel EHCI root HUB> at usbus2
ugen1.1: <Intel EHCI root HUB> at usbus1
uhub0 on usbus2
uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ugen0.1: <Intel XHCI root HUB> at usbus0
Trying to mount root from zfs:zroot/ROOT/default []...
uhub2 on usbus0
uhub2: <Intel XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
uhub1 on usbus1
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <Samsung SSD 850 EVO 500GB EMT02B6Q> ACS-2 ATA SATA 3.x device
ada0: Serial Number S2RANB0HA32445Z
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 476940MB (976773168 512 byte sectors)
ada0: quirks=0x3<4K,NCQ_TRIM_BROKEN>
cd0 at ahcich1 bus 0 scbus1 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GT80N LT21> Removable CD-ROM SCSI device
cd0: Serial Number M8121154216
cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
GEOM_ELI: Device ada0p3.eli created.
GEOM_ELI: Encryption: AES-XTS 256
GEOM_ELI:     Crypto: accelerated software
uhub2: 8 ports with 8 removable, self powered
uhub1: 3 ports with 3 removable, self powered
uhub0: 3 ports with 3 removable, self powered
Root mount waiting for: usbus1 usbus2
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1
uhub3 on uhub1
uhub3: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus1
ugen2.2: <vendor 0x8087 product 0x0024> at usbus2
uhub4 on uhub0
uhub4: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus2
Root mount waiting for: usbus1 usbus2
uhub3: 6 ports with 6 removable, self powered
uhub4: 8 ports with 8 removable, self powered
ugen1.3: <Lenovo Integrated Smart Card Reader> at usbus1
Root mount waiting for: usbus1 usbus2
ugen2.3: <Sierra Wireless, Incorporated MC7700> at usbus2
ugen1.4: <Broadcom Corp BCM20702A0> at usbus1
ugen1.5: <Atheros Communications Bluetooth USB Host Controller> at usbus1
acpi_ibm0: invalid event code: \134
GEOM_ELI: Device ada0p2.eli created.
GEOM_ELI: Encryption: AES-XTS 128
GEOM_ELI:     Crypto: accelerated software
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
[drm] Got stolen memory base rx80a00000, size 0xe000000
lkpi_iic0: <LinuxKPI I2C> on drmn0
iicbus0: <Philips I2C bus> on lkpi_iic0
iic0: <I2C generic I/O> on iicbus0
lkpi_iic1: <LinuxKPI I2C> on drmn0
iicbus1: <Philips I2C bus> on lkpi_iic1
iic1: <I2C generic I/O> on iicbus1
lkpi_iic2: <LinuxKPI I2C> on drmn0
iicbus2: <Philips I2C bus> on lkpi_iic2
iic2: <I2C generic I/O> on iicbus2
lkpi_iic3: <LinuxKPI I2C> on drmn0
iicbus3: <Philips I2C bus> on lkpi_iic3
iic3: <I2C generic I/O> on iicbus3
lkpi_iic4: <LinuxKPI I2C> on drmn0
iicbus4: <Philips I2C bus> on lkpi_iic4
iic4: <I2C generic I/O> on iicbus4
lkpi_iic5: <LinuxKPI I2C> on drmn0
iicbus5: <Philips I2C bus> on lkpi_iic5
iic5: <I2C generic I/O> on iicbus5
lkpi_iic6: <LinuxKPI I2C> on drmn0
iicbus6: <Philips I2C bus> on lkpi_iic6
iic6: <I2C generic I/O> on iicbus6
iic6: detached
iicbus6: detached
lkpi_iic6: detached
sysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!
lkpi_iic6: <LinuxKPI I2C> on drm4
iicbus6: <Philips I2C bus> on lkpi_iic6
iic6: <I2C generic I/O> on iicbus6
lkpi_iic7: <LinuxKPI I2C> on drm7
iicbus7: <Philips I2C bus> on lkpi_iic7
iic7: <I2C generic I/O> on iicbus7
lkpi_iic8: <LinuxKPI I2C> on drm8
iicbus8: <Philips I2C bus> on lkpi_iic8
iic8: <I2C generic I/O> on iicbus8
[drm] Initialized i915 1.6.0 20201103 for drmn0 on minor 0
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=900 width=1600 depth=32
pbase=0x90000000 vbase=0xfffff80090000000
name=drmn0 flags=0x0 stride=6400 bpp=32
end FB_INFO
ichsmb0: <Intel Panther Point SMBus controller> port 0x400-0x41f mem 0x8f838000-0x8f8380ff at device 31.3 on pci0
smbus0: <System Management Bus> on ichsmb0
rtsx0: <2.1g Realtek RTS5229 PCIe SD Card Reader> mem 0x8ea00000-0x8ea00fff at device 0.0 on pci1
rtsx0: A card is detected
mmc0: <MMC/SD bus> on rtsx0
mmcsd0: 32GB <SDHC GB1QT 3.0 SN BC2E61D1 MFG 12/2017 by 27 SM> at mmc0 50.0MHz/4bit/2048-block
wlan0: Ethernet address: 08:3e:8e:b8:f5:c5
lo0: link state changed to UP
wlan0: link state changed to UP
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 4 ts_status 0x0
ubt0 on uhub3
ubt0: <Broadcom Corp BCM20702A0, rev 2.00/1.12, addr 4> on usbus1
Security policy loaded: MAC/ntpd (mac_ntpd)
acpi_ibm0: invalid event code: \134
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 3 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 2 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 3 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 3 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0
ath0: ath_rate_tx_complete: ts_rate=27 ts_finaltsi=0, final_rix=0
ath0: bad series0 hwrate 0x1b, tries 1 ts_status 0x0


I noticed when it boots up it's working but when you switch to a VT and switch back it's broken. The xdriinfo tool can be used to tell if it's broken or not:


% xdriinfo 
Screen 0: crocus
% xdriinfo
failed to authenticate magic 1
failed to load driver: crocus
Screen 0: swrast
% xdriinfo
failed to authenticate magic 1
failed to load driver: crocus
Screen 0: swrast


(In reply to Ting-Wei Lan from comment #12)
>This issue has been reported: https://github.com/freebsd/drm-kmod/issues/175. >Downgrading to drm-54-kmod can fix the problem.


How do I rollback to drm-54-kmod on FreeBSD 14? The only versions I see available in the repository are:
drm-510-kmod-5.10.163_9        DRM drivers modules
drm-515-kmod-5.15.118_4        DRM drivers modules
Comment 34 tom+fbsdbugzilla 2024-05-15 06:39:28 UTC
after installing mesa-devel the issue persists, but the error message provided by xdriifo changes:

% pkg info -x mesa
libosmesa-24.0.6
mesa-devel-24.1.b.320
mesa-dri-24.0.6
mesa-gallium-va-24.0.6
mesa-gallium-vdpau-24.0.6
mesa-libs-24.0.6

% xdriinfo 
Screen 0: crocus
% xdriinfo
failed to authenticate magic 1
failed to load driver: crocus
MESA-LOADER: failed to open swrast: Cannot open "/usr/local/lib/dri-devel/swrast_dri.so" (search paths /usr/local/lib/dri-devel, suffix _dri)
Screen 0: not direct rendering capable.
Comment 35 tom+fbsdbugzilla 2024-05-15 06:40:12 UTC
I'm not using gnome I'm using a patched version of DWM from suckless.org