How to get hardware acceleration?

Hi, I am having some problem getting hardware acceleration to work with my Intel i945GM graphics card and FreeBSD 10.0. Using glxinfo, I can see it says
Code:
direct rendering: Yes
but it also says
Code:
OpenGL renderer string: Software Rasterizer
and running glxgears -info, it shows
Code:
GL_RENDERER   = Software Rasterizer
too. Some of the 3D demos run very slow, and even watching a normal video uses a lot of CPU.

Anyone have any idea of what is going on here?
 
Code:
$  pkg info -ix xf86-video xorg-server
xf86-video-ati-6.14.6_3
xf86-video-intel-2.7.1_8
xf86-video-mach64-6.9.4_3
xf86-video-nv-2.1.20_4
xf86-video-openchrome-0.3.3_3
xf86-video-r128-6.9.2_3
xf86-video-vesa-2.3.3_3
xorg-server-1.7.7_13,1
 
Read through /var/log/Xorg.0.log and look at the lines where it loads drivers and selects the driver. What's listed there? Is it actually using the correct driver for the i945?
 
It looks like it. Here's the relevant part of the file:
Code:
(==) ServerLayout "X.org Configured"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(==) Automatically adding devices
(==) Automatically enabling devices
(**) FontPath set to:
	/usr/local/lib/X11/fonts/misc/,
	/usr/local/lib/X11/fonts/TTF/,
	/usr/local/lib/X11/fonts/OTF,
	/usr/local/lib/X11/fonts/Type1/,
	/usr/local/lib/X11/fonts/100dpi/,
	/usr/local/lib/X11/fonts/75dpi/,
	/usr/local/lib/X11/fonts/misc/,
	/usr/local/lib/X11/fonts/TTF/,
	/usr/local/lib/X11/fonts/OTF,
	/usr/local/lib/X11/fonts/Type1/,
	/usr/local/lib/X11/fonts/100dpi/,
	/usr/local/lib/X11/fonts/75dpi/
(**) ModulePath set to "/usr/local/lib/xorg/modules"
(WW) AllowEmptyInput is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
(WW) Disabling Mouse0
(WW) Disabling Keyboard0
(II) Loader magic: 0x81e635c
(II) Module ABI versions:
	X.Org ANSI C Emulation: 0.4
	X.Org Video Driver: 6.0
	X.Org XInput driver : 7.0
	X.Org Server Extension : 2.0
(--) Using syscons driver with X support (version 2.0)
(--) using VT number 9

