Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems getting an OpenGL provider with i965 driver.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 255

PostPosted: Thu Apr 13, 2017 5:16 pm    Post subject: Problems getting an OpenGL provider with i965 driver. Reply with quote

This is an issue I'd experienced some time before. I've installed xf86-video-intel and set VIDEO_CARDS to "intel i965" however `eselect opengl list` shows "xorg-x11" and `eselect mesa list` shows only "classic." If I enable the i915 driver that subheading has both "classic" and "gallium" options for mesa, but I still do not receive any hardware acceleration per SDL2's report of no provider found when trying to open an OpenGL-enabled window.

I followed https://wiki.gentoo.org/wiki/Intel and have since added the Xorg configuration files though I don't remember needing them. I believe I encountered this issue some years ago when playing Minecraft as everything in general is snappy enough it seems like hardware acceleration is enabled, but it isn't. If it matters I am using a hardened kernel but per my previous experience modesetting and the Intel GPU drivers should work properly - it is typically SELinux which causes issues. Just in case I installed and set up SDDM (so Xorg runs with elevated permissions) as I had previously gotten that to work but presently using it offers no change in capability.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7134
Location: almost Mile High in the USA

PostPosted: Thu Apr 13, 2017 7:13 pm    Post subject: Reply with quote

Weird, seems according to http://www.x.org/wiki/GalliumStatus/ Gallium is only suppoted by the i915/i945 driver but not the i965.

I do get acceleration with the i965 classic driver on my Q45 board with classic, what's the issue that you're seeing, or just wanting to see Gallium for no particular reason?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 255

PostPosted: Fri Apr 14, 2017 12:05 am    Post subject: Reply with quote

eccerr0r wrote:
Weird, seems according to http://www.x.org/wiki/GalliumStatus/ Gallium is only suppoted by the i915/i945 driver but not the i965.

I do get acceleration with the i965 classic driver on my Q45 board with classic, what's the issue that you're seeing, or just wanting to see Gallium for no particular reason?


Well, wanting to see gallium was related to, I think, having to use the i915 driver previously, but I can't be sure. I'm still missing some information on this because everything indicates I have it set up properly yet I still do not receive hardware acceleration though everything runs fast enough to assume I do, save the failure of this:

Code:
#include <SDL2/SDL.h>
#include <iostream>
using namespace std;

#define WINDOW_WIDTH   640
#define WINDOW_HEIGHT   480

int
main(int argc, char *argv[])
{
   SDL_Window *window;
   SDL_GLContext context;
   SDL_Event event;

   if (SDL_Init(SDL_INIT_VIDEO)) {
      cout << "SDL_Init_Video: " << SDL_GetError() << std::endl;
      return -1;
   }

   window = SDL_CreateWindow("OpenGL Test",
      SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
      WINDOW_WIDTH, WINDOW_HEIGHT,
      SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_OPENGL);
   if (!window) {
      cout << "SDL_CreateWindow: " << SDL_GetError() << std::endl;
      return -1;
   }

   cout << "Hello, world!" << std::endl;
   return 0;
}


Code:
$ ./ogltest
SDL_CreateWindow: No OpenGL support in video driver


Code:
# eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11 *


Code:
# eselect mesa list
i915 (Intel 915, 945)
i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
  [1]   classic *
r300 (Radeon R300-R500)
r600 (Radeon R600-R700, Evergreen, Northern Islands)
sw (Software renderer)
  [1]   classic
  [2]   gallium *


Any help is appreciated.
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 255

PostPosted: Fri Apr 14, 2017 1:34 am    Post subject: Reply with quote

It turns out I had somethings disabled in media-libs/libsdl2 that should have been enabled. Setting the following globally fixed the issue: opengl, egl, gles, and gles2. The OpenGL useflag alone does not fix the issue.

Last edited by R0b0t1 on Wed Apr 19, 2017 5:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 487
Location: Estonia

PostPosted: Fri Apr 14, 2017 8:02 am    Post subject: Reply with quote

I don't know about the libSDL stuff, but just to note that intel doesn't use gallium for OpenGL implementation. It saying "classic" doesn't mean it's not accelerated or anything.
Also at least with newer Intel graphics (like at least sandy bridge or newer) it is advised to not have xf86-video-intel for Xorg, but rather use the xorg-server builtin modesetting DDX.
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 255

PostPosted: Fri Apr 14, 2017 11:29 pm    Post subject: Reply with quote

Leio wrote:
I don't know about the libSDL stuff, but just to note that intel doesn't use gallium for OpenGL implementation. It saying "classic" doesn't mean it's not accelerated or anything.
Also at least with newer Intel graphics (like at least sandy bridge or newer) it is advised to not have xf86-video-intel for Xorg, but rather use the xorg-server builtin modesetting DDX.


Thanks for the explanation. I think that resolves some of my confusion but I still have some questions (which may have to be left unanswered), as I think the issue a couple of years ago was resolved by using the i915 driver with an i965 chipset, because the i915 driver was faster. I remember setting up the "proper" driver involved the installation of LLVM whereas it previously had not been there. The slowdown was related to rendering lots of sprites with transformations at once, if anyone finds this later.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sat Apr 15, 2017 12:19 am    Post subject: Reply with quote

Leio wrote:
I don't know about the libSDL stuff, but just to note that intel doesn't use gallium for OpenGL implementation. It saying "classic" doesn't mean it's not accelerated or anything.

Leio ... oddly enough I was under this impression too (from reading the wikipedia page on free and open-source graphics device drivers) however the GalliumStatus page provided above by eccerr0r states that these (mesa, dri, egl) are "DONE" (and so "implemented") for i915. I'd always had media-libs/mesa[-gallium] for that reason, but I'm not sure that is correct, because having now enabled gallium/llvm certain things (ie, mpv) are improved (or at least less noisy). Starting, fwding, stoping, etc, mpv is snappier, with mesa set to gallium, though I don't think there is any marked difference in cpu usage, or quality (never had an issue with "tearing"). So, if the intel driver doesn't use Gallium3D what possibly could the above status refer to ... confusing.

best ... khay
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 487
Location: Estonia

PostPosted: Sun Apr 16, 2017 7:03 am    Post subject: Reply with quote

There was a i915 community driver that used gallium (intel before i965), and there was a i965 community driver that used gallium (ILO). Neither was ever supported by Intel the company and its open source developers - they believe in not needing to convert to using gallium and the extra common things it provides, and shares code in other areas instead of the full gallium infrastructure.
ILO as a LunarG championed driver is essentially dead and removed from mesa, I don't know what the status of the i915 thing is.
https://www.phoronix.com/scan.php?page=news_item&px=Intel-ILO-Gallium3D-Sunset
GalliumStatus pages are probably referring to one of these.

If you are using intel drivers that are developed by Intel the company, then the usefulness of USE=llvm on mesa can be for enabling the llvmpipe software GL renderer in addition to the slower swrast software renderer. Additionally there exists a SWR software rasterizer that can be even faster in certain use cases (I believe mostly OpenCL related for headless purposes or something). But all these are software ones, which might be fallbacked to in certain situations and the fact that it's doing a fallback might be the real issue.
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Wed Apr 19, 2017 9:07 am    Post subject: Re: Problems getting an OpenGL provider with i965 driver. Reply with quote

R0b0t1 wrote:
I've installed xf86-video-intel and set VIDEO_CARDS to "intel i965"

Code:
$ eix -I xf86-video
No matches found

Code:
$ grep VIDEO /etc/portage/make.conf
VIDEO_CARDS="i965"


R0b0t1 wrote:
`eselect opengl list` shows "xorg-x11" and `eselect mesa list` shows only "classic."

Code:
$ eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11 *

Code:
$ eselect mesa list
i915 (Intel 915, 945)
i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
  [1]   classic *
r300 (Radeon R300-R500)
r600 (Radeon R600-R700, Evergreen, Northern Islands)
sw (Software renderer)
  [1]   classic
  [2]   gallium *


R0b0t1 wrote:
If I enable the i915 driver that subheading has both "classic" and "gallium" options for mesa, but I still do not receive any hardware acceleration per SDL2's report of no provider found when trying to open an OpenGL-enabled window.

how to "SDL2's report"?

R0b0t1 wrote:
I followed https://wiki.gentoo.org/wiki/Intel and have since added the Xorg configuration files though I don't remember needing them.

i have nothing in /etc/X11/xorg.conf*

R0b0t1 wrote:
per my previous experience modesetting and the Intel GPU drivers should work properly

that is what i have.. seems to be working, as in i haven't noticed any issues. but then i'm not a gamer.

R0b0t1 wrote:
it is typically SELinux which causes issues

no selinux on my systems

R0b0t1 wrote:
Just in case I installed and set up SDDM (so Xorg runs with elevated permissions)

no dm, i just startx from ~/.profile
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 255

PostPosted: Wed Apr 19, 2017 5:58 pm    Post subject: Re: Problems getting an OpenGL provider with i965 driver. Reply with quote

josephg wrote:
R0b0t1 wrote:
I've installed xf86-video-intel and set VIDEO_CARDS to "intel i965"

Code:
$ eix -I xf86-video
No matches found

Code:
$ grep VIDEO /etc/portage/make.conf
VIDEO_CARDS="i965"


R0b0t1 wrote:
`eselect opengl list` shows "xorg-x11" and `eselect mesa list` shows only "classic."

Code:
$ eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11 *

Code:
$ eselect mesa list
i915 (Intel 915, 945)
i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
  [1]   classic *
r300 (Radeon R300-R500)
r600 (Radeon R600-R700, Evergreen, Northern Islands)
sw (Software renderer)
  [1]   classic
  [2]   gallium *


R0b0t1 wrote:
If I enable the i915 driver that subheading has both "classic" and "gallium" options for mesa, but I still do not receive any hardware acceleration per SDL2's report of no provider found when trying to open an OpenGL-enabled window.

how to "SDL2's report"?


With the code in my post above as "ogltest.cc":
Code:
g++ -lSDL2 -lGL ogltest.cc -o ogltest


josephg wrote:


R0b0t1 wrote:
I followed https://wiki.gentoo.org/wiki/Intel and have since added the Xorg configuration files though I don't remember needing them.

i have nothing in /etc/X11/xorg.conf*

R0b0t1 wrote:
per my previous experience modesetting and the Intel GPU drivers should work properly

that is what i have.. seems to be working, as in i haven't noticed any issues. but then i'm not a gamer.

R0b0t1 wrote:
it is typically SELinux which causes issues

no selinux on my systems

R0b0t1 wrote:
Just in case I installed and set up SDDM (so Xorg runs with elevated permissions)

no dm, i just startx from ~/.profile


I need to remove what I did put in the X11 configuration directories, as it seems I always had the i965 driver working. In the past I remember I had some knowledgeable people confused with my claim that the iGPU wasn't working when I had everything set up "properly" and now I think it has been explained. I will see if enabling llvmpipe is possible and what effects it has.

My confusion stemmed rather poor graphics performance. It seems like although the GPU is technically being used it is not being used very efficiently at all, and on mobile devices this probably contributes a fair bit to poor battery lifetimes. It would be entirely possible to consider the i965 driver nonfunctional. Unfortunately I have very little idea of how to contribute. My intent was to do some reverse engineering of device drivers from Windows, to get the full picture of a device's capabilities, but unfortunately driver development is very opaque for that system despite all of the documentation. At the moment I am waiting for money to buy separate test computers as working in virtual machines is possible but rather problematic at times.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Wed Apr 19, 2017 8:08 pm    Post subject: Re: Problems getting an OpenGL provider with i965 driver. Reply with quote

checking for hardware 3d acceleration as per wiki
Code:
$ glxinfo | grep rendering
direct rendering: Yes


R0b0t1 wrote:
With the code in my post above as "ogltest.cc":
Code:
g++ -lSDL2 -lGL ogltest.cc -o ogltest

Code:
$ g++ -lSDL2 -lGL ogltest.cc -o ogltest
ogltest.cc:6:22: fatal error: SDL2/SDL.h: No such file or directory
compilation terminated.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5765

PostPosted: Wed Apr 19, 2017 11:34 pm    Post subject: Reply with quote

Okay, I'll bite, if only to prevent this thread being derailed into someone else's level 1 helpdesk support.

Let's start from the top. I have a reasonably good guess what output to expect but it's better to not leave us guessing: post `glxinfo -B`. Try running it as root too, just to see if the output looks different. If you have eglinfo installed, post the output of `eglinfo | sed -n '/^Configurations/q;p'` too. It's fine if you don't.

As said above, gallium does nothing on i965 so disable it to reduce confusion and dead code. You should also avoid setting things like USE="opengl egl gles gles2" globally; for some packages (mesa) it'll work, for others (Qt5) it'll break your desktop and apps. Lastly I don't think it'll make a difference here, but it can't hurt to try: run X with the modesetting driver instead of intel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum