Kernel panic on RPi4 when uart enabled

Hi all,

Recently I tested few alternatives to Raspbian on my Pi4. I liked Manjaro. But there is issue which prevents me from using it… When I enable uart I can’t boot system. I am getting kernel panic. Has anyone had this situation and found any solution? I google this issue and found many post about it but no fix :frowning:

If you are talking about enable_uart=1 in config.txt I have only seen it work with the upstream kernel.

Yes exactly what I am talking about :slight_smile: Where I can find upstream kernels? How to install it?

You never really explained why you wanted uart enabled. If you just want to see text fly by at boot and get rid of the splash then the cmdline.txt needs to be modified.

Upstream kernel:

In our repo (linux or linux-rc). Install one of these kernels but before you reboot changes has to be made to cmdline.txt and config.txt. I make backups of each in my /boot so I can switch back and forth easily. Also xf86-video-fbdev has to be installed.

sudo pacman -S xf86-video-fbdev

My cmdline.txt for upstream:

root=PARTUUID=put-yours-here-02 rw rootwait console=ttyS1,115200 console=tty0 audit=0 snd_bcm2835.enable_headphones=1

My config.txt for upstream:

arm_freq=2000

device_tree=dtbs/broadcom/bcm2711-rpi-4-b.dtb
gpu_mem=512
initramfs initramfs-linux.img followkernel
kernel=Image
arm_64bit=1
disable_overscan=1

#enable sound
dtparam=audio=on
hdmi_drive=2
enable_uart=1

I have noticed that the sound is flaky if pulseaudio is installed but works well with pipewire So I uninstall pulseaudio and install pipewire.

[ray@pi4 ~]$ pacman -Ss pipewire | grep installed
extra/gst-plugin-pipewire 1:0.3.42-2 [installed]
extra/libpipewire02 0.2.7-2 [installed]
extra/pipewire 1:0.3.42-2 [installed]
extra/pipewire-alsa 1:0.3.42-2 [installed]
extra/pipewire-media-session 1:0.4.1-1 [installed]
extra/pipewire-pulse 1:0.3.42-2 [installed]
extra/pipewire-v4l2 1:0.3.42-2 [installed]
extra/pipewire-zeroconf 1:0.3.42-2 [installed]

I tested the latest linux-rc kernel a couple of days ago:

I need uart for two hats that are attached to my pi.
sudo pacman -S linux will be ok to install upstream kernel?
I don’t need audio so thats fine for me.

Yes but remember to make the changes listed above before rebooting.

Great! It worked, thanks for your help :slight_smile:

1 Like

I think I ran across a fix today for using enable_uart=1 in config.txt on the RPi kernels. Remove the kernel dbugger from cmdline.txt:

kgdboc=serial0,115200