/etc/udev/rules.d/99-com.rules error

Topics about the Software of Revolution Pi
Post Reply
aladanh2000
Posts: 5
Joined: 04 Jan 2025, 20:00

/etc/udev/rules.d/99-com.rules error

Post by aladanh2000 »

I am new to RevPi.

I have a Raspberry Pi Compute Module 4 Rev 1.1
When I installed the image Bookworm, I got noticed by the error logs that appear every minute:


2:34 AM /etc/udev/rules.d/99-com.rules:7 Unknown group 'gpio', ignoring systemd-udevd
2:34 AM /etc/udev/rules.d/99-com.rules:4 Unknown group 'gpio', ignoring systemd-udevd
2:34 AM /etc/udev/rules.d/99-com.rules:3 Unknown group 'spi', ignoring systemd-udevd
2:34 AM /etc/udev/rules.d/99-com.rules:2 Unknown group 'i2c', ignoring systemd-udevd
2:34 AM /usr/lib/udev/rules.d/60-i2c-aliases.rules:8 Unknown group 'i2c', ignoring systemd-udevd

It causes the log page overflow and hard to check other log. What can I do to solve the error?
tboehler
KUNBUS
Posts: 3
Joined: 02 May 2023, 16:22

Re: /etc/udev/rules.d/99-com.rules error

Post by tboehler »

Hi!

These errors are due to the package raspberrypi-sys-mods being installed on RevPi systems. This package is currently partially required, though some parts are undesirable. The errors thrown here is one of the undesirables.

The error stems from the groups gpio, spi, and i2c not existing on RevPi systems. If they are present, the udev rules allow members of these groups to interact with the GPIO, SPI and I2C subsystems, respectively. This has some implications which is why these groups don't exist on RevPi systems. But this also means errors are thrown by udev, as you encountered.

There's no clean way to fix this, but there are workarounds. I assume you viewed the logs through journalctl. These errors can be filtered out when viewing logs with

Code: Select all

journalctl | grep -vE "Unknown group '(gpio|spi|i2c)'" | less
, though they are still present in the logs.

If you don't want these showing up in the logs at all you can comment out lines 2-4,7-9 in the file

Code: Select all

/etc/udev/rules.d/99-com.rules
by prefixing these lines with a hashtag (#). The file

Code: Select all

/usr/lib/udev/rules.d/60-i2c-aliases.rules
shouldn't be touched by a user due to it's location in /usr/lib, the error stemming from this file will thus still be present in the logs.

The last way to fix this, though not recommended, is to create the abovementioned groups with this small script snippet you can execute directly in your terminal connected to the RevPi:

Code: Select all

for group in gpio spi i2c; do sudo addgroup --system "$group"; done
I hope this at least helps with your issue.
Post Reply