Open f18m opened 6 months ago
@waveform80 what's the state of play for Pi 4 these days?
See also #1132
Has a solution to this issue been found? I've run into the exact same problem with the same error messages. I only get this error when running a script that uses any input device. I am able to blink an led fine. I uninstalled gpiozero and RPi.GPIO and then installed gpiozero again with pigpio. Pigpio seems to be really complicated to figure out though. What's the simplest solution here if all I want to do is read a button?
Same problem here. I have a third party Dragino HAT which uses the offending GPIO so I can't change it. . I do not want to run the code using sudo nor downgrade (Though I may have to)
Any reason not to use lgpio as the pin factory?
Having said that, I have issues with using lgpio for buttons too, and would suggest trying gpiod but it is only at the PR request stage (#1165).
I switched to pygpio and that works ok.
Operating system: Raspbian Bookworm, with kernel 6.6.20+rpt-rpi-v8 Python version: 3.11 Pi model: Pi 4 Model B GPIO Zero version: 2.0.1 Pin factory used: RPi.GPIO 0.7.1
The basic snippet below
fails with error
A few points:
there are already SIMILAR (but confused IMHO) issues open on this topic. I spent time reading them with no much success, so opening this one that, I hope, will help others
Searching online my understanding is that in latest Linux kernel the sysfs interface for GPIOs has been removed, and most of the GPIO factory libraries are still trying to use it, like RPI.GPIO.
I already managed to work-around the problem by using pigpio library as GPIO factory.
My suggestion: change documentation to clearly state that at this point in time, if you are on Bookworm and using a recent Linux kernel (would be nice to find out the exact Linux version since the sysfs deprecation), you MUST switch to pigpio library.