{"record":{"id":"169eceeb3a2b6941","repo":"immich-app/immich","slug":"no-dev-dri-devices-found-if-using-docker-make-s","errorCode":null,"errorMessage":"No /dev/dri devices found. If using Docker, make sure at least one /dev/dri device is mounted","messagePattern":"No /dev/dri devices found\\. If using Docker, make sure at least one /dev/dri device is mounted","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/src/utils/media.ts","lineNumber":437,"sourceCode":"    return this.config.cqMode === CQMode.Cqp;\n  }\n}\n\nexport class BaseHWConfig extends BaseConfig {\n  protected device: string;\n\n  constructor(\n    protected config: SystemConfigFFmpegDto,\n    protected interfaces: VideoInterfaces,\n    tune?: VideoTuning,\n  ) {\n    super(config, tune);\n    this.device = this.getDevice(interfaces);\n  }\n\n  validateDevices(devices: string[]) {\n    if (devices.length === 0) {\n      throw new Error('No /dev/dri devices found. If using Docker, make sure at least one /dev/dri device is mounted');\n    }\n\n    return devices.filter(function (device) {\n      return device.startsWith('renderD') || device.startsWith('card');\n    });\n  }\n\n  getDevice({ dri }: VideoInterfaces) {\n    if (this.config.preferredHwDevice === 'auto') {\n      // eslint-disable-next-line unicorn/no-array-reduce\n      return `/dev/dri/${this.validateDevices(dri).reduce(function (a, b) {\n        return a.localeCompare(b) < 0 ? b : a;\n      })}`;\n    }\n\n    const deviceName = this.config.preferredHwDevice.replace('/dev/dri/', '');\n    if (!dri.includes(deviceName)) {\n      throw new Error(`Device '${deviceName}' does not exist. If using Docker, make sure this device is mounted`);","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/immich-app/immich/blob/199723261c6ffa897fec8ccdaea6359e39c37cc3/server/src/utils/media.ts#L419-L455","documentation":"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.","triggerScenarios":"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).","commonSituations":"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).","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."],"exampleFix":"# before — docker-compose (no GPU)\nservices:\n  immich-server:\n    # no devices\n\n# after\nservices:\n  immich-server:\n    devices:\n      - /dev/dri:/dev/dri","handlingStrategy":"validation","validationCode":"// before enabling hardware accel, verify devices exist\nimport { readdirSync } from 'node:fs';\nlet dri: string[] = [];\ntry { dri = readdirSync('/dev/dri'); } catch {}\nconst hasGpu = dri.some(d => d.startsWith('renderD') || d.startsWith('card'));\nif (!hasGpu) config.ffmpeg.accel = 'disabled';","typeGuard":"const hasDriDevices = (dir = '/dev/dri'): boolean => {\n  try { return readdirSync(dir).some(d => d.startsWith('renderD') || d.startsWith('card')); }\n  catch { return false; }\n};","tryCatchPattern":"try { await transcode(assetId); }\ncatch (e) { if (/No \\/dev\\/dri devices found/.test(e.message)) { /* fall back to software */ config.ffmpeg.accel='disabled'; } else throw e; }","preventionTips":["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."],"tags":["ffmpeg","hardware-acceleration","docker","gpu","vaapi","qsv","transcoding"],"backgroundTag":null,"analyzedSha":"199723261c6ffa897fec8ccdaea6359e39c37cc3","analyzedAt":"2026-08-12T04:54:27.085Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}