# [SOLVED] "failed to load driver: i965" from Docker container

## jroth

So I'm running a GUI app (specifically MATLAB) in a Ubuntu docker container by using this approach:

```

$ xhost +local:docker

$ docker run --rm -t --network none -e DISPLAY=$DISPLAY -e J2D_D3D=false -e _JAVA_AWT_WM_NONREPARENTING=1 -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/shared-with-vm:/shared-with-host -v usrlocalmatlab:/usr/local/MATLAB  matlab-holder /usr/local/MATLAB/R2018a/bin/matlab

```

where usrlocalmatlab is a docker volume that contains the MATLAB install and matlab-holder is a docker image on to which I've managed to install the right Ubuntu packages (as outlined here) to get MATLAB to start. 

And this approach works fine on my desktop with Nvidia GPU. I can run those two lines of bash and get the matlab program to show up on my desktop, running from the VM, and use all the features.

But on my laptop, with intel integrated graphics, I get this error in the terminal whenever I try to use plotting or other graphical functions of matlab:

```

libGL error: failed to open drm device: No such file or directory

libGL error: failed to load driver: i965

```

and the plots don't work. In fact, that error seems to pop up whenever I try to run a graphics intensive app from inside the docker container - even glxgears will trigger it, although unline MATLAB glxgears seems to run fine despite the error. 

Does anyone know how to debug this?Last edited by jroth on Mon Oct 22, 2018 7:45 pm; edited 1 time in total

----------

## Jaglover

 *Quote:*   

> failed to open drm device: No such file or directory

 

Reconfigure your kernel to provide it.

----------

## jroth

 *Jaglover wrote:*   

>  *Quote:*   failed to open drm device: No such file or directory 
> 
> Reconfigure your kernel to provide it.

 

Reconfigure it how? I already had all the kernel options listed on the wiki page for Intel.

I also set

```
VIDEO_CARDS="intel i965"
```

in my make.conf, then ran

```
# emerge --ask --changed-use --deep @world
```

and rebooted, but that didn't help.

----------

## jroth

So it turns out that the problem wasn't in the host system so much as I wasn't giving the container access to the video card device. I fixed it by doing this:

```

#!/bin/bash

xhost +local:docker

docker run --device /dev/dri/ --rm -t --network none -e DISPLAY=$DISPLAY -e J2D_D3D=false -e _JAVA_AWT_WM_NONREPARENTING=1 -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/shared-with-vm:/shared-with-host -v usrlocalmatlab:/usr/local/MATLAB -v matlab-holder /usr/local/MATLAB/R2018a/bin/matlab

```

the key difference being the flag

```
--device /dev/dri/ 
```

giving the Docker container access to the video device it needed.

It's still sort of a mystery how this step isn't necessary on an NVidia graphics machine.

----------

