{"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":444,"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: ConfigFFmpegDto,\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":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/immich-app/immich/blob/e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c/server/src/utils/media.ts#L426-L462","documentation":"validateDevices() filters the list of DRM (Direct Rendering Manager) devices found under /dev/dri before hardware transcoding setup proceeds. If the directory scan yields no devices at all, it throws because hardware acceleration (VAAPI/QSV on Intel/AMD iGPU) is impossible without a render node. The message hints at the most common cause: the /dev/dri device was never mounted into the container.","triggerScenarios":"Constructing the media/transcode service (via getDevice -> validateDevices) with hwAcceleration enabled when the /dev/dri directory contains no device entries, typically because no GPU device was passed to the container.","commonSituations":"Running the Immich Docker container without --device /dev/dri or the devices: compose entry; using a VPS/cloud VM with no GPU; host kernel lacking DRM drivers (no i915/amdgpu module loaded).","solutions":["Mount the GPU device into the container: add 'devices: [/dev/dri:/dev/dri]' to docker-compose.yml (or --device /dev/dri) and recreate the container.","Verify devices exist on the host: 'ls /dev/dri' should show card0 and renderD128.","If the host has no GPU, disable hardware acceleration (set HW acceleration to disabled in transcoding settings).","Load GPU kernel drivers on the host (e.g. modprobe i915) and add the container user to the 'render' and 'video' groups.","For unprivileged LXC, pass /dev/dri through the container config with proper cgroup device permissions."],"exampleFix":"// before (docker-compose.yml)\nservices:\n  immich-server:\n    # no devices\n// after\ndevices:\n  - /dev/dri:/dev/dri","handlingStrategy":"validation","validationCode":"const dri = fs.existsSync('/dev/dri') ? fs.readdirSync('/dev/dri') : [];\nif (dri.length === 0) throw new SkipTranscodeError('No /dev/dri devices available in this environment');","typeGuard":null,"tryCatchPattern":"try { await transcode(asset); } catch (e) { if (e.message.includes('/dev/dri')) { logger.warn('HW accel unavailable, falling back to CPU'); await transcodeCpu(asset); } else throw e; }","preventionTips":["Always mount /dev/dri into GPU-accelerated containers","Smoke-test with 'ls /dev/dri' in the container on every deploy","Keep a CPU-transcode fallback path for hosts without GPUs"],"tags":["hardware-acceleration","docker","gpu","configuration"],"backgroundTag":"missing-dependency","analyzedSha":"e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c","analyzedAt":"2026-09-15T07:20:19.675Z","contentChangedAt":"2026-09-15T07:20:19.675Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}