(--) PCI:*(0:0:2:0) 8086:27a2:1179:ff03 Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller rev 3, Mem @ 0xdc100000/524288, 0xc0000000/268435456, 0xdc200000/262144, I/O @ 0x00001800/8, BIOS @ 0x????????/65536
(--) PCI: (0:0:2:1) 8086:27a6:1179:ff03 Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller rev 3, Mem @ 0xdc180000/524288
(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
(II) "record" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
(II) LoadModule: "dbe"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "dri"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.1.0
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "extmod"
(II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "record"
(II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.13.0
	Module class: X.Org Server Extension
	ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org Server Extension, version 2.0
(==) AIGLX disabled
(II) Loading extension GLX
(II) LoadModule: "intel"
(II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
(II) Module intel: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 2.7.1
	Module class: X.Org Video Driver
	ABI class: X.Org Video Driver, version 6.0
(II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
	i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G,
	E7221 (i915), 915GM, 945G, 945GM, 945GME, IGD_GM, IGD_G, 965G, G35,
	965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
	Mobile Intel® GM45 Express Chipset,
	Intel Integrated Graphics Device, G45/G43, Q45/Q43, G41
(II) Primary Device is: PCI 00@00:02:0
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(II) Loading sub module "vgahw"
(II) LoadModule: "vgahw"
(II) Loading /usr/local/lib/xorg/modules/libvgahw.so
(II) Module vgahw: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 0.1.0
	ABI class: X.Org Video Driver, version 6.0
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(==) intel(0): Depth 24, (--) framebuffer bpp 32
(==) intel(0): RGB weight 888
(==) intel(0): Default visual is TrueColor
(II) intel(0): Integrated Graphics Chipset: Intel(R) 945GM
(--) intel(0): Chipset: "945GM"
(--) intel(0): Linear framebuffer at 0xC0000000
(--) intel(0): IO registers at addr 0xDC100000
(==) intel(0): Using EXA for acceleration
(II) intel(0): 2 display pipes available.
(II) Loading sub module "ddc"
(II) LoadModule: "ddc"
(II) Module "ddc" already built-in
(II) Loading sub module "i2c"
(II) LoadModule: "i2c"
(II) Module "i2c" already built-in
(II) intel(0): Output VGA using monitor section Monitor0
(II) intel(0): Output LVDS has no monitor section
(II) intel(0): I2C bus "LVDSDDC_C" initialized.
(II) intel(0): Attempting to determine panel fixed mode.
(II) intel(0): I2C device "LVDSDDC_C:ddc2" registered at address 0xA0.
(II) intel(0): I2C device "LVDSDDC_C:E-EDID segment register" registered at address 0x60.
(II) intel(0): EDID vendor "SEC", prod id 13875
(II) intel(0): Output TV has no monitor section
(==) intel(0): Write-combining range (0xa0000,0x10000) was already clear
(II) intel(0): Resizable framebuffer: not available (1 3)
(II) intel(0): EDID vendor "SEC", prod id 13875
(II) intel(0): Output VGA disconnected
(II) intel(0): Output LVDS connected
(II) intel(0): Output TV disconnected
(II) intel(0): Using exact sizes for initial modes
(II) intel(0): Output LVDS using initial mode 1280x800
(II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
(==) intel(0): Write-combining range (0xa0000,0x10000) was already clear
(II) intel(0): detected 256 kB GTT.
(II) intel(0): detected 7932 kB stolen memory.
(==) intel(0): video overlay key set to 0x101fe
(==) intel(0): DPI set to (96, 96)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/local/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "exa"
(II) LoadModule: "exa"
(II) Loading /usr/local/lib/xorg/modules/libexa.so
(II) Module exa: vendor="X.Org Foundation"
	compiled for 1.7.7, module version = 2.5.0
	ABI class: X.Org Video Driver, version 6.0
(II) intel(0): Comparing regs from server start up to After PreInit
(WW) intel(0): Register 0x61200 (PP_STATUS) changed from 0xc0000008 to 0xd0000009
(WW) intel(0): PP_STATUS before: on, ready, sequencing idle
(WW) intel(0): PP_STATUS after: on, ready, sequencing on
(WW) intel(0): Register 0x71024 (PIPEBSTAT) changed from 0x80000202 to 0x80000242
(WW) intel(0): PIPEBSTAT before: status: FIFO_UNDERRUN VSYNC_INT_STATUS VBLANK_INT_STATUS
(WW) intel(0): PIPEBSTAT after: status: FIFO_UNDERRUN VSYNC_INT_STATUS LBLC_EVENT_STATUS VBLANK_INT_STATUS
(WW) intel(0): Register 0x68000 (TV_CTL) changed from 0x10000000 to 0x000c0000
(WW) intel(0): Register 0x68010 (TV_CSC_Y) changed from 0x00000000 to 0x0332012d
(WW) intel(0): Register 0x68014 (TV_CSC_Y2) changed from 0x00000000 to 0x07d30104
(WW) intel(0): Register 0x68018 (TV_CSC_U) changed from 0x00000000 to 0x0733052d
(WW) intel(0): Register 0x6801c (TV_CSC_U2) changed from 0x00000000 to 0x05c70200
(WW) intel(0): Register 0x68020 (TV_CSC_V) changed from 0x00000000 to 0x0340030c
(WW) intel(0): Register 0x68024 (TV_CSC_V2) changed from 0x00000000 to 0x06d00200
(WW) intel(0): Register 0x6802c (TV_CLR_LEVEL) changed from 0x00000000 to 0x010b00e1
(WW) intel(0): Register 0x68030 (TV_H_CTL_1) changed from 0x00000000 to 0x00400359
(WW) intel(0): Register 0x68034 (TV_H_CTL_2) changed from 0x00000000 to 0x80480022
(WW) intel(0): Register 0x68038 (TV_H_CTL_3) changed from 0x00000000 to 0x007c0344
(WW) intel(0): Register 0x6803c (TV_V_CTL_1) changed from 0x00000000 to 0x00f01415
(WW) intel(0): Register 0x68040 (TV_V_CTL_2) changed from 0x00000000 to 0x00060607
(WW) intel(0): Register 0x68044 (TV_V_CTL_3) changed from 0x00000000 to 0x80120001
(WW) intel(0): Register 0x68048 (TV_V_CTL_4) changed from 0x00000000 to 0x000900f0
(WW) intel(0): Register 0x6804c (TV_V_CTL_5) changed from 0x00000000 to 0x000a00f0
(WW) intel(0): Register 0x68050 (TV_V_CTL_6) changed from 0x00000000 to 0x000900f0
(WW) intel(0): Register 0x68054 (TV_V_CTL_7) changed from 0x00000000 to 0x000a00f0
(WW) intel(0): Register 0x68060 (TV_SC_CTL_1) changed from 0x00000000 to 0xc1710087
(WW) intel(0): Register 0x68064 (TV_SC_CTL_2) changed from 0x00000000 to 0x6b405140
(WW) intel(0): Register 0x68070 (TV_WIN_POS) changed from 0x00000000 to 0x00360024
(WW) intel(0): Register 0x68074 (TV_WIN_SIZE) changed from 0x00000000 to 0x02640198
(WW) intel(0): Register 0x68080 (TV_FILTER_CTL_1) changed from 0x00000000 to 0x800010bb
(WW) intel(0): Register 0x68084 (TV_FILTER_CTL_2) changed from 0x00000000 to 0x00028283
(WW) intel(0): Register 0x68088 (TV_FILTER_CTL_3) changed from 0x00000000 to 0x00014141
(WW) intel(0): Register 0x68100 (TV_H_LUMA_0) changed from 0x00000000 to 0xb1403000
(WW) intel(0): Register 0x681ec (TV_H_LUMA_59) changed from 0x00000000 to 0x0000b060
(WW) intel(0): Register 0x68200 (TV_H_CHROMA_0) changed from 0x00000000 to 0xb1403000
(WW) intel(0): Register 0x682ec (TV_H_CHROMA_59) changed from 0x00000000 to 0x0000b060
(==) Depth 24 pixmap format is 32 bpp
(II) intel(0): Kernel reported 491520 total, 0 used
(II) intel(0): I830CheckAvailableMemory: 1966080 kB available
(WW) intel(0): DRI2 requires UXA
drmOpenDevice: node name is /dev/dri/card0
Failed to change owner or group for file /dev/dri! 2: No such file or directory
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
Failed to change owner or group for file /dev/dri! 2: No such file or directory
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 11, (OK)
drmOpenByBusid: drmOpenMinor returns 11
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
(II) [drm] loaded kernel module for "i915" driver.
(II) [drm] DRM interface version 1.2
(II) [drm] DRM open master succeeded.
(II) intel(0): [drm] Using the DRM lock SAREA also for drawables.
(II) intel(0): [drm] framebuffer mapped by ddx driver
(II) intel(0): [drm] added 1 reserved context for kernel
(II) intel(0): X context handle = 0x1
(II) intel(0): [drm] installed DRM signal handler
(**) intel(0): Framebuffer compression enabled
(**) intel(0): Tiling enabled
(==) intel(0): VideoRam: 262144 KB
(II) intel(0): Attempting memory allocation with tiled buffers.
(II) intel(0): Tiled allocation successful.
(II) intel(0): [drm] Registers = 0x10000000
(II) intel(0): [drm] ring buffer = 0x30000000
(II) intel(0): [drm] mapped front buffer at 0xc1000000, handle = 0x40000000
(II) intel(0): [drm] mapped back buffer at 0xc4000000, handle = 0x50000000
(II) intel(0): [drm] mapped depth buffer at 0xc5000000, handle = 0x60000000
(II) intel(0): [drm] mapped classic textures at 0xc6000000, handle = 0x70000000
(II) intel(0): [drm] Initialized kernel agp heap manager, 33554432
(II) intel(0): [dri] visual configs initialized
(II) intel(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(==) intel(0): Write-combining range (0xa0000,0x10000) was already clear
(II) EXA(0): Offscreen pixmap area of 31457280 bytes
(II) EXA(0): Driver registered support for the following operations:
(II)         Solid
(II)         Copy
(II)         Composite (RENDER acceleration)
(==) intel(0): Backing store disabled
(==) intel(0): Silken mouse enabled
(II) intel(0): Initializing HW Cursor
(II) intel(0): [DRI] installation complete
(WW) intel(0): drmDropMaster failed: Unknown error: -1
(II) intel(0): xf86BindGARTMemory: bind key 1 at 0x007bf000 (pgoffset 1983)
(II) intel(0): xf86BindGARTMemory: bind key 2 at 0x00e2b000 (pgoffset 3627)
(II) intel(0): xf86BindGARTMemory: bind key 3 at 0x01000000 (pgoffset 4096)
(II) intel(0): xf86BindGARTMemory: bind key 4 at 0x02000000 (pgoffset 8192)
(II) intel(0): xf86BindGARTMemory: bind key 5 at 0x04000000 (pgoffset 16384)
(II) intel(0): xf86BindGARTMemory: bind key 6 at 0x05000000 (pgoffset 20480)
(II) intel(0): xf86BindGARTMemory: bind key 7 at 0x06000000 (pgoffset 24576)
(II) intel(0): Fixed memory allocation layout:
(II) intel(0): 0x00000000-0x0001ffff: ring buffer (128 kB)
(II) intel(0): 0x00020000-0x0061ffff: compressed frame buffer (6144 kB, 0x000000005f820000 physical
)
(II) intel(0): 0x00620000-0x00620fff: compressed ll buffer (4 kB, 0x000000005fe20000 physical
)
(II) intel(0): 0x00621000-0x0062afff: HW cursors (40 kB, 0x000000005fe21000 physical
)
(II) intel(0): 0x0062b000-0x00e2afff: fake bufmgr (8192 kB)
(II) intel(0): 0x007bf000:            end of stolen memory
(II) intel(0): 0x00e2b000-0x00e2bfff: overlay registers (4 kB, 0x000000000ad48000 physical
)
(II) intel(0): 0x01000000-0x01ffffff: front buffer (16384 kB) X tiled
(II) intel(0): 0x02000000-0x03dfffff: exa offscreen (30720 kB)
(II) intel(0): 0x04000000-0x04ffffff: back buffer (16384 kB) X tiled
(II) intel(0): 0x05000000-0x05ffffff: depth buffer (16384 kB) X tiled
(II) intel(0): 0x06000000-0x07ffffff: classic textures (32768 kB)
(II) intel(0): 0x10000000:            end of aperture
(II) intel(0): Selecting standard 18 bit TMDS pixel format.
(II) intel(0): Output configuration:
(II) intel(0):   Pipe A is off
(II) intel(0):   Display plane A is now disabled and connected to pipe A.
(II) intel(0):   Pipe B is on
(II) intel(0):   Display plane B is now enabled and connected to pipe B.
(II) intel(0):   Output VGA is connected to pipe none
(II) intel(0):   Output LVDS is connected to pipe B
(II) intel(0):   Output TV is connected to pipe none
(II) intel(0): [drm] dma control initialized, using IRQ 16
(II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
(==) intel(0): DPMS enabled
(==) intel(0): Intel XvMC decoder disabled
(II) intel(0): Set up textured video
(II) intel(0): Set up overlay video
(II) intel(0): direct rendering: XF86DRI Enabled
(--) RandR disabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) AIGLX: Loaded and initialized /usr/local/lib/dri/swrast_dri.so
(II) GLX: Initialized DRISWRAST GL provider for screen 0
(II) intel(0): Setting screen physical size to 338 x 211
I don't really know what all of this means.

I am also having a problem with xeyes crashing X, unless I run it as xeyes +render. Not that I actually need xeyes, but it might be part of the same problem.
 
wblock@ said:
These are the old versions of xorg. To get the new one, you will have to update the ports tree and build from ports. See https://wiki.freebsd.org/Graphics#Installing_KMS_Ports.
We can also use the temporary WITH_NEW_XORG repositories instead of ports, isn't it? I somehow managed to transition from WITH_NEW_XORG ports to packages without major issues but I think that ports are no more strictly necessary for this purpose. *On the other hand, the fact that the above Wiki page has not been updated makes me doubt...* :q

* Edit: The Graphics Wiki page has just been updated.
 
pkg info -ix xf86-video xorg-server

glxgears -info


Output from glxgears -info did not help me to tell whether I have hardware acceleration.

glxinfo

This – not in the wiki – was more user-friendly. Thank you!

It appears that I have hardware acceleration without membership of the video group. (I'm an operator.)

Code:
% sh
$ env vblank_mode=0 glxgears -info
ATTENTION: default value of option vblank_mode overridden by environment.
GL_RENDERER   = AMD TURKS (DRM 2.50.0 / 14.0-CURRENT, LLVM 12.0.1)
GL_VERSION    = 3.1 Mesa 21.1.5
GL_VENDOR     = X.Org
GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_fragment_shader GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_depth_clamp GL_NV_fog_distance GL_NV_half_float GL_APPLE_packed_pixels GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_ATI_texture_compression_3dc GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_ATI_texture_mirror_once GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_texture_array GL_EXT_texture_compression_latc GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_AMD_performance_monitor GL_EXT_texture_buffer_object GL_AMD_texture_texture4 GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_buffer_object GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_conservative_depth GL_AMD_depth_clamp_separate GL_AMD_draw_buffers_blend GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_stencil_export GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_compatibility GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_stencil_export GL_ARB_shader_texture_lod GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_multisample GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_ATI_meminfo GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_NV_copy_image GL_NV_texture_barrier GL_ARB_draw_indirect GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_texture_compression_bptc GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_viewport_array GL_EXT_direct_state_access GL_AMD_multi_draw_indirect GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_base_instance GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_internalformat_query GL_ARB_map_buffer_alignment GL_ARB_shader_atomic_counters GL_ARB_shader_image_load_store GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_texture_storage GL_ARB_transform_feedback_instanced GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_transform_feedback GL_AMD_query_buffer_object GL_AMD_shader_trinary_minmax GL_ARB_ES3_compatibility GL_ARB_arrays_of_arrays GL_ARB_clear_buffer_object GL_ARB_compute_shader GL_ARB_copy_image GL_ARB_explicit_uniform_location GL_ARB_fragment_layer_viewport GL_ARB_framebuffer_no_attachments GL_ARB_invalidate_subdata GL_ARB_multi_draw_indirect GL_ARB_program_interface_query GL_ARB_robust_buffer_access_behavior GL_ARB_shader_image_size GL_ARB_shader_storage_buffer_object GL_ARB_stencil_texturing GL_ARB_texture_buffer_range GL_ARB_texture_query_levels GL_ARB_texture_storage_multisample GL_ARB_texture_view GL_ARB_vertex_attrib_binding GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_AMD_pinned_memory GL_ARB_buffer_storage GL_ARB_clear_texture GL_ARB_enhanced_layouts GL_ARB_internalformat_query2 GL_ARB_multi_bind GL_ARB_query_buffer_object GL_ARB_seamless_cubemap_per_texture GL_ARB_shading_language_include GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_stencil8 GL_ARB_vertex_type_10f_11f_11f_rev GL_EXT_shader_integer_mix GL_NVX_gpu_memory_info GL_ARB_clip_control GL_ARB_conditional_render_inverted GL_ARB_cull_distance GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_get_texture_sub_image GL_ARB_pipeline_statistics_query GL_ARB_shader_texture_image_samples GL_ARB_texture_barrier GL_EXT_polygon_offset_clamp GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_ARB_parallel_shader_compile GL_ARB_shader_atomic_counter_ops GL_ARB_shader_clock GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_MESA_shader_integer_functions GL_ARB_polygon_offset_clamp GL_ARB_texture_filter_anisotropic GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_EXT_EGL_sync
VisualID 1305, 0x519
39358 frames in 5.0 seconds = 7871.570 FPS
40655 frames in 5.0 seconds = 8130.964 FPS
40672 frames in 5.0 seconds = 8134.284 FPS
40977 frames in 5.0 seconds = 8195.311 FPS
40450 frames in 5.0 seconds = 8089.964 FPS
X connection to :0 broken (explicit kill or server shutdown).
$ exit
% uname -KU
1400033 1400033
% freebsd-version -kru
14.0-CURRENT
14.0-CURRENT
14.0-CURRENT
% pkg info -ix xf86-video xorg-server
xf86-video-ati-19.1.0_4,1
xf86-video-scfb-0.0.5_2
xf86-video-vesa-2.5.0
xorg-server-1.20.11_3,1
% grep grahamperrin /etc/group | sort
grahamperrin:*:1002:
operator:*:5:root,grahamperrin,bbsadmin-l
vboxusers:*:920:grahamperrin,bbsadmin-l
webcamd:*:145:grahamperrin
%
% glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: X.Org (0x1002)
    Device: AMD TURKS (DRM 2.50.0 / 14.0-CURRENT, LLVM 12.0.1) (0x6841)
    Version: 21.1.5
    Accelerated: yes
    Video memory: 1024MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 1023 MB, largest block: 1023 MB
    VBO free aux. memory - total: 1021 MB, largest block: 1021 MB
    Texture free memory - total: 1023 MB, largest block: 1023 MB
    Texture free aux. memory - total: 1021 MB, largest block: 1021 MB
    Renderbuffer free memory - total: 1023 MB, largest block: 1023 MB
    Renderbuffer free aux. memory - total: 1021 MB, largest block: 1021 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 1024 MB
    Total available memory: 2045 MB
    Currently available dedicated video memory: 1023 MB
OpenGL vendor string: X.Org
OpenGL renderer string: AMD TURKS (DRM 2.50.0 / 14.0-CURRENT, LLVM 12.0.1)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.1.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.1.5
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.1.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

%

… a problem to look at the maps on this site: https://www.dxmaps.com/spots/mapg.php?Lan=E

It says my browser doesn't have WebGL enabled. …

… Since I added my user to the video group I can see the map …

holala is this how the map should appear (to a not logged in user)?

1633069966781.png
 
Thanks to eternal_noob for reminding me of this topic.

… It appears that I have hardware acceleration without membership of the video group. (I'm an operator.) …

For test purposes, taking things further, after removing myself from all groups except grahamperrin then logging in, I do have direct rendering below.

Does this contradict what's currently in the FreeBSD Handbook? From <https://docs.freebsd.org/en/books/handbook/x11/#x-config-user-group>:

… Access to /dev/dri is needed to allow 3D acceleration on video cards. It is usually simplest to add the user who will be running X to either the video or wheel group. …

Code:
% glxinfo -B | grep direct
direct rendering: Yes
% whoami ; grep grahamperrin /etc/group
grahamperrin
grahamperrin:*:1002:
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #115 main-n250650-ef396441ceb: Sat Nov 13 23:52:09 GMT 2021     root@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64 1400041 1400041
% pkg info -x drm- gpu- | sort
drm-current-kmod-5.4.144.g20211012
drm-kmod-g20190710_1
gpu-firmware-kmod-g20210330
libdrm-2.4.107_1,1
linux-c7-libdrm-2.4.97
% kldstat
Id Refs Address                Size Name
 1  178 0xffffffff80200000  21340f8 kernel
 2    1 0xffffffff82335000     58a8 sysctlinfo.ko
 3    1 0xffffffff8233b000    1b610 geom_eli.ko
 4    1 0xffffffff82357000     bdb0 autofs.ko
 5    3 0xffffffff82363000    8a180 vboxdrv.ko
 6    1 0xffffffff823ee000     4de0 acpi_dock.ko
 7    1 0xffffffff823f3000     65f0 acpi_hp.ko
 8    2 0xffffffff823fa000     6da8 acpi_wmi.ko
 9    1 0xffffffff82401000     3258 sysctlbyname_improved.ko
10    1 0xffffffff82405000     b060 cuse.ko
11    1 0xffffffff82411000   5b96d8 zfs.ko
12    1 0xffffffff8388f000     3538 fdescfs.ko
13    1 0xffffffff83893000    11ea0 fusefs.ko
14    1 0xffffffff838a5000   150c80 radeonkms.ko
15    2 0xffffffff839f6000    7f548 drm.ko
16    3 0xffffffff83a76000     cbc8 linuxkpi_gplv2.ko
17    1 0xffffffff83a83000     2328 lindebugfs.ko
18    1 0xffffffff83a86000     f778 ttm.ko
19    1 0xffffffff83a96000     3258 radeon_TURKS_pfp_bin.ko
20    1 0xffffffff83a9a000     3658 radeon_TURKS_me_bin.ko
21    1 0xffffffff83a9e000     2cd8 radeon_BTC_rlc_bin.ko
22    1 0xffffffff83aa1000     7ef8 radeon_TURKS_mc_bin.ko
23    1 0xffffffff83aa9000     8138 radeon_TURKS_smc_bin.ko
24    1 0xffffffff83ab2000    341f0 radeon_SUMO_uvd_bin.ko
25    1 0xffffffff83ae7000    2dce8 linux.ko
26    4 0xffffffff83b15000     aea8 linux_common.ko
27    1 0xffffffff83b20000    29f48 linux64.ko
28    1 0xffffffff83b4a000     2260 pty.ko
29    1 0xffffffff83b4d000     639c linprocfs.ko
30    1 0xffffffff83b54000     3284 linsysfs.ko
31    1 0xffffffff83b58000     2220 cpuctl.ko
32    2 0xffffffff83b5b000     4240 vboxnetflt.ko
33    2 0xffffffff83b60000     aac8 netgraph.ko
34    1 0xffffffff83b6b000     31c8 ng_ether.ko
35    1 0xffffffff83b6f000     55e0 vboxnetadp.ko
36    1 0xffffffff83b75000     2280 uhid.ko
37    1 0xffffffff83b78000     3268 ums.ko
38    1 0xffffffff83b7c000     3320 usbhid.ko
39    1 0xffffffff83b80000     31f8 hidbus.ko
40    1 0xffffffff83b84000     c4d0 snd_uaudio.ko
41    1 0xffffffff83b91000     23a0 umodem.ko
42    1 0xffffffff83b94000     4d68 ucom.ko
43    1 0xffffffff83b99000     44a0 if_cdce.ko
44    1 0xffffffff83b9e000     3178 uether.ko
45    1 0xffffffff83ba2000     4708 nullfs.ko
46    1 0xffffffff83ba7000     2a08 mac_ntpd.ko
47    1 0xffffffff83baa000     2268 dtraceall.ko
48    9 0xffffffff83bad000     8a60 opensolaris.ko
49    9 0xffffffff83bb6000    3c290 dtrace.ko
50    1 0xffffffff83bf3000     2274 dtmalloc.ko
51    1 0xffffffff83bf6000     2cb8 dtnfscl.ko
52    1 0xffffffff83bf9000     3331 fbt.ko
53    1 0xffffffff83bfd000    55570 fasttrap.ko
54    1 0xffffffff83c53000     2258 sdt.ko
55    1 0xffffffff83c56000     91b4 systrace.ko
56    1 0xffffffff83c60000     91b4 systrace_freebsd32.ko
57    1 0xffffffff83c6a000     234c profile.ko
% pciconf -lv | grep -B 3 -A 2 display
vgapci0@pci0:1:0:0:     class=0x030000 rev=0x00 hdr=0x00 vendor=0x1002 device=0x6841 subvendor=0x103c subdevice=0x17a9
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Thames [Radeon HD 7550M/7570M/7650M]'
    class      = display
    subclass   = VGA
hdac0@pci0:1:0:1:       class=0x040300 rev=0x00 hdr=0x00 vendor=0x1002 device=0xaa90 subvendor=0x103c subdevice=0x17a9
%

As far as I can tell, the group requirement was first expressed more than five years ago; in the (2016-03-05) Handbook for FreeBSD 10.3-RELEASE:
 
What are the file permissions of /dev/dri?

From <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259048#c4>:

Code:
% ls -hl /dev/dri
total 0
lrwxr-xr-x  1 root  wheel     8B 20 Nov 16:47 card0 -> ../drm/0
lrwxr-xr-x  1 root  wheel    10B 20 Nov 16:47 renderD128 -> ../drm/128
% ls -hl /dev/drm/0
crw-rw----  1 root  video   0xb2 20 Nov 16:47 /dev/drm/0
% ls -hl /dev/drm/128
crw-rw----  1 root  video  0x153 20 Nov 16:47 /dev/drm/128
%



/etc/devfs.rules

Code:
[system=10]
add path 'usb/*' mode 0660 group operator
add path 'acd*' mode 0666
add path 'cd*' mode 0666
add path 'pass*' mode 0666
add path 'xpt*' mode 0666
 
Last edited:
For the DRI2/DRI3 question, I recall <https://cgit.freebsd.org/ports/tree/UPDATING?id=121ae90af1478922bd6e8e96a81f210a96806aa8#n8> (2020-03-08):

The mesa OpenGL library (graphics/mesa-libs) has been switched to use DRI3 by default, instead of the older DRI2 interface. This might cause regressions when using the legacy graphics drivers, either through graphics/drm-legacy-kmod or the graphics drivers in base.

If you experience issues when running OpenGL applications it is possible to force the use of DRI2 by setting the LIBGL_DRI3_DISABLE environment variable to 1 before starting any OpenGL application. The easiest way to do this is by adding it to either your shell startup files or .xinitrc.

<https://cgit.freebsd.org/ports/commit/?id=121ae90af1478922bd6e8e96a81f210a96806aa8>
 
Back
Top