Ubuntu 24.04: mmc0: running CQE recovery

Hi all,

I am running Ubuntu Server 24.04 on a Radxa X4 with 32gb of eMMC. After a few days the device would lockup with an error that the file system is in read only mode. When looking at the logs The kernel logs are littered with “mmc0: running CQE recovery”. It appears there is some issue with the eMMC support in Ubuntu with regards to NCQ.

I am posting this here incase anyone experiences the same issue. As a work around I was able to fix this using the following to disable the CQE:

  1. edit /etc/default/grub

    sudo nano /etc/default/grub

  2. Find the line “GRUB_CMDLINE_LINUX_DEFAULT” and insert “sdhci.debug_quirks=0x20000” in the “”. Do not remove anything already there.

    GRUB_CMDLINE_LINUX_DEFAULT="sdhci.debug_quirks=0x20000" or
    GRUB_CMDLINE_LINUX_DEFAULT="sdhci.debug_quirks=0x20000 some.exsting=commands"

  3. Update Grub

    sudo update-grub

  4. Reboot

This should take care of the eMMC errors but it is only a work around and not a fix.