I have 18.04.5 LTS installed (server version).

I need opencl support. I tried installing AMD GPU driver, version 20.40, which is designated to work with this version of Ubuntu:


I ran this command to install the driver.

./amdgpu-pro-install --headless --opencl=pal,legacy

I always get the same result:

Building initial module for 4.15.0-135-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms.0.crash'
Error! Bad return status for module build on kernel: 4.15.0-135-generic (x86_64)

From the make.log file:

  LD [M]  /var/lib/dkms/amdgpu/
  CC [M]  /var/lib/dkms/amdgpu/
  CC [M]  /var/lib/dkms/amdgpu/
/var/lib/dkms/amdgpu/ In function ‘amdgpu_read_platform_bios’:
/var/lib/dkms/amdgpu/ error: implicit declaration of function ‘pci_platform_rom’; did you mean ‘pci_map_rom’? [-Werror=implicit-function-declaration]
  bios = pci_platform_rom(adev->pdev, &size);

Was anyone successful in installing these drivers, and with which kernel version? Does anyone know how to solve this error?

  • There's more information in /var/crash/amdgpu-dkms.0.crash. It's a text file, read it with less. Move the file to some other directory and rerun to get a current crash dump.
    – waltinator
    Feb 22, 2021 at 1:03
  • Telling us which remote procedure (RP) you "followed" doesn't help us help you for N reasons: 1) It's remote. Will the link exist tomorrow? 2) Reading the RP doesn't tell us how accurately you "followed" it. Did you suffer typos or missed lines? We have. 3) Reading the RP omits the error messages you got on your system. These error messages (and the commands that caused them) are key elements in any diagnosis.
    – waltinator
    Feb 22, 2021 at 1:04
  • The 18.04 is a fresh install of Ubuntu. To install the driver, I ran only the command that I wrote above. The only error message is the one that I showed above. The only relevant part of the compilation log is the one I showed above. These are sufficient to answer the question.
    – axel22
    Feb 22, 2021 at 22:12

1 Answer 1


Install the driver with the following command:

./amdgpu-pro-install --headless --opencl=pal,legacy --no-dkms

This will not build the kernel module, and prevent the error from happening. I seem to be able to use OpenCL with the device now, although I'm not sure what the consequence of not building the kernel module is.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .