I’m looking for a copy of the Volumio 3.396 image for Raspberry Pi. The current builds are running kernel 6.6, which appears to break GPIO edge detection via both RPi.GPIO and gpiozero. I’ve confirmed this issue through testing and community reports.
Version 3.396 is known to use the more stable 5.10 kernel, which supports GPIO event detection correctly.
If anyone has a backup of the 3.396 .img file (or a zip archive), I’d really appreciate a download link — Google Drive, Dropbox, anything works.
Hi @mtlinder . Thanks for this post, I’ve been hitting my head against this “Failed to add edge detection” for the last few hours. It appears that this is still an issue with Volumio version 3.832 when trying to use gpiozero. A couple of things:
How do you find out which version of the kernel is being used?
Has this been reported as a bug / issue?
Many thanks
Peter
If you’re using GPIO Zero with Linux kernel 6.6.x, edge detection may fail due to changes in how GPIO is handled in newer kernels. Here’s how to get it working:
Problem Summary
You might see errors like: RuntimeError: Failed to add edge detection
This happens because the sysfs GPIO interface was deprecated in kernel 6.6+, and libraries like RPi.GPIO (used by default in GPIO Zero) rely on it.
Solution: Switch Pin Factory
GPIO Zero supports multiple “pin factories”—you can switch to one that works with newer kernels.
Use lgpio or pigpio instead of RPi.GPIO
from gpiozero import Button
from gpiozero.pins.lgpio import LGPIOFactory
button = Button(26, pin_factory=LGPIOFactory())
button.when_pressed = lambda: print("Button pressed!")
Or with pigpio:
from gpiozero import Button
from gpiozero.pins.pigpio import PiGPIOFactory
button = Button(26, pin_factory=PiGPIOFactory())
button.when_pressed = lambda: print("Button pressed!")
Hi, thanks for the advice…I did wonder if changing the pin factory would help. I’ll give this a try over the next few days and report back.
Thanks agaoin.
Peter