How to Enable I2C on Pi4

Hello,

Yesterday there was a new update available, I installed it, but after it rebooted automatically it got stuck in a sad face loop on boot. As a result I couldn’t recover so I had to format my SD card and start over.

I have an Argon40 Argon One M.2 Case for my Raspberry Pi4, this has fan control, and power off control, which is achieved through I2C communication. If I don’t turn on i2c the fan doesn’t work, and if I press the power button on the remote or on the enclosure it just cuts the power to the Pi instead of shutting it down, which is not a very good practice.

In the past I put dtparam=i2c_arm=on in config.txt to enable I2C, but this doesn’t work.
I have also tried it in config-user.txt, as reccomended on the forum, at first but this also did nothing.

There is no i2c under dev and sudo i2cdetect -y 1 or sudo i2cdetect -y 2doesn’t find anything. Normally you would do this under raspi-config but its disabled under OSMC and instructs you to use the My OSMC app instead, which in turn has no I2C setting :frowning:

Is i2c no longer available since the latest update, or do you enable it somewhere else now or do you enable it with some other method now?

I have OSMC July 2023 2023.07-1 I uploaded the logs https://paste.osmc.tv/inejidevoh

Many thanks in advance

`

Update if I do a sudo modprobe i2c-dev then sudo i2cdetect -y 1
I get:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

But as soon as I reboot it no longer works and I have to do sudo modprobe i2c-dev again. I guess this is why the Argon One Daemon doesn’t work.

What is the correct procedure for enabling i2c on OSMC?

Ok, I added i2c-dev to /etc/modules . It seems that i2cdetect now lists the device after reboot. Is this all that is needed and is it the correct procedure for enabling i2c on OSMC?