Page 1 of 1

I2C changes and NACK messages in kernel 6.16 and up

Posted: Fri Aug 15, 2025 4:58 pm
by Hypex
Hi guys.

So thought I"d open a thread specifically about I2C messages that appear since changes made to I2C code in kernel 6.16.

Thanks to xeno74 for sharing about i2cdetect command which can help. Which is part of the i2c-tools suite. In case it's not installed on your system, as it wasn't on mine.

Note that on modern Debian and based systems i2cdetect may not be in your shell path. This relates to changes made to shell system paths but it can be annoying to deal with. Supposedly it should be there in a root shell but I didn't do that. I'm just used to using sudo which is like an "Ubuntuism" but that won't help tabbing in a rootless shell. :-)

So here's a list of I2C devices as reported by an i2cdetect -l command:

Code: Select all

i2c-0	unknown   	Radeon i2c bit bus 0x90         	N/A
i2c-1	unknown   	Radeon i2c bit bus 0x91         	N/A
i2c-2	unknown   	Radeon i2c bit bus 0x92         	N/A
i2c-3	unknown   	Radeon i2c bit bus 0x93         	N/A
i2c-4	unknown   	Radeon i2c bit bus 0x94         	N/A
i2c-5	unknown   	Radeon i2c bit bus 0x95         	N/A
i2c-6	unknown   	Radeon i2c bit bus 0x96         	N/A
i2c-7	unknown   	Radeon i2c bit bus 0x97         	N/A
i2c-8	unknown   	PA Semi SMBus adapter (0000:00:1c.0)	N/A
i2c-9	unknown   	PA Semi SMBus adapter (0000:00:1c.1)	N/A
i2c-10	unknown   	PA Semi SMBus adapter (0000:00:1c.2)	N/A
Next I checked for i2c messages in system log:

Code: Select all

damien@debian:~$ dmesg | grep i2c
[    8.919599] i2c_dev: i2c /dev entries driver
[    8.973935] i2c-pasemi 0000:00:1c.0: NACK, status 0x08210100
[    8.985731] i2c i2c-8: Detected TI TMP423 chip at 0x4c
[    9.004937] i2c-pasemi 0000:00:1c.0: NACK, status 0x08210100
[    9.019684] i2c-pasemi 0000:00:1c.0: NACK, status 0x08210100
[    9.043933] i2c-pasemi 0000:00:1c.0: NACK, status 0x08210100
[    9.051931] i2c-pasemi 0000:00:1c.1: NACK, status 0x08210100
[    9.061739] i2c-pasemi 0000:00:1c.1: NACK, status 0x08210100
[    9.074995] i2c-pasemi 0000:00:1c.1: NACK, status 0x08210100
[    9.092947] i2c-pasemi 0000:00:1c.1: NACK, status 0x08210100
[    9.099951] i2c-pasemi 0000:00:1c.1: NACK, status 0x08210100
[    9.121934] i2c-pasemi 0000:00:1c.2: NACK, status 0x08210100
[    9.129954] i2c-pasemi 0000:00:1c.2: NACK, status 0x08210100
[    9.154773] i2c-pasemi 0000:00:1c.2: NACK, status 0x08210100
[    9.165687] i2c-pasemi 0000:00:1c.2: NACK, status 0x08210100
[    9.176944] i2c-pasemi 0000:00:1c.2: NACK, status 0x08210100
There's quite a few NACK messages in there. Looks more than when I first noticed back in a 6.16 alpha. What are those devices on the bus?

We are given a clue in dmesg log with device at i2c-8. It's a TI TMP423: This is a temperature sensor:
https://www.ti.com/product/TMP423

We can ask i2cdetect for a list of functionalities:

Code: Select all

damien@debian:~$ sudo /usr/sbin/i2cdetect -F 8
Functionalities implemented by /dev/i2c-8:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Block Write                yes
SMBus Block Read                 yes
SMBus Block Process Call         yes
SMBus PEC                        no
I2C Block Write                  no
I2C Block Read                   no
SMBus Host Notify                no
10-bit addressing                no
Target mode                      no
damien@debian:~$ sudo /usr/sbin/i2cdetect -F 9
Functionalities implemented by /dev/i2c-9:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Block Write                yes
SMBus Block Read                 yes
SMBus Block Process Call         yes
SMBus PEC                        no
I2C Block Write                  no
I2C Block Read                   no
SMBus Host Notify                no
10-bit addressing                no
Target mode                      no
damien@debian:~$ sudo /usr/sbin/i2cdetect -F 10
Functionalities implemented by /dev/i2c-10:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Block Write                yes
SMBus Block Read                 yes
SMBus Block Process Call         yes
SMBus PEC                        no
I2C Block Write                  no
I2C Block Read                   no
SMBus Host Notify                no
10-bit addressing                no
Target mode                      no
The sensors command as part of the lm-sensors package can be used to read and show the sensors. It also includes sensors-detect command which can probe for more info about the sensors. Unfortunately the readings I collected earlier are missing from the files I stored all the info in on my USB stick. So will post these later in the next part. However I think it's already quite informative. And a good opportunity for people to post their readings. So I can compare later to see if mine are nominal.

