Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

kernel: fixed-feature power button emits an ACPI Button event, and the wake PWRBTN status is recorded before it is cleared

Aperta
#239 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

Start in acpi.c, reading acpi_event_power_button_sleep/wake around lines 3914–3947 and the fixed-button status handling in acpi_EnterSleepState around lines 3466–3480; compare the notification convention in acpi_button.c. Verify that QEMU system_powerdown produces a Button event visible to the bridge, and that a button wake is distinguishable from RTC or lid wake.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:power bug

Summary

Control-method buttons (acpi_button.c) notify userland; the fixed-feature power button does not. acpi_event_power_button_sleep/wake (acpi.c ~3914-3947) only fire the acpi_sleep_event eventhandler, with no acpi_UserNotify("Button", ...). QEMU's system_powerdown and many laptops use the fixed button, so pmconfigd would never learn of a press.

Separately, on resume acpi_EnterSleepState clears a latched fixed power-button status (~3466-3480) so the wake is not misread as a poweroff -- which also erases the only evidence that the button caused the wake.

Design

  • add acpi_UserNotify("Button", ACPI_ROOT_OBJECT, 0) in the fixed-feature handlers (~6 LOC), matching the control-method path's value convention
  • record the PWRBTN status into the softc before clearing it, so the bridge (K4) can report Wake Reason "Power Button" (~10 LOC)

Acceptance

  • QMP system_powerdown in QEMU produces a Button event visible to the bridge
  • a button-initiated wake is distinguishable from an RTC or lid wake

K2 in epic nextbsd/nextbsd#490 (E17 Power management). Depends on: none.

Plan: https://pkgdemon.github.io/nextbsd-power-management-plan.html · Draft: https://pkgdemon.github.io/nextbsd-e17-tickets.html#k2

Lingua principale
C
Stelle
12
Fork
3
Merge medio
7h 1m
PR unite (30g)
7

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextbsd/nextbsd-kernel

Tutte le issue di nextbsd/nextbsd-kernel

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.