- Newest
- Most votes
- Most comments
Based on your description, it appears you're having issues with GPU acceleration in your Amazon DCV (formerly NICE DCV) Docker container on Ubuntu 24.04. The key issue seems to be that the X server in your container isn't properly connecting to the NVIDIA GPU.
Here are some suggestions to resolve this issue:
-
X Server Configuration: Your error message "Cannot start a temporary 3D X Server on display :0" indicates that the X server isn't properly configured to use the GPU. Make sure the X server is running with the correct permissions and has access to the GPU devices.
-
NVIDIA Container Toolkit: Ensure you have the NVIDIA Container Toolkit properly installed and configured. This is essential for GPU passthrough to Docker containers:
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
- Docker Run Command: When running your Docker container, make sure to include all necessary flags for GPU access:
docker run -d --name dcv-container \
--gpus all \
--privileged \
--network=host \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=:0 \
-e NVIDIA_VISIBLE_DEVICES=all \
-e NVIDIA_DRIVER_CAPABILITIES=all \
--device /dev/nvidia0:/dev/nvidia0 \
--device /dev/nvidiactl:/dev/nvidiactl \
--device /dev/nvidia-modeset:/dev/nvidia-modeset \
--device /dev/nvidia-uvm:/dev/nvidia-uvm \
your-dcv-image
- X Server in Container: Inside the container, you need to properly configure the X server to use the NVIDIA GPU:
nvidia-xconfig --preserve-busid --enable-all-gpus
systemctl isolate multi-user.target
systemctl isolate graphical.target
-
Wayland Support: Note that Amazon DCV 2024.0 now natively supports Wayland on Ubuntu 24.04, which might provide better performance. Consider configuring your setup to use Wayland instead of X11 if possible.
-
Console Session: For desktop acceleration, try using a console session instead of a virtual session. You can configure an automatic console session in
/etc/dcv/dcv.conf
:
[session-management]
create-session = true
[session-management/automatic-console-session]
owner="your-username"
- Check DCV Configuration: Ensure your DCV configuration has GPU acceleration enabled:
[display]
gpu_accel = true
After making these changes, restart the DCV server and try connecting again. If you're still experiencing issues, check the DCV server logs for more specific error messages.
Sources
NICE DCV renames to Amazon DCV and releases version 2024.0 with support for Ubuntu 24.04 - AWS
NICE DCV ON DOCKER STUCK ON LOADING SCREEN AFTER DCV AUTH SCREEN | AWS re:Post
GPU Instance (g4dn.xlarge) CUDA Driver Initialization Issue in Docker Container | AWS re:Post
NICE DCV Pixel issues on GPU | AWS re:Post
Unfortunately the AI answer does not solve anything
i tried running gpu_burn, which works and nvidia-smi actually shows the current load as it should, so i think something is wrong with my setup in general (either some missing dependencies or some general setup stuff)
Relevant content
- asked 3 years ago
- asked 10 months ago
- asked 10 months ago