I created an Ubuntu 18.04 headless image and flashed into eMMC on Nvidia Jetson nano module. After booting up, the i2c devices i2c-0, i2c-1, i2c-101, i2c-2, …, i2c-8 are listed in the folder of /dev/ as root user and root group instead of i2c group. No i2c group is available. I manual added i2c group by
sudo groupadd --system i2c
add user to i2c group and changed the i2c- dev group from root to i2c by
sudo chown root:i2c /dev/i2c-*
I checked. Its group has been changed to i2c
crw------- 1 root i2c 89, 0 Sep 23 07:45 /dev/i2c-0
I also applied the command below to i2c devices
sudo chmod a+rw /dev/i2c-*
After this, I tested the i2c. It works. But after reboot, the i2c-* changed back to root group again.
crw------- 1 root root 89, 0 Sep 23 07:45 /dev/i2c-0
what’s wrong with it? How can I fix it before flash the image into device?