Solved Various programs - libGL error: failed to open drm device

On various programs such as VLC and Virtualbox, when loading I will see this in the terminal ...

Code:
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965

Things i've tried to fix it ...
- Adding myself to video group
- chmod 777 /dev/dri/card0 --works, but is not permanent..?

In /etc/devfs.conf
Code:
perm    /dev/dri/card0      0666

I am in the wheel, operator and video group.
 
Recently installed the kde5 meta port like two days ago. It also did not include sddm which solved the login problems and the above fixed composting, which was not working either. The error was exactly as described above. THANKS
 
Change the mode of the /dev/dri/card0 using a devfs.rules(5)

Add this line in your /etc/devfs.rules
Code:
add path 'dri/*' mode 0666 group operator
Note that you must add the user to the operator group.

pw groupmod operator -m user
For some reason this doesn't work for me.
The user is in wheel, operator, video. The line is in devfs.rules (under [system=10]), added line to rc.conf defs_system_ruleset="system", but still I get
Code:
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: r600
when I start some video- (GL-) using programs like vlc. Where the error may be still?
 
Hi,

Does X load the appropriate driver? It doesn't seem to be the case here. Did you find any suspicious entries in /var/log/Xorg.0.log?
 
Hi,

Does X load the appropriate driver? It doesn't seem to be the case here. Did you find any suspicious entries in /var/log/Xorg.0.log?
It seems that it does. Nothing suspicious for me in Xorg.0.log. Under root user no complaints in ffplay (may be just behaves silently?). But, obviously, I do not want it under root.

Code:
[   159.623]    X.Org ANSI C Emulation: 0.4
[   159.623]    X.Org Video Driver: 20.0
[   159.623]    X.Org XInput driver : 22.1
[   159.623]    X.Org Server Extension : 9.0
[   159.625] (--) PCI:*(0:1:5:0) 1002:9616:1043:8388 rev 0, Mem @ 0xd0000000/268
435456, 0xfe9f0000/65536, 0xfe800000/1048576, I/O @ 0x0000c000/256, BIOS @ 0x???
?????/65536
[   159.625] (II) "glx" will be loaded by default.
[   159.625] (II) LoadModule: "glx"
[   159.677] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   159.996] (II) Module glx: vendor="X.Org Foundation"
[   159.996]    compiled for 1.18.4, module version = 1.0.0
[   159.996]    ABI class: X.Org Server Extension, version 9.0
[   159.996] (==) AIGLX enabled
[   160.004] (==) Matched ati as autoconfigured driver 0
[   160.004] (==) Matched modesetting as autoconfigured driver 1
[   160.004] (==) Matched scfb as autoconfigured driver 2
[   160.004] (==) Matched vesa as autoconfigured driver 3
[   160.004] (==) Assigned the driver to the xf86ConfigLayout
[   160.004] (II) LoadModule: "ati"
[   160.004] (II) Loading /usr/local/lib/xorg/modules/drivers/ati_drv.so
[   160.016] (II) Module ati: vendor="X.Org Foundation"
[   160.016]    compiled for 1.18.4, module version = 19.0.1
[   160.016]    Module class: X.Org Video Driver
[   160.016]    ABI class: X.Org Video Driver, version 20.0
[   160.033] (II) LoadModule: "radeon"
[   160.033] (II) Loading /usr/local/lib/xorg/modules/drivers/radeon_drv.so
[   160.143] (II) Module radeon: vendor="X.Org Foundation"
[   160.143]    compiled for 1.18.4, module version = 19.0.1
[   160.143]    Module class: X.Org Video Driver
[   160.144]    ABI class: X.Org Video Driver, version 20.0
[   160.151] (II) LoadModule: "modesetting"
[   160.151] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[   160.220] (II) Module modesetting: vendor="X.Org Foundation"
[   160.220]    compiled for 1.18.4, module version = 1.18.4
[   160.220]    Module class: X.Org Video Driver
[   160.220]    ABI class: X.Org Video Driver, version 20.0
[   160.220] (II) LoadModule: "scfb"
[   160.220] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[   160.246] (II) Module scfb: vendor="X.Org Foundation"
[   160.246]    compiled for 1.18.4, module version = 0.0.4
[   160.246]    ABI class: X.Org Video Driver, version 20.0
[   160.246] (II) LoadModule: "vesa"
[   160.246] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[   160.261] (II) Module vesa: vendor="X.Org Foundation"
[   160.261]    compiled for 1.18.4, module version = 2.4.0
[   160.261]    Module class: X.Org Video Driver
[   160.261]    ABI class: X.Org Video Driver, version 20.0
[   160.261] (II) RADEON: Driver for ATI/AMD Radeon chipsets:
...
[   160.265] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   160.265] (II) scfb: driver for wsdisplay framebuffer: scfb
[   160.265] (II) VESA: driver for VESA chipsets: vesa
[   160.266] (--) Using syscons driver with X support (version 2.0)
[   160.266] (--) using VT number 9

[   160.286] (II) [KMS] Kernel modesetting enabled.
[   160.286] (WW) Falling back to old probe method for modesetting
[   160.286] (WW) Falling back to old probe method for scfb
[   160.286] scfb trace: probe start
[   160.286] scfb trace: probe done
[   160.286] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   160.301] (II) RADEON(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[   160.301] (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
[   160.302] (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[   160.302] (==) RADEON(0): Default visual is TrueColor
[   160.303] (==) RADEON(0): RGB weight 888
[   160.303] (II) RADEON(0): Using 8 bits per RGB (8 bit DAC)
[   160.303] (--) RADEON(0): Chipset: "ATI Radeon 3000 Graphics" (ChipID = 0x9616)
[   160.303] (II) Loading sub module "fb"
[   160.303] (II) LoadModule: "fb"
[   160.303] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[   160.324] (II) Module fb: vendor="X.Org Foundation"
[   160.324]    compiled for 1.18.4, module version = 1.0.0
[   160.324]    ABI class: X.Org ANSI C Emulation, version 0.4
[   160.324] (II) Loading sub module "dri2"
[   160.324] (II) LoadModule: "dri2"
[   160.324] (II) Module "dri2" already built-in
[   164.410] (II) Loading sub module "glamoregl"
[   164.410] (II) LoadModule: "glamoregl"
[   164.411] (II) Loading /usr/local/lib/xorg/modules/libglamoregl.so
[   164.596] (II) Module glamoregl: vendor="X.Org Foundation"
[   164.596]    compiled for 1.18.4, module version = 1.0.0
[   164.596]    ABI class: X.Org ANSI C Emulation, version 0.4
[   164.596] (II) glamor: OpenGL accelerated X.org driver based.
[   164.670] (II) glamor: EGL version 1.5:
[   164.824] (II) RADEON(0): glamor detected, initialising EGL layer.
[   164.824] (II) RADEON(0): KMS Color Tiling: enabled
[   164.824] (II) RADEON(0): KMS Color Tiling 2D: enabled
[   164.824] (==) RADEON(0): TearFree property default: auto
[   164.824] (II) RADEON(0): KMS Pageflipping: enabled
...
[   164.904] (II) RADEON(0): mem size init: gart size :1fdef000 vram size: s:10000000 visible:f9bf000
[   164.904] (==) RADEON(0): DPI set to (96, 96)
[   164.904] (II) Loading sub module "ramdac"
[   164.904] (II) LoadModule: "ramdac"
[   164.904] (II) Module "ramdac" already built-in
[   164.904] (II) UnloadModule: "modesetting"
[   164.904] (II) Unloading modesetting
[   164.904] (II) UnloadModule: "scfb"
[   164.904] (II) Unloading scfb
[   164.904] (II) UnloadModule: "vesa"
[   164.904] (II) Unloading vesa
[   164.904] (--) Depth 24 pixmap format is 32 bpp
[   164.915] (II) RADEON(0): [DRI2] Setup complete
[   164.915] (II) RADEON(0): [DRI2]   DRI driver: r600
[   164.915] (II) RADEON(0): [DRI2]   VDPAU driver: r600
[   164.915] (II) RADEON(0): Front buffer size: 3072K
[   164.915] (II) RADEON(0): VRAM usage limit set to 227372K
[   164.936] (II) RADEON(0): SYNC extension fences enabled
[   164.937] (II) RADEON(0): Present extension enabled
[   164.937] (==) RADEON(0): DRI3 enabled
[   164.937] (==) RADEON(0): Backing store enabled
[   164.937] (II) RADEON(0): Direct rendering enabled
[   165.181] (II) RADEON(0): Use GLAMOR acceleration.
[   165.181] (II) RADEON(0): Acceleration enabled
[   165.181] (==) RADEON(0): DPMS enabled
[   165.181] (==) RADEON(0): Silken mouse enabled
[   165.198] (II) RADEON(0): Set up textured video (glamor)
[   165.224] (II) RADEON(0): [XvMC] Associated with GLAMOR Textured Video.
[   165.239] (II) RADEON(0): [XvMC] Extension initialized.
[   165.239] (II) RADEON(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[   165.241] (--) RandR disabled
[   165.269] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[   165.269] (II) AIGLX: enabled GLX_ARB_create_context
[   165.269] (II) AIGLX: enabled GLX_ARB_create_context_profile
[   165.269] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile
[   165.269] (II) AIGLX: enabled GLX_INTEL_swap_event
[   165.269] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[   165.269] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[   165.269] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[   165.269] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float
[   165.269] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[   165.269] (II) AIGLX: enabled GLX_ARB_create_context_robustness
[   165.275] (II) AIGLX: Loaded and initialized r600
[   165.275] (II) GLX: Initialized DRI2 GL provider for screen 0
 
Modify /etc/devfs.rules as follows:
Code:
add path 'dri/*' mode 0666 group video
add path 'drm/*' mode 0666 group video

Be sure to add yourself to group video, reboot your system and see if the libGL permission denied message has gone away.
 
Modify /etc/devfs.rules as follows:
Code:
add path 'dri/*' mode 0666 group video
add path 'drm/*' mode 0666 group video

Be sure to add yourself to group video, reboot your system and see if the libGL permission denied message has gone away.
Thanks! It looks that it works now O.K., without permission complaints. But for some reason after reboot ffplay just stropped playing anything under ordinary user it hang just before start playing. But after some hours it works again. Some mystery for me )
 
Modify /etc/devfs.rules as follows:
Code:
add path 'dri/*' mode 0666 group video
add path 'drm/*' mode 0666 group video

Be sure to add yourself to group video, reboot your system and see if the libGL permission denied message has gone away.
Thanks! It looks that it works now O.K., without permission complaints. But for some reason after reboot ffplay just stropped playing anything under ordinary user it hang just before start playing. But after some hours it works again. Some mystery for me )
 
Back
Top