Skip to content

I²C devices not detected, "lost arbitration" spam in dmesg #7104

Closed

Description

@atxpixel

Describe the bug

On my Raspberry Pi 5 running the latest Debian Trixie build, I²C devices are not detected even though i2c_arm is enabled.

/boot/firmware/config.txt
dtparam=i2c_arm=on
dtparam=i2c_baudrate=100000

Steps to reproduce the behaviour

Connect a known working I²C device to GPIO2 (SDA1) and GPIO3 (SCL1)

Run:
sudo i2cdetect -y 1

No devices appear on the bus.

dmesg shows repeated messages:
i2c_designware 1f00074000.i2c: i2c_dw_handle_tx_abort: lost arbitration

Pulling SDA low makes i2cdetect -y 1 taking a long time to load, then still returns empty.

dmesg adds:
i2c_designware 1f00074000.i2c: controller timed out

Pinmux:
GPIO2: a3 pu | hi (SDA1)
GPIO3: a3 pu | hi (SCL1)

Device (s)

Raspberry Pi 5

System

https://pastebin.com/RK9e2aQ1

Logs

i2c_designware 1f00074000.i2c: i2c_dw_handle_tx_abort: lost arbitration

Additional context

No response

Activity

  1. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    Connect a known working I²C device to GPIO2 (SDA1) and GPIO3 (SCL1)

    I've connected a known working I2C device to a Pi 5 running Trixie, and it works. Please list all the devices you tested that don't work.

  2. atxpixel commented on Oct 24, 2025

    @atxpixel
    Author

    -ads1115 module
    -TEA5767
    -RDA5807M

    None of them are working.
    I have 2 rpi5.

    All modules have sda and scl pull-up to 3v3

  3. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    All modules have sda and scl pull-up to 3v3

    Maybe they shouldn't - Pis have built in pull-ups on GPIOs 2 and 3. Are the devices attached by wires in such a way that you could use other pins? It would be interesting to try one of the other I2C buses on Pi 5.

    How are you driving the devices? That could determine how easy it will be to try a different bus

  4. atxpixel commented on Oct 24, 2025

    @atxpixel
    Author

    Yes, the module I’m using has 10k pull-ups to 3.3 V on both SDA and SCL.
    I didn’t realize the Pi5 already has internal pull-ups on GPIO2/3 — I can try removing the external ones or testing another I²C bus.

    Can you tell me which other I²C bus on the Pi5 is available and how to enable it in /boot/firmware/config.txt?

  5. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    These are the options:

    $ dtoverlay -a | grep -E "^\s*i2c.*pi5"
      i2c0-pi5
      i2c1-pi5
      i2c2-pi5
      i2c3-pi5
    $ dtoverlay -h i2c0-pi5
    Name:   i2c0-pi5
    
    Info:   Enable i2c0 (Pi 5 only)
    
    Usage:  dtoverlay=i2c0-pi5,<param>=<val>
    
    Params: pins_0_1                Use GPIOs 0 and 1 (default)
            pins_8_9                Use GPIOs 8 and 9
            baudrate                Set the baudrate for the interface (default
                                    "100000")
    
    $ dtoverlay -h i2c1-pi5
    Name:   i2c1-pi5
    
    Info:   Enable i2c1 (Pi 5 only)
    
    Usage:  dtoverlay=i2c1-pi5,<param>=<val>
    
    Params: pins_2_3                Use GPIOs 2 and 3 (default)
            pins_10_11              Use GPIOs 10 and 11
            baudrate                Set the baudrate for the interface (default
                                    "100000")
    
    $ dtoverlay -h i2c2-pi5
    Name:   i2c2-pi5
    
    Info:   Enable i2c2 (Pi 5 only)
    
    Usage:  dtoverlay=i2c2-pi5,<param>=<val>
    
    Params: pins_4_5                Use GPIOs 4 and 5 (default)
            pins_12_13              Use GPIOs 12 and 13
            baudrate                Set the baudrate for the interface (default
                                    "100000")
    
    $ dtoverlay -h i2c3-pi5
    Name:   i2c3-pi5
    
    Info:   Enable i2c3 (Pi 5 only)
    
    Usage:  dtoverlay=i2c3-pi5,<param>=<val>
    
    Params: pins_6_7                Use GPIOs 6 and 7 (default)
            pins_14_15              Use GPIOs 14 and 15
            pins_22_23              Use GPIOs 22 and 23
            baudrate                Set the baudrate for the interface (default
                                    "100000")
    
    

    dtoverlay=i2c1,pins_10_11 (the -pi5 is automatically added) might be best, because then no other software changes should be required.

  6. atxpixel commented on Oct 24, 2025

    @atxpixel
    Author

    I've put dtoverlay=i2c1,pins_10_11 in boot/firmware/config.txt

    Connected SCL to GPIO 10, SDA to GPIO 11,and:

    mihnea@raspberrypi:~ $ sudo i2cdetect -y 1
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    dmesg doesn't report nothing.

    mihnea@raspberrypi:~ $ ls /dev/i2c*
    /dev/i2c-1  /dev/i2c-13  /dev/i2c-14
    
  7. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor
    1. What does pinctrl 10,11 report?
    2. Can you run pinctrl poll 10,11 in the background while you do the i2cdetect? What output do you get?
  8. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    FYI it is working for me, using pins 19 and 23 as SDA1 and SCL1:

    pi@raspberrypi:~$ sudo dtoverlay i2c1-pi5 pins_10_11
    pi@raspberrypi:~$ pinctrl 10,11
    10: a3    pu | hi // GPIO10 = SDA1
    11: a3    pu | hi // GPIO11 = SCL1
    pi@raspberrypi:~$ i2cdetect -y 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:                         -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --
    

    However, the module I'm using does not have external pull-ups. You might want to try again after disabling the GPIO pull-ups:

    $ pinctrl 10,11 pn
    
  9. atxpixel commented on Oct 24, 2025

    @atxpixel
    Author

    I've removed the external module pullups. No change.

    mihnea@raspberrypi:~ $ pinctrl 10,11
    10: a3    pu | hi // GPIO10 = SDA1
    11: a3    pu | hi // GPIO11 = SCL1
    

    pinctrl poll 10,11 when runing i2cdetect -y 1
    https://pastebin.com/fs4Bmj8B

    after "pinctrl 10,11 pn"
    i2cdetect takes a bit to load but still empty.

  10. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    The trace shows that the pins are waggling. I'm sorry to ask, but is your wiring definitely correct and to the correct pins?

  11. atxpixel commented on Oct 24, 2025

    @atxpixel
    Author

    No problem that you ask. I’ve triple checked if they are ok.

    Image
    Image

  12. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    It's worth checking that no other pins carry I2C1 signals - what does pinctrl 0-53 | grep -E '(SDA|SCL)' report?

  13. atxpixel commented on Oct 24, 2025

    @atxpixel
    Author

    Well...It works now. By mistake, i swapped the pins. So that GPIO 10 is with SDA and GPIO 11 is with SCL.

    mihnea@raspberrypi:~ $ i2cdetect -y 1
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    In this case, if i leave it like this, are there any disadvantages if I use "dtoverlay=i2c1,pins_10_11" such as speed limitations?

    LE:
    mihnea@raspberrypi:~ $ pinctrl 0-53 | grep -E '(SDA|SCL)'
    0: ip pu | hi // ID_SDA/GPIO0 = input
    1: ip pu | hi // ID_SCL/GPIO1 = input
    10: a3 pu | hi // GPIO10 = SDA1
    11: a3 pu | hi // GPIO11 = SCL1
    30: no pu | -- // HOST_SDA/GPIO30 = none
    31: no pu | -- // HOST_SCL/GPIO31 = none
    38: ip pd | hi // CD0_SDA/GPIO38 = input
    39: ip pd | hi // CD0_SCL/GPIO39 = input
    40: ip pd | hi // CD1_SDA/GPIO40 = input
    41: ip pd | hi // CD1_SCL/GPIO41 = input

  14. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    No, go ahead - all the I2C interfaces are equally capable.

  15. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    I do wonder if one of GPIO 2 & 3 is damaged. If you are still curious, remove the i2c1 overlay, put the wires back where they were, run pinctrl poll 2-3 in one shell and i2cdetect -y 1 in the other. Then confirm that both pins changed their values.

  16. atxpixel commented on Oct 24, 2025

    @atxpixel
    Author

    Removed the overlay.
    No device present in i2cdetect.

    dmesg shows a lot of i2c_designware 1f00074000.i2c: i2c_dw_handle_tx_abort: lost arbitration

    And the pinctrl poll: https://pastebin.com/cDmpr7pj

  17. pelwell commented on Oct 24, 2025

    @pelwell
    Contributor

    Thanks. That shows that pin 2 - SDA1 - never changes (although it's not clear if it is stuck high or low - pinctrl 2 would tell you). This definitely looks like a hardware fault.

  18. atxpixel commented on Oct 24, 2025

    @atxpixel
    Author

    I have 2 rpi5s that do the same thing, I'm starting to study the hardware problem. Maybe I need to look at the modules I'm connecting. Probably one of them broke both of them rpi’s…

    until then...thank you very much for the solution with dtoverlay, it works exceptionally and I can finish my project!

  19. pelwell commented on Oct 25, 2025

    @pelwell
    Contributor

    I'm putting this down to a damaged GPIO, and closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions