public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Can't use opengl as normal user
@ 2016-11-29 21:36 Grant Edwards
  2016-11-29 21:48 ` [gentoo-user] " Grant Edwards
  0 siblings, 1 reply; 2+ messages in thread
From: Grant Edwards @ 2016-11-29 21:36 UTC (permalink / raw
  To: gentoo-user

I can't use opengl direct rendering as a normal user, but it does work
via "sudo":

  $ sudo glxinfo | head -n15
  Password: 
  name of display: :0
  display: :0  screen: 0
  direct rendering: Yes
  server glx vendor string: SGI
  server glx version string: 1.4
  server glx extensions:
      GLX_ARB_create_context, GLX_ARB_create_context_profile, 
      GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
      GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, 
      GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
      GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
      GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, 
      GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
      GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
  client glx vendor string: Mesa Project and SGI

  $ glxinfo
  name of display: :0
  libGL error: unable to load driver: swrast_dri.so
  libGL error: failed to load driver: swrast
  libGL error: unable to load driver: swrast_dri.so
  libGL error: failed to load driver: swrast
  libGL error: unable to load driver: i965_dri.so
  libGL error: driver pointer missing
  libGL error: failed to load driver: i965
  libGL error: unable to load driver: swrast_dri.so
  libGL error: failed to load driver: swrast
  X Error of failed request:  GLXBadContext
    Major opcode of failed request:  152 (GLX)
    Minor opcode of failed request:  6 (X_GLXIsDirect)
    Serial number of failed request:  71
    Current serial number in output stream:  70

The .so files mentioned above all seem to be world-read/execute:

  $ find /usr/lib64 -name '*dri.so' -ls
    2621601      0 lrwxrwxrwx   1  root     root           23 Oct 22 19:52 /usr/lib64/libxcb-xf86dri.so -> libxcb-xf86dri.so.0.0.0
    1370135   6260 -rwxr-xr-x   3  root     root      6407064 Oct 22 20:06 /usr/lib64/mesa/i965_dri.so
    1370132   5908 -rwxr-xr-x   3  root     root      6047576 Oct 22 20:06 /usr/lib64/mesa/i915g_dri.so
    1370135   6260 -rwxr-xr-x   3  root     root      6407064 Oct 22 20:06 /usr/lib64/mesa/i915_dri.so
    1370132   5908 -rwxr-xr-x   3  root     root      6047576 Oct 22 20:06 /usr/lib64/mesa/kms_swrast_dri.so
    1370132   5908 -rwxr-xr-x   3  root     root      6047576 Oct 22 20:06 /usr/lib64/mesa/swrastg_dri.so
    1370135   6260 -rwxr-xr-x   3  root     root      6407064 Oct 22 20:06 /usr/lib64/mesa/swrast_dri.so
    3146477      0 lrwxrwxrwx   1  root     root           19 Feb 24  2014 /usr/lib64/dri/i965_dri.so -> ../mesa/i965_dri.so
    3146472      0 lrwxrwxrwx   1  root     root           20 Oct 22 20:06 /usr/lib64/dri/i915g_dri.so -> ../mesa/i915g_dri.so
    3146476      0 lrwxrwxrwx   1  root     root           20 Feb 24  2014 /usr/lib64/dri/i915_dri.so -> ../mesa/i915g_dri.so
    3146475      0 lrwxrwxrwx   1  root     root           25 Oct 22 20:06 /usr/lib64/dri/kms_swrast_dri.so -> ../mesa/kms_swrast_dri.so
    3146369      0 lrwxrwxrwx   1  root     root           22 Oct 22 20:06 /usr/lib64/dri/swrastg_dri.so -> ../mesa/swrastg_dri.so
    3146478      0 lrwxrwxrwx   1  root     root           22 Feb 24  2014 /usr/lib64/dri/swrast_dri.so -> ../mesa/swrastg_dri.so


This always used to be cured by adding the user to the "video" group,
but I'm already a member of the "video" group:

  $ groups
  wheel floppy uucp cron audio cdrom video games cdrw usb users vboxusers wireshark
  
  $ ls -l /dev/dri
  total 0
  crw-rw---- 1 root video 226,   0 Nov  1 15:00 card0
  crw-rw---- 1 root video 226,   1 Nov  1 15:00 card1
  crw-rw---- 1 root video 226,  64 Nov  1 15:00 controlD64
  crw-rw---- 1 root video 226, 128 Nov  1 15:00 renderD128


According to https://wiki.gentoo.org/wiki/Xorg/Hardware_3D_acceleration_guide:

  Hopefully just adding your user to the video group is sufficient to
  enable direct rendering. However, you may also need to create a file
  in /etc/X11/xorg.conf.d/. You can name it anything you like; just make
  sure it ends in .conf. Open up your favorite text editor and create a
  file with this inside it: FILE /etc/X11/xorg.conf.d/10-dri.conf
  
    Section "Device"
      Driver "radeon"
    EndSection
    Section "dri"
      Mode 0666
    EndSection
  
  Replace radeon with the name of your driver.

Why the "Device" section?

Which which of my two drivers am I supposed to specify?

I already have three "Device" sections (one for each devices) in the
main xorg.conf file.  Am I really supposed to create another file with
an extra "Device" section in it?
  
I tried adding a single "dri" section to xorg.conf, but it didn't
help.

Any ideas?

-- 
Grant Edwards               grant.b.edwards        Yow! Should I do my BOBBIE
                                  at               VINTON medley?
                              gmail.com            



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-user] Re: Can't use opengl as normal user
  2016-11-29 21:36 [gentoo-user] Can't use opengl as normal user Grant Edwards
@ 2016-11-29 21:48 ` Grant Edwards
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Edwards @ 2016-11-29 21:48 UTC (permalink / raw
  To: gentoo-user

On 2016-11-29, Grant Edwards <grant.b.edwards@gmail.com> wrote:

> I can't use opengl direct rendering as a normal user, but it does work
> via "sudo":
>
>   $ sudo glxinfo | head -n15
>   Password: 
>   name of display: :0
>   display: :0  screen: 0
>   direct rendering: Yes
>   server glx vendor string: SGI
[...]
>
>   $ glxinfo
>   name of display: :0
>   libGL error: unable to load driver: swrast_dri.so
>   libGL error: failed to load driver: swrast
[...]

Comparing strace output for the two cases showed that when glxinfo was
run as "me" the opengl library was trying to load libraires from
/usr/X11R6/lib/dri/...

For reasons lost in the mists of time, my .bashrc file contained
this culpable line:

export LIBGL_DRIVERS_PATH=/usr/X11R6/lib/dri

Removing that did the trick...

-- 
Grant Edwards               grant.b.edwards        Yow! I left my WALLET in
                                  at               the BATHROOM!!
                              gmail.com            



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-29 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29 21:36 [gentoo-user] Can't use opengl as normal user Grant Edwards
2016-11-29 21:48 ` [gentoo-user] " Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox