Hardware-accelerated OpenGL with Intel onboard card

Dear community,

I am struggling to get my Intel graphics card to drive OpenGL applications on my Dell XPS 9560. Blender is laggy and glxgears shows only ~100FPS (in fullscreen, I disabled VSync). Is this expected with a Intel HD 630?
On my 7 year old Macbook (it has an Intel Iris 5200 though), graphics applications are a lot faster with a similar configuration as to what I am using for my newer XPS. Is there any way I can check if really the Intel-card is used for graphics acceleration or if everything is rendered on the CPU (which is what I suspect)?

I already explicitly disabled 3D rendering support of the intel card and saw no difference in performance (also ~100 FPS for glxgears)

  services.xserver.config = ''
  Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "NoAccel" "True"  
    Option "DRI" "False"

Here is my graphics card and my configuration.

  services.xserver.videoDrivers = [ "intel" ];  # modesetting didn't help
  boot.blacklistedKernelModules = [ "nouveau" "nvidia" ];  # bbswitch
  boot.kernelParams = [ "acpi_rev_override=5" "i915.enable_guc=2" ];  
  boot.kernelModules = [ "kvm-intel" ];
  hardware.opengl = {
    enable = true;
    driSupport = true;
    extraPackages = with pkgs; [
      intel-media-driver # LIBVA_DRIVER_NAME=iHD
      vaapiIntel         # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
[I] moritz@moxps ~> lspci | grep -i VGA
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)

Laggy blender is one issue, however I encounter additional issues on my XPS, which I don’t encounter on my MBP: Certain GUI applications (including qutebrowser, chrome, blender) freeze to death from time to time. I first thought this is a bug related to EXWM, but recently found out that the freezing also happens under XFCE.

I tried out all possible configurations suggested in the arch-wiki Intel page but was not able to fix the issues. Do you have any hints on how I might debug this?

1 Like

Perhaps you did that but anyway. To check if accelleration is on you can do glxinfo|grep 'direct rendering'. glxinfo is in the glxinfo package.

Thanks for your response. I did indeed not check it. But it does show ‘yes’. So that means that the GPU is indeed working and the reason I have slow performance and freezes must be some kind of driver bug?

Don’t know. To rule out local configuration issue you can for example test and compare the result with those others get for this hardware Intel HD 630 Benchmarks, Linux Performance - OpenBenchmarking.org

I’ve not known openbenchmarking. Looks like a cool project!
Running gputest, as described here resulted in failed tests only.

GpuTest 0.7.0:
    pts/gputest-1.3.2 [Test: Pixmark Volplosion - Resolution: 1920 x 1080 - Mode: Fullscreen]
    Test 7 of 7
    Estimated Trial Run Count:    3
    Estimated Time To Completion: 4 Minutes [07:21 UTC]
        Started Run 1 @ 07:18:23
        The test run did not produce a result.
        Started Run 2 @ 07:18:27
        The test run did not produce a result.
        Started Run 3 @ 07:18:31
        The test run did not produce a result.

Also running the etlegacy benchmark “did not produce results”.

EDIT: I just saw that this is due to phoronix not being able to find the benchmark binary

./gputest: line 4: ./GpuTest: No such file or directory

I’ll try to fix this and get back here

Beside phoronix you can also use the browser tests to compare against others: https://browserbench.org/

1 Like

browserbench/MotionMark worked:

on a large screen (desktop)

but I don’t find any comparison values to other HD 630 owners (just used Google).

Also, one thing I forgot to mention is that applications don’t freeze, when I have them on a connected external monitor.

The issue seems to have disappeared. I rebuilt my configuration.nix from scratch (starting with the bar minimum and then step by step expanding it to my full system), and, surprisingly, now everything is fine (MotionMark on Intel GPU has > 200 points now and my browsers don’t freeze anymore).

I can’t say what changed unfortunately :frowning:

For future googlers: The main issue was that spacemacs (I am using EXWM on top of spacemacs) saves environment variables in a .spacemacs.env file. When changing my nix-generation from intel-drivers to nvidia-drivers (or the other way round), X-related environment variables were used from the .spacemacs.env file (instead of using the ones provided by X itself) leading to the mistakes.
My ugly workaround: I delete .spacemacs.env when changing drivers.

On top of that, another issue is that I only manage to get EXWM running with lightDM when nvidia drivers are enabled. When intel drivers are enabled, only gDM works.

Also, EXWM runs a lot less smooth and especially less stable on nvidia drivers as compared to on intel-drivers.

Hope I can help anyone with this