On Tue, Mar 29, 2022 at 10:07:57AM +0200, Hans Kurscheidt wrote: > > Am 29.03.2022 um 05:38 schrieb Kent Gibson: > > On Mon, Mar 28, 2022 at 07:13:13PM +0200, Hans Kurscheidt wrote: > > > Am 28.03.2022 um 15:16 schrieb Hans Kurscheidt: > > > > Hi, > > > > > > > > what would be the right mode for gpiomon call from > > > > > > > > a shellscript executed as root from systemd at system start > > > > > > > > waiting on a Pin w/ pullup for invoking shutdown upon rising* edge. > > > > *changed > > > > > > > > > > > > Lots of interupts, Signals and other GPIO ongoing from other user APPs & > > > > threads in multi-user state. > > > 2b more precise: I wired a GPIO Pin to GND. > > > > > > Upon the cmd: sudo gpiomon -r -n1 <chip> <offset> > > > > > > the program exits immediately with 1 event, although there was never a > > > rising edge due to the fix wire to GND. Is this a feature or a bug, and is > > > it reproducible? > > > > > Not a feature and not reproducible for me on a Raspberry Pi4 with the > > setup you describe, so probably a bug specific to your hardware platform, > > whatever that may be. > > > > If it is 100% reproduceable for you, and assuming it is an initialisation > > issue so you only get the one spurious event, how about using -n2 as a > > workaround ;-)? > > > > Cheers, > > Kent. > > It appears 2b reproduceable 100% on my OrangePi zero+ (Allwinner H5) and > using -n2 does the trick, but isn't gpiod not supposed to work on all > commercial HW platforms and related kernels, rather then only on RPI?? > gpiod will work on any platform with a supporting kernel. How well depends on the underlying hardware and driver. The RPi4 was merely a counter-example demonstrating that your issue is not universal, using hardware I happen to have readily available. Cheers, Kent.