immich-app/immich · error · Error
No /dev/dri devices found. If using Docker, make sure at lea
Error message
No /dev/dri devices found. If using Docker, make sure at least one /dev/dri device is mounted
What it means
Thrown by VideoInterface.validateDevices (server/src/utils/media.ts) when the list of /dev/dri devices discovered on the host is empty. This path is taken for Intel/Linux hardware-accelerated transcoding (Vaapi/Qsv) which requires a DRM render node. The message points at the Docker mount as the usual cause.
Source
Thrown at server/src/utils/media.ts:437
return this.config.cqMode === CQMode.Cqp;
}
}
export class BaseHWConfig extends BaseConfig {
protected device: string;
constructor(
protected config: SystemConfigFFmpegDto,
protected interfaces: VideoInterfaces,
tune?: VideoTuning,
) {
super(config, tune);
this.device = this.getDevice(interfaces);
}
validateDevices(devices: string[]) {
if (devices.length === 0) {
throw new Error('No /dev/dri devices found. If using Docker, make sure at least one /dev/dri device is mounted');
}
return devices.filter(function (device) {
return device.startsWith('renderD') || device.startsWith('card');
});
}
getDevice({ dri }: VideoInterfaces) {
if (this.config.preferredHwDevice === 'auto') {
// eslint-disable-next-line unicorn/no-array-reduce
return `/dev/dri/${this.validateDevices(dri).reduce(function (a, b) {
return a.localeCompare(b) < 0 ? b : a;
})}`;
}
const deviceName = this.config.preferredHwDevice.replace('/dev/dri/', '');
if (!dri.includes(deviceName)) {
throw new Error(`Device '${deviceName}' does not exist. If using Docker, make sure this device is mounted`);View on GitHub (pinned to 199723261c)
Solutions
- Pass the GPU to the container: docker compose `devices: ['/dev/dri:/dev/dri']` or `--device /dev/dri:/dev/dri`.
- On the host, confirm /dev/dri/renderD128 and /dev/dri/card* exist and the i915/amdgpu driver is loaded.
- If no suitable GPU exists, switch ffmpeg.accel to 'disabled' (software transcoding).
- For non-root containers, ensure the immich user is in the 'render'/'video' group with permissions on /dev/dri.
Example fix
# before — docker-compose (no GPU)
services:
immich-server:
# no devices
# after
services:
immich-server:
devices:
- /dev/dri:/dev/dri Defensive patterns
Strategy: validation
Validate before calling
// before enabling hardware accel, verify devices exist
import { readdirSync } from 'node:fs';
let dri: string[] = [];
try { dri = readdirSync('/dev/dri'); } catch {}
const hasGpu = dri.some(d => d.startsWith('renderD') || d.startsWith('card'));
if (!hasGpu) config.ffmpeg.accel = 'disabled'; Type guard
const hasDriDevices = (dir = '/dev/dri'): boolean => {
try { return readdirSync(dir).some(d => d.startsWith('renderD') || d.startsWith('card')); }
catch { return false; }
}; Try / catch
try { await transcode(assetId); }
catch (e) { if (/No \/dev\/dri devices found/.test(e.message)) { /* fall back to software */ config.ffmpeg.accel='disabled'; } else throw e; } Prevention
- Mount /dev/dri into the container and verify with `ls /dev/dri` before enabling hardware accel.
- Default to software transcoding when no GPU is present.
When it happens
Trigger: A transcode job initializes a Vaapi or Qsv hardware video config while the container/host has no /dev/dri devices (no GPU device nodes passed through).
Common situations: Running Immich in Docker without `devices: - /dev/dri:/dev/dri`; running on a host without an iGPU/DRM driver loaded; running in a VM or cloud instance with no GPU passthrough; driver not loaded (i915/amdgpu).
Related errors
- Device '${deviceName}' does not exist. If using Docker, make
- ${config.accel.toUpperCase()} acceleration does not support
- Real-time transcoding is not enabled
- No supported variants for this video
- Invalid import path: ${path.message}
AI-assisted analysis of immich-app/immich@199723261c (2026-08-12).
Data as JSON: /api/errors/169eceeb3a2b6941.
Report an issue: GitHub.