Ask Your Question
0

Rocker sort of works, gives QXcpConnection errors

asked 2020-08-28 12:19:48 -0500

clyde gravatar image

updated 2020-08-28 12:48:26 -0500

I'm trying to use rocker with the NVIDIA Container Toolkit and I'm running into problems.

  • Ubuntu 18.04
  • Docker version 19.03.12, build 48a66213fe
  • nvidia-container-toolkit
  • rocker 0.2.2

docker run --gpus all nvidia/cuda:10.0-base nvidia-smi gives:

Fri Aug 28 17:07:36 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro K1200        Off  | 00000000:01:00.0 Off |                  N/A |
| 51%   66C    P0     4W /  35W |   1636MiB /  4043MiB |      4%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

rocker --x11 --nvidia osrf/ros:eloquent-desktop rviz2 opens a window with rviz2 running and the main canvas visible in the center of the window. Yay! I can interact with the main canvas. But all of the controls (Qt, I guess) along the left, right and top are not drawn -- so most of the window is black. Meanwhile, I'm getting repeated errors like this in my docker container:

QXcbConnection: XCB error: 2 (BadValue), sequence: 3726, resource id: 1200, major code: 130 (Unknown), minor code: 3

I'm a docker and rocker newbie. Any pointers?

Thanks.

Update: most problems go away when I use the --user option:

rocker --x11 --nvidia --user osrf/ros:eloquent-desktop rviz2

But when I run without a command (rocker --x11 --nvidia --user osrf/ros:eloquent-desktop) the problems eventually return. E.g., the first invocation of rviz2 works, but the 2nd results in the original behavior.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-08-29 14:18:35 -0500

clyde gravatar image

I'm not sure why, but this worked for me: use docker exec -it YOUR_CONTAINER_ID bash to start a 2nd bash session in the container, and run rqt and rviz2 from there.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-08-28 12:19:48 -0500

Seen: 251 times

Last updated: Aug 29 '20