Fix for "FileNotFoundError" when running clusterctrl on Pi 5

7 views
Skip to first unread message

ClusterHAT

unread,
Jul 31, 2026, 4:22:04 AM (4 days ago) Jul 31
to ClusterHAT
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.
Reply all
Reply to author
Forward
0 new messages