System halt interrupted with ovelay gpio-poweroff enabled ?

Open
#3,380 14 comments 0 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
linux

Research direction

Reproduce the shutdown behavior using /boot/config.txt with dtoverlay=gpio-poweroff,gpiopin=22,active_low, then compare init 0 and init 6 with and without the overlay. Check when the OLED service blanks the display and when the GPIO LED changes state; done means the OLED is blanked during shutdown while gpio-poweroff still drives the expected pin state.

Written by the indexing model from the issue text.

Description

Hello,

I've an OLED attached and a corresponding service which nicely blanks that display and exits on a init 0 or init 6.

When I add dtoverlay gpio-poweroff gpiopin=22 active_low my OLED display isn't blanked anymore on shutdown or init 0. So I assume that the halt scripts are interrupted by a too early halt of the CPU when this feature is activated.

I saw also some differences on the green Act LED. Where I do see much more blinks after an init 0 when I do not activate gpio-poweroff feature. With gpio-poweroff active, I see only some short Act LED activities.

My setup seems correct. I added a LED on the gpio-poweroff GPIO, which turns on (low pin state) for an init 0. The line I did add to /boot/config.txt was:

dtoverlay=gpio-poweroff,gpiopin=22,active_low

And I'm using a basic install:

Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

BR

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.