Got a lot of I2C alerts from my rebuilt Bianbu kernel v1.0.13

I rebuilt the Bianbu kernel v1.0.13 to enable CONFIG_MTD_CMDLINE_PARTS=y because I want to flash u-boot without using fastboot. Additionally, I added more drivers and networking modules. However, I am encountering numerous error messages in dmesg:

[   71.271014] i2c-spacemit-k1x d401d800.i2c: msg completion timeout
[   71.278033] i2c-spacemit-k1x d401d800.i2c: bus reset, send clk: 0
[   71.284390] i2c-spacemit-k1x d401d800.i2c: i2c transfer retry 1, ret -110 mode 0 err 0x0

Did I do something wrong, and how can I fix it?

FYI: The mtdparts and flashing u-boot via flashcp work well.

1 Like

This i2c bus is the one that’s connected to the power management IC on the board.

Did you happen to change your cpufreq governor? I’ve seen this issue when using a cpufreq governor other than performance. It seems like the constant changes to power delivery triggered by dynamic frequency scaling overwhelm either the i2c bus or the power management ic.

1 Like

Interestingly, I actually changed my CPU governor to “conservative” to keep it cooler in a hot room without AC.

1 Like

Update: The I2C warning messages disappeared after I set the governor to “performance,” but I feel like this isn’t the correct solution. Why make a frequency-scalable CPU only to have it fixed at maximum frequency all the time?

1 Like

there was some discussion about the remoteproc firmware doing strange things also related to cpu governor - just search #riscv on 2024-10-21 — irc logs at libera.irclog.whitequark.org for remoteproc to find the relevant discussions (spread across multiple days) - might be worth reading maybe?

2 Likes

Update: The “conservative” setting does not cause the problem, but the “ondemand” setting is the one that causes I2C warning messages.

1 Like

The “conservative” governor does adjustments to the cpu speed much less often than the “ondemand” governor, so it’s far less likely to trigger this issue. But I tried it for a while, and I still did see the same I2C warning messages pop up occasionally.

2 Likes

After set to conservative, I never see that i2c alerts again, and it’s already 4 days since my Jupiter powered on.