GPIO.add_event_detect no longer works with the new kernel 6.60

Open
#6,037 73 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c, linux

Research direction

Start by reproducing the failure at GPIO.add_event_detect on the listed Raspberry Pi 4 system after updating to kernel 6.6.20+rpt-rpi-v8. Compare the edge-detection behavior with the prior kernel and trace the failure reported as "Failed to add edge detection". Done means add_event_detect works again on the stated hardware and kernel configuration.

Written by the indexing model from the issue text.

Description

Describe the bug

Since the update to the following kernel, the "add_event_detect" function from the RPi.GPIO library no longer works.

Linux outdoor enclosurePi 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux

The program crashes with the following error.

Traceback (most recent call last):
  File "/home/pi/scripts/test/./door_limit_switch_states.py", line 48, in <module>
    GPIO.add_event_detect(door_limit_switch_top, GPIO.BOTH, callback=all, bouncetime = 20)
RuntimeError: Failed to add edge detection

I use the following Raspberry

Raspberry Pi 4 Model B Rev 1.5

Steps to reproduce the behaviour

Update to the actual kernel and try the RPi.GPIO library function "add_event_detect"

Device (s)

Raspberry Pi 4 Mod. B

System

Raspberry Pi reference 2023-10-10
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, fb56ad562991cf3ae5c96ab50983e1deeaefc7b6, stage2

Feb 29 2024 12:24:53
Copyright (c) 2012 Broadcom
version f4e2138c2adc8f3a92a3a65939e458f11d7298ba (clean) (release) (start)

Logs

No response

Additional context

No response

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.