The Problem
After updating Home Assistant OS to version 12.4 on a Raspberry Pi with a Z-Wave stick, the system keeps crashing. Upon further research, I discovered that this issue is related to a Linux kernel bug.
More information can be found here:
The fix
We need to load a different driver.
- Power down the PI
- Remove the SD card and put it in a Windows PC
- Open File Explorer and click on hassos-boot
Add the following line ( before [all] ) dtoverlay=dwc2
- Save the file
- Put the SD card back in the Pi and boot the PI
It should now work as expected.
Fix without using Windows
You can also do this within home assistant but make sure you have disable protection mode on the add-on Advanced SSH & Web Terminal ( Settings -> Add-ons )
A quick how-to so you don’t have to remove the SD Card to edit config.txt.
- SSH In, or open a Terminal window through Home Assistant. You may need to use the Advanced SSH & Terminal add-on, but I don’t really know because I haven’t tried it with the other one.
- Run the following commands:
docker exec -it $(docker ps -f name=homeassistant -q) bash
cd /mnt
mkdir boot
fdisk -l
- Take the “Disk” at the top and add “p1” to the end of it for the next command. My disk was “/dev/mmcblk0” so in my mount command it became /dev/mmcblk0p1 to mount the first partition, which is the boot partition.
sudo mount /dev/mmcblk0p1 /mnt/boot
cd /mnt/boot
sudo vi config.txt
- Press the
i
key and find a blank line somewhere in the file before [all]. You can literally put this anywhere. - Add the following line:
dtoverlay=dwc2
- Hit
ESC
- Type
:wq
- Close the shell, and you’re done. Now you can update Home Assistant and it should start up using the dwc2 driver.
Als reboot the pi after all these steps and update to make sure it is running