Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] "failed to load driver: i965" from Docker container
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jroth
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2017
Posts: 76

PostPosted: Mon Oct 15, 2018 11:16 pm    Post subject: [SOLVED] "failed to load driver: i965" from Docker Reply with quote

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

Code:

$ 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:

Code:

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
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Oct 16, 2018 12:17 am    Post subject: Reply with quote

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

Reconfigure your kernel to provide it.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
jroth
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2017
Posts: 76

PostPosted: Tue Oct 16, 2018 6:56 am    Post subject: Reply with quote

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
Code:
VIDEO_CARDS="intel i965"

in my make.conf, then ran
Code:
# emerge --ask --changed-use --deep @world


and rebooted, but that didn't help.
Back to top
View user's profile Send private message
jroth
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2017
Posts: 76

PostPosted: Mon Oct 22, 2018 7:44 pm    Post subject: Reply with quote

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:

Code:

#!/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

Code:
--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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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