mvdm
Posts: 21
Joined: Fri Nov 25, 2016 1:34 pm

Unable to disable I2c in Jessie Pixel

Sat Aug 05, 2017 5:09 pm

Hi,

I'm not entirely sure why, but I'm suddenly unable to disable the I2C driver in Jessie with Pixel.

I have tried sudo raspi-config but when I reboot its back on, so I tried preferences/Raspberry Pi Configuration/Interfaces but its the same deal. When I launch the app again its enabled, or if I reboot its enabled.

So I tried commenting out i2c-dev in /etc/modules and dtparam=i2c_arm=on in /boot/config.txt but it just seems to uncomment it self after reboot. i have confirmed the files are being saved by using cat and they are saved correctly. I have also then tried to delete those strings from the file but they seem to append at the bottom of the file after reboot enabling I2C again.

I'm dumbstruck as to what would do this.

pcmanbob
Posts: 6618
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Unable to disable I2c in Jessie Pixel

Sat Aug 05, 2017 8:09 pm

Hi.

It sounds like you SD card might have gone read only.

To test this create a file in /home/pi folder some thing like test.txt will do, once you are sure its there reboot your pi if the file disappears then your SD card has gone read only and you will need a new SD card.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

mvdm
Posts: 21
Joined: Fri Nov 25, 2016 1:34 pm

Re: Unable to disable I2c in Jessie Pixel

Sat Aug 05, 2017 9:23 pm

Hi pcmanbob,

The SD card is definitely not in read only mode because the terminal stores all my old commands after reboot, and if I try deleting the entire string with the setting, but it just magically reappears at the bottom of the file after reboot. But I have also tried creating a text file in my home folder with some text in it and its still there after reboot, just to be sure. I also tried to blacklist the I2C drivers in /etc/modprobe.d/raspi-blacklist.conf as a last ditch effort, but the system places a comment before it automatically after reboot.

I read somewhere that pigpio can do something like this so I uninstalled it, but the problem still remains.
Is there any way to identify what exactly is doing this?

mvdm
Posts: 21
Joined: Fri Nov 25, 2016 1:34 pm

Re: Unable to disable I2c in Jessie Pixel

Sun Aug 06, 2017 9:09 am

I did the following to some of the config files as a quick fix, but it doesn't work on /boot

sudo chattr +i /etc/modprobe.d/raspi-blacklist.conf
sudo chattr +i /etc/modules

However for sudo chattr +i /boot/config.txt i get the following:
chattr: Inappropriate ioctl for device while reading flags on /boot/config.txt

This did the trick for raspi-blacklist.conf and modules but how do I deny what ever script is trying to change /boot/config.txt from being changed. I'm also not sure if that will solve my problem.

User avatar
DougieLawson
Posts: 35778
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Unable to disable I2c in Jessie Pixel

Sun Aug 06, 2017 9:27 am

You need to remove the

Code: Select all

dtparam=i2c_arm=on
line from /boot/config.txt and reboot.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Interfacing (DSI, CSI, I2C, etc.)”