Hi,
When using Bookworm on a Pi 5 with the latest kernel (6.12.96+rpt-rpi) available via apt the /dev/gpiochipX name is no longer fixed to /dev/gpiochip0 (with gpiochip4 symlinked).
For Pi 5 users on Bookworm this causes an error when using clusterctrl tool.
$ clusterctrl status
Traceback (most recent call last):
File "/usr/sbin/clusterctrl", line 379, in <module>
GPIO = FakeGPIO('gpiochip4')
^^^^^^^^^^^^^^^^^^^^^
File "/usr/sbin/clusterctrl", line 356, in __init__
self.chip = gpiod.Chip(chipname)
^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
For those running into the problem the following command updates clusterctrl to access the gpiochip by label rather than using a fixed device name.
sudo sed -i 's#self.chip = gpiod.Chip(chipname)#self.chip = gpiod.Chip("pinctrl-rp1", gpiod.Chip.OPEN_BY_LABEL)#' /usr/sbin/clusterctrl
Chris.