RPi kernel upgrade problem


Basil Gunn
 

The following describes a problem with the Linux 5.10.11 kernel and how to
mitigate it. Following the problem description is a procedure that will
keep your system running while I try to figure out what is causing the
problem.

There is a problem with the latest shipping Raspberry Pi OS kernel,
5.10.11 #1399

1. 5.10.11 kernel on a cold boot

The only symptom is from dmesg output because DRAWS card is enumerated.

dmesg | grep -i "tlv320aic"
tlv320aic32x4 1-0018: ASoC: error at soc_component_write_no_lock on tlv320aic32x4.1-0018: -5

2. 5.10.11 kernel on a warm boot, DRAWS card is NOT enumerated and
dmesg has a lengthy back-trace summarized here:

dmesg output kernel version 5.10.11 #1399 January 29, 2021

WARNING: CPU: 1 PID: 273 at lib/refcount.c:25 refcount_warn_saturate+0x108/0x174
refcount_t: addition on 0; use-after-free.

tlv320aic32x4 1-0018: Failed to get clk 'bdiv': -2
tlv320aic32x4 1-0018: ASoC: error at snd_soc_component_probe on tlv320aic32x4.1-0018: -2
tlv320aic32x4 1-0018: ASoC: failed to probe component -2
asoc-simple-card soc:sound: ASoC: failed to instantiate card -2
asoc-simple-card: probe of soc:sound failed with error -2

3. Using older (Nov 23 13:27:40 GMT 2020) 5.4.79 kernel, DRAWS card is
enumerated and dmesg has NO errors.

dmesg | grep -i "tlv320aic"
asoc-simple-card soc:sound: tlv320aic32x4-hifi <-> 3f203000.i2s mapping ok

Running script 'buginfo.sh' will tell you if you have a problem kernel or not.

If you are running with some 5.10.x kernel you need to install the
older 5.4.79 kernel by using the following console command:

sudo rpi-update 0642816ed05d31fb37fc8fbbba9e1774b475113f

Then reboot & verify by running 'buginfo.sh' script.

Once you have a "good" kernel you need to put a hold on any kernel
updates by doing the following in a console:

sudo su
apt-mark hold libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0
apt-mark hold raspberrypi-bootloader raspberrypi-kernel raspberrypi-kernel-headers

Verify by running this:

apt-mark showhold

You should see the following:

libraspberrypi-bin
libraspberrypi-dev
libraspberrypi-doc
libraspberrypi0
raspberrypi-bootloader
raspberrypi-kernel

Now you can safely get updates for packages without updating the kernel.

apt-get update
apt-get upgrade

The current nwdr19.img.xz image at:
http://images.nwdigitalradio.com/downloads/

dated 2021-Feb-16 with md5sum 74343a95dc6614c256b7e36d7d76518e already
has the kernel hold in place.

/Basil n7nix

Join udrc@nw-digital-radio.groups.io to automatically receive all group messages.