Opengl problem with framework laptop (gen 12)

I bought a new framework laptop, and experiance problems with applications which use opengl.
They are extremely slow, like type a letter wait 2 seconds and the key appears. I don’t have these problems with apps that don’t use opengl (like urxvt).

I use the nixos-hardware
module and here is how (with flakes and colmena):

inputs = {
    nixos-hardware = {
      url = "github:nixos/nixos-hardware";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    #...
}
outputs = { self , nixos-hardware, ... }: {
  colmena = {
    meta.nixpkgs = import nixpkgs { system = "x86_64-linux"; };
    my-machine = { name, nodes, pkgs, ... }: {
      imports = [ nixos-hardware.nixosModules.framework-12th-gen-intel ];
      # ...
    };
  };
};

Here is my configuration.nix part that might be interesting

hardware.opengl = {
  enable = true;
  #driSupport = true;       # enabled and disabled this, no difference
  #driSupport32Bit = true;  # enabled and disabled this, no difference
};

services.xserver = {
  enable = true;
  videoDrivers = [ "intel" ];
  deviceSection = ''
    Option "DRI" "2"
    Option "TearFree" "true"
  '';

  displayManager = {
    defaultSession = "none+i3";
    lightdm.enable = true;
  };
  windowManager.i3.enable = true;

  libinput = {
    enable = true;
    touchpad = {
      disableWhileTyping = true;
      tapping = true;
      scrollMethod = "twofinger";
      accelSpeed = "2";
    };
  };
};

Here is the problem I see in the xorg log (full log is here)

[    10.915] (EE) AIGLX error: dlopen of /run/opengl-driver/lib/dri/i965_dri.so failed (/run/opengl-driver/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory)
[    10.915] (EE) AIGLX error: unable to load driver i965
[    10.996] (EE) intel(0): Failed to submit rendering commands (Invalid argument), disabling acceleration.

And here is the contents of /run/opengl-driver/lib/dri:

> ll /run/opengl-driver/lib/dri
lrwxrwxrwx 85 root  1 Jan  1970 crocus_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/crocus_dri.so
lrwxrwxrwx 83 root  1 Jan  1970 i915_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/i915_dri.so
lrwxrwxrwx 94 root  1 Jan  1970 i965_drv_video.la -> /nix/store/qsz5dxss0ljxr11wgjbr9imhna84zwh0-intel-vaapi-driver-2.4.1/lib/dri/i965_drv_video.la
lrwxrwxrwx 94 root  1 Jan  1970 i965_drv_video.so -> /nix/store/qsz5dxss0ljxr11wgjbr9imhna84zwh0-intel-vaapi-driver-2.4.1/lib/dri/i965_drv_video.so
lrwxrwxrwx 94 root  1 Jan  1970 iHD_drv_video.so -> /nix/store/bxkjwabp76wg55x422ziva5gqggrn8d9-intel-media-driver-22.6.3/lib/dri/iHD_drv_video.so
lrwxrwxrwx 83 root  1 Jan  1970 iris_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/iris_dri.so
lrwxrwxrwx 89 root  1 Jan  1970 kms_swrast_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/kms_swrast_dri.so
lrwxrwxrwx 86 root  1 Jan  1970 nouveau_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/nouveau_dri.so
lrwxrwxrwx 92 root  1 Jan  1970 nouveau_drv_video.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/nouveau_drv_video.so
lrwxrwxrwx 83 root  1 Jan  1970 r300_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/r300_dri.so
lrwxrwxrwx 83 root  1 Jan  1970 r600_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/r600_dri.so
lrwxrwxrwx 89 root  1 Jan  1970 r600_drv_video.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/r600_drv_video.so
lrwxrwxrwx 87 root  1 Jan  1970 radeonsi_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/radeonsi_dri.so
lrwxrwxrwx 93 root  1 Jan  1970 radeonsi_drv_video.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/radeonsi_drv_video.so
lrwxrwxrwx 85 root  1 Jan  1970 swrast_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/swrast_dri.so
lrwxrwxrwx 89 root  1 Jan  1970 virtio_gpu_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/virtio_gpu_dri.so
lrwxrwxrwx 85 root  1 Jan  1970 vmwgfx_dri.so -> /nix/store/4dmgvkyp34g1hwpwwwsadp05iiy1hfxv-mesa-22.2.5-drivers/lib/dri/vmwgfx_dri.so

For now I set hardware.opengl.enable = false, which make user-experience okisch, but this is no solution of course.

Thanks to input from @Mic92 I found a solution (which works very well)

The solution was very simple

-      videoDrivers = [ "intel" ];
-      deviceSection = ''
-        Option "DRI" "2"
-        Option "TearFree" "true"
-      '';

These options just have to be removed, and relaying on the modesetting videodriver.