Re: I2C changes and NACK messages in kernel 6.16 and up

Posted: Fri Aug 15, 2025 8:21 pm
by Hypex
Okay so I'm back with some more readings. Seeing what sensors and sensors-detect gives me:

Code: Select all

damien@ubuntu:~$ sensors
radeon-pci-0100
Adapter: PCI adapter
temp1:        +31.0°C  (crit = +120.0°C, hyst = +90.0°C)
pwm1:             30%
freq1:        750 MHz 

tmp423-i2c-8-4c
Adapter: PA Semi SMBus adapter (0000:00:1c.0)
temp1:        +34.1°C  
temp2:        +51.4°C  
temp3:        +51.3°C  
temp4:        +45.4°C  
Doesn't look too bad and now I have some info on that device showing up in dmesg.

Let's dig further:

Code: Select all

damien@ubuntu:~$ sudo /usr/sbin/sensors-detect
# sensors-detect version 3.6.2
# DMI data unavailable, please consider installing dmidecode 2.7
# or later for better results.
# Kernel: 6.15.0-powerpc64-smp ppc64
# Processor: PA6T, altivec supported (1.2 (pvr 0090 0102))

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): 
modprobe: FATAL: Module cpuid not found in directory /lib/modules/6.15.0-powerpc64-smp
Failed to load module cpuid.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Hygon Family 18h thermal sensors...                         No
AMD Family 19h thermal sensors...                           No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): 
Using driver `i2c-piix4' for device 0000:05:14.0: ATI Technologies Inc SB600/SB700/SB800 SMBus
modprobe: FATAL: Module i2c-piix4 not found in directory /lib/modules/6.15.0-powerpc64-smp
Failed to load module i2c-piix4.
Found unknown SMBus adapter 1959:a003 at 0000:00:1c.2.

Next adapter: PA Semi SMBus adapter (0000:00:1c.0) (i2c-8)
Do you want to scan it? (YES/no/selectively): 
Adapter cannot be probed, skipping.
Next adapter: PA Semi SMBus adapter (0000:00:1c.1) (i2c-9)
Do you want to scan it? (YES/no/selectively): 
Adapter cannot be probed, skipping.
Next adapter: PA Semi SMBus adapter (0000:00:1c.2) (i2c-10)
Do you want to scan it? (YES/no/selectively): 
Adapter cannot be probed, skipping.
Sorry, no sensors were detected.
Either your system has no sensors, or they are not supported, or
they are connected to an I2C or SMBus adapter that is not
supported. If you find out what chips are on your board, check
https://hwmon.wiki.kernel.org/device_support_status for driver status.
Here it also found my Radeon but I cut it out of the results above. So, that doesn't look as useful. It was unable to find the sensor chipset and failed to find some modules.

I tried to take its advice but it looks like lm-sensors needs updating:

Code: Select all

damien@ubuntu:~$ sudo apt install dmidecode
Package dmidecode is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Error: Package 'dmidecode' has no installation candidate
My initial tests were ran on Mint using 6.17-rc1 kernel. The tests in this post were ran from Debian using kernel 6.15.0. I would have continued using Mint but unfortunately a recent update broke the system. I can switch my Debian to 6.17-rc1 in case it matters for more testing.

I checked my modules which do exist and both cpuid and i2c-piix4 are missing. Christian? :?:

Re: I2C changes and NACK messeges in kernel 6.16 and up

Posted: Sat Aug 16, 2025 10:08 am
by xeno74
Hypex wrote: Fri Aug 15, 2025 8:21 pm I checked my modules which do exist and both cpuid and i2c-piix4 are missing. Christian? :?:
Many thanks for reporting your test results.

I will add the i2c-piix4 (CONFIG_I2C_PIIX4) kernel module for the ATi SB600 I2C interfaces to the RC2 of kernel 6.17. The cpuid kernel module is x86 only.

Re: I2C changes and NACK messages in kernel 6.16 and up

Posted: Sat Aug 16, 2025 3:36 pm
by Hypex
I look forward to it, thanks. If we do not have cpuid then looks like ppc build shouldn't look for it. Or if there is a ppc equivalent it should look for that instead but it does look x86 specific.

Re: I2C changes and NACK messages in kernel 6.16 and up

Posted: Sun Aug 17, 2025 1:48 pm
by sailorMH
thanks for i2c news!

also here viewtopic.php?p=57069#p57069 is sensors.conf, with real names of X1000 CPU sensors

Re: I2C changes and NACK messages in kernel 6.16 and up

Posted: Sun Aug 17, 2025 7:39 pm
by Hypex
Great. You've put work into the sensors before. Thanks for linking in the thread. :-)

Re: I2C changes and NACK messages in kernel 6.16 and up

Posted: Tue Aug 19, 2025 6:27 am
by xeno74
For Void PPC:

Code: Select all

xbps-install -S i2c-tools

Code: Select all

i2cdetect -l
Output:

Code: Select all

i2c-0	i2c       	Radeon i2c bit bus 0x90         	I2C adapter
i2c-1	i2c       	Radeon i2c bit bus 0x91         	I2C adapter
i2c-2	i2c       	Radeon i2c bit bus 0x92         	I2C adapter
i2c-3	i2c       	Radeon i2c bit bus 0x93         	I2C adapter
i2c-4	i2c       	Radeon i2c bit bus 0x94         	I2C adapter
i2c-5	i2c       	Radeon i2c bit bus 0x95         	I2C adapter
i2c-6	i2c       	Radeon i2c bit bus 0x96         	I2C adapter
i2c-7	i2c       	Radeon i2c bit bus 0x97         	I2C adapter
i2c-8	i2c       	card0-DP-1                      	I2C adapter
i2c-9	i2c       	PA Semi SMBus adapter (0000:00:1c.0)	I2C adapter
i2c-10	i2c       	PA Semi SMBus adapter (0000:00:1c.1)	I2C adapter
i2c-11	i2c       	PA Semi SMBus adapter (0000:00:1c.2)	I2C adapter
i2c-12	i2c       	bt878 #0 [sw]

Code: Select all

sensors
Output:

Code: Select all

radeon-pci-0100
Adapter: PCI adapter
GPU1 :        +37.0°C  (crit = +120.0°C, hyst = +90.0°C)

tmp423-i2c-9-4c
Adapter: PA Semi SMBus adapter (0000:00:1c.0)
Case Temp:    +34.4°C  
Core0 Temp:   +53.1°C  
Core1 Temp:   +51.4°C  
SB600 Temp:   +46.0°C

Code: Select all

dmesg | grep piix4
Output:

Code: Select all

[    7.735145] piix4_smbus 0000:05:14.0: SMBus Host Controller not enabled!
I see. piix4_smbus isn't connected to the SB600 but the PA Semi SMBus adapter is connected to the SB600. Interesting ;-)

Re: I2C changes and NACK messages in kernel 6.16 and up

Posted: Tue Aug 19, 2025 6:05 pm
by Hypex
xeno74 wrote: Tue Aug 19, 2025 6:27 amFor Void PPC:
Great, thanks for the results!

I should probably get a Void setup going one of these days. :-)

Now I notice you have some extra slots filled with what looks like some extra card and a TV card.

Mine is simpler. But on Zesty i2cdetect prints it all all out of order for some reason. Had to pass through sort.

Code: Select all

amigaone@ubuntu:~$ sudo i2cdetect -l | sort -V
i2c-0	i2c       	Radeon i2c bit bus 0x90         	I2C adapter
i2c-1	i2c       	Radeon i2c bit bus 0x91         	I2C adapter
i2c-2	i2c       	Radeon i2c bit bus 0x92         	I2C adapter
i2c-3	i2c       	Radeon i2c bit bus 0x93         	I2C adapter
i2c-4	i2c       	Radeon i2c bit bus 0x94         	I2C adapter
i2c-5	i2c       	Radeon i2c bit bus 0x95         	I2C adapter
i2c-6	i2c       	Radeon i2c bit bus 0x96         	I2C adapter
i2c-7	i2c       	Radeon i2c bit bus 0x97         	I2C adapter
i2c-8	i2c       	PA Semi SMBus adapter (0000:00:1c.0)	I2C adapter
i2c-9	i2c       	PA Semi SMBus adapter (0000:00:1c.1)	I2C adapter
i2c-10	i2c       	PA Semi SMBus adapter (0000:00:1c.2)	I2C adapter
My sensors now:

Code: Select all

amigaone@ubuntu:~$ sensors
radeon-pci-0100
Adapter: PCI adapter
temp1:        +30.0°C  (crit = +120.0°C, hyst = +90.0°C)

tmp423-i2c-8-4c
Adapter: PA Semi SMBus adapter (0000:00:1c.0)
temp1:        +33.9°C  
temp2:        +51.2°C  
temp3:        +51.0°C  
temp4:        +45.2°C  
I see. piix4_smbus isn't connected to the SB600 but the PA Semi SMBus adapter is connected to the SB600.
That would seem to make no sense. :D