Rock Pi 4B+ disable serial console

Hi I’m trying to disable the serial console that is active on UART2.
When I edited the hw_intfc.conf to disable UART2 completely the kernel would not even boot.

I find it strange that after in dmesg the serial console is being disabled but being enabled almost instantly.

rock@rockpi4b:~$ sudo dmesg | grep tty
[    0.000000] Kernel command line: earlyprintk console=ttyFIQ0,1500000n8 rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8f774012-d27d-4050-ba66-60c0b08d099b console=ttyS2,1500000n8
[    0.323067] Registered FIQ tty driver
[    1.715496] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 35, base_baud = 1500000) is a 16550A
[    1.716085] console [ttyS2] disabled
[    1.716118] ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 36, base_baud = 1500000) is a 16550A
[    1.856528] console [ttyS2] enabled
[    1.857475] ff370000.serial: ttyS4 at MMIO 0xff370000 (irq = 38, base_baud = 1500000) is a 16550A
[    2.983453] ttyS2 - failed to request DMA, use interrupt mode
[    5.024779] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    6.713904] ttyS0 - failed to request DMA, use interrupt mode
[   35.674275] ttyS4 - failed to request DMA, use interrupt mode
Boot Tree
`rock@rockpi4b:/boot$ tree
.
|-- System\ Volume\ Information
|   |-- AadRecoveryPasswordDelete
|   `-- ClientRecoveryPasswordRotation
|-- System.map-4.4.154-112-rockchip-gfdb18c8bab17
|-- config-4.4.154-112-rockchip-gfdb18c8bab17
|-- dtbs
|   `-- 4.4.154-112-rockchip-gfdb18c8bab17
|       `-- rockchip
|           |-- ficus-linux.dtb

|           |-- rockpi-4a-linux.dtb
|           |-- rockpi-4b-linux.dtb
|           `-- rockpi-4c-linux.dtb
|-- extlinux
|   `-- extlinux.conf
|-- hw_intfc.conf
|-- initrd.img-4.4.154-112-rockchip-gfdb18c8bab17
|-- overlays
|   |-- at24c02.dtbo
|   |-- console-on-ttyS2.dtbo
|   |-- console-on-ttyS4.dtbo
|   |-- cpufreq.dtbo
|   |-- devspi1.dtbo
|   |-- devspi2.dtbo
|   |-- hifiberry-dac.dtbo
|   |-- hifiberry-dacplus.dtbo
|   |-- imx219.dtbo
|   |-- ov5647.dtbo
|   |-- pcie-gen2.dtbo
|   |-- raspberrypi-7-inch-lcd.dtbo
|   |-- spi1-flash.dtbo
|   |-- spi1-waveshare35b-v2.dtbo
|   |-- spi1-waveshare35c.dtbo
|   |-- two-color-led.dtbo
|   `-- w1-gpio4-30.dtbo
`-- vmlinuz-4.4.154-112-rockchip-gfdb18c8bab17`
hw_intfc.conf
# Hardware Interface Config

# For more details, check https://wiki.radxa.com/Rockpi4/hardware/devtree_overlays.

# Set "on" to enable the optional hardware interfaces while set "off" to disable.

intfc:pwm0=off
intfc:pwm1=off
intfc:uart2=on
intfc:uart4=on
intfc:spi1=off
intfc:spi2=off
intfc:i2c2=off
intfc:i2c6=off
intfc:i2c7=off

# Devicetree Overlay Enable, uncomment to enable .dtbo under /boot/overlays/.

# EEPROM on I2C2
#intfc:dtoverlay=at24c02

# Serial console on UART2
#intfc:dtoverlay=console-on-ttyS2

# Serial console on UART4
#intfc:dtoverlay=console-on-ttyS4

# Dummy spi device on SPI1 for test. Need set: intfc:spi1=on
#intfc:dtoverlay=devspi1

# Dummy spi device on SPI2 for test. Need set: intfc:spi2=on
#intfc:dtoverlay=devspi2

# PCIE running on GEN2 mode
#intfc:dtoverlay=pcie-gen2

# ALLNET 4duino B10/B11 two-coloe-led module on 40-pin Header Pin#35 and Pin#36
#intfc:dtoverlay=two-color-led

# waveshare 3.5inch lcd (B v2) on SPI1. Need set: intfc:uart4=off intfc:spi1=on
#intfc:dtoverlay=spi1-waveshare35b-v2

# waveshare 3.5inch lcd (C) on SPI1. Need set: intfc:uart4=off intfc:spi1=on
#intfc:dtoverlay=spi1-waveshare35c

# spi flash on SPI1. Need set: intfc:uart4=off intfc:spi1=on
# intfc:dtoverlay=spi1-flash

#hifiberry-dac
#intfc:dtoverlay=hifiberry-dac

#hifiberry-dacplus on I2C7. Need set: intfc:i2c7=on
#intfc:dtoverlay=hifiberry-dacplus

#enable raspberry pi official 7 inch LCD support
#intfc:dtoverlay=raspberrypi-7-inch-lcd

# setting cpu frequency over-2GHz
#intfc:dtoverlay=cpufreq

# Add imx219 camera module support. Need disabled ov5647 camera module.
#intfc:dtoverlay=imx219

# Add ov5647 camera module support. Need disabled imx219 camera module.
#intfc:dtoverlay=ov5647

# Add w1 on GPIO4_D6 to support devices such as DS18B20.
#intfc:dtoverlay=w1-gpio4-30

To my knowledge are all packages like rockchip-overlay, u-boot, kernel and rockpi4-dtbo up to date.
Linux version 4.4.154-113-rockchip-gdb9dfc2cdd25

Hey, I’m just running to this same issue. Did you find a solution? Thanks

Try this

  1. With one HDMI monitor connected to ROCK Pi 4B+, check if OS desktop shows.
  2. With one Ethernet cable connected to ROCK Pi 4B+, check the router if there is ROCK Pi 4B IP.

Sorry, I didn’t described my problem at full. I’m able to SSH in and install everything fine. My problem is that when trying to configure the UART2 and use ttyS2 as a serial port I have errors since the serial console is still enabled even when commenting this line intfc:dtoverlay=console-on-ttyS2 in the /boot/hw_intfc.conf file. I was able to confirm that the serial console is not getting disable by connecting a USB to TTL cable. And when running the same command as the OP, I get the same output. Setting up the UART4 works fine to me but somehow I can’t disable serial console in UART2. Thanks.

Try this:

Remove file /etc/default/console and reboot.

Hi Stephen,

Tried that but did not worked for me. I was able to solve the issue by modifying the extlinux.conf file and removing this part console=ttyS2,1500000n8 from this line append earlyprintk console=ttyFIQ0,1500000n8 rw init=/sbin/init rootfstype=ext4 rootwait root=UUID=bfa47b44-fe99-447c-aae7-beb5527b1cb4 console=ttyS2,1500000n8 and then rebooting. I hope that other people find it useful if they ran to the same issue.

Edit:
Make sure to enable serial console in ttyS4 in the hw_intfc.conf file.

Hi Chiwilly,

It has been a while that I looked at this but if I remember correctly it actually wouldn’t boot properly without a console when editing the extlinux.conf. I guess you transferred it to ttyS4 based on your edit but I would like to have both UART interfaces available if possible.

The initial U-boot startup may stay on ttyS2