From nobody Wed May 20 00:44:52 2026 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKt9J4jt1z6dq2y for ; Wed, 20 May 2026 00:44:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKt9J467cz4Jgp for ; Wed, 20 May 2026 00:44:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779237892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c0c2n2APLR2cnPSmqGszpPU9BxtOWRlv/f/aCbx96t0=; b=lG0piNCjl6JxnDBom+Fh37kCYH5qokaoWAITYcQT+6kVJA2aejp5KpeyZ+aBeKUdcJScme NIDkGTYrk8C+hBMD3sd9SEqjbEn2A8/T+oncCmXZ2CNSK8OhQnV0ghuSOwUcg8OPMBiarb AOAQyr3fX+GdFPIn5dpo37F6nyLWJ8GIzJ1xD30hsw8VjqxuoOSRy1FnqUg8H4g/oh8Dwm GlJN3HDkM9s91JlU8+IOC82PNCJEd5qoQUJ5dMr/arzSK7fhfN1QU9UJe0JxUFNG3uEanv VWzzqOmQukZ4BbkAU7ZC2rcH8X0Hrvf2P34shx2RYY9C7+ViUptvXrRaxgzabw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779237892; a=rsa-sha256; cv=none; b=Kaw6XIb5Xa8erNODzAeguzE7f2P7Rb1kZhiR/iye3GM4cCxgGELb9U6Jd7TyLzaP2VkMP2 6ASOtF+8k1NAfmIrGVbTpyTHhgUyPbTtUxE6d+kUeKj3WNW2J6r9p4Sw3isPgO+0+xv/Wv RibxJtTFhhDJs3aUr1SRTRWTpLuq+F6YX1UptFoPk3UUVx9Lvoz/QFoQl9DJX6mep4vnJZ IAI0FOLOMhdKIf01QCpqIkpu4sAnskkOmlgGQKjZw0A18FaYNwdl/RXQqpfSsiD+nUnrED /u0sTO5/f8iXZ2boC7nlqedgmWaS0FxbXh59+t3uLYg1t6glpRHsfo9bgF74fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779237892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c0c2n2APLR2cnPSmqGszpPU9BxtOWRlv/f/aCbx96t0=; b=vQyNqBW22DataxNV4KJaoMNdFbSLzmMKJ5hXINcK3/Y5RV8vVZ369h6jWcJrsLAfKTfPgd kHm5zKx79pse4GoVAiwTdsureHaRVJwY3Y9rr7utgJB78GPw04YCOip5cNjYuVJl2ea05y JfEmH6DHEfSQ6ZawMJCZPHLP5BDWYx8qJIamFi4FIgQMUFFGQPnfe09fQMr+SVLXh5EAEM Y3CLvcR8x02mYZBYNXC6bvM4op0OAoNBJgDCiJUCRXfGJmns1LOWGTGSYrIzlKL9QMiYCK wzyS/05+l/Savg+UlWvEHyPeLTh0gYJqomGb11Ka0oLrS/ZC3An8lQ5BBI+FPQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4gKt9J3hzjzfhk for ; Wed, 20 May 2026 00:44:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 64K0iqvS088515 for ; Wed, 20 May 2026 00:44:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 64K0iqCa088514 for bugs@FreeBSD.org; Wed, 20 May 2026 00:44:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 295251] Power button does not work on HP Laptop 15s (new module to poll GPIO and raise ACPI event) Date: Wed, 20 May 2026 00:44:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rz@fabmicro.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295251 --- Comment #2 from Ruslan Zalata --- Hello Ahmad and thank you for your review. Well, yes, a libgpio daemon (or even a shell script calling gpioctl/acpiconf periodically) can be used to quick-solve this problem, but let me explain w= hy a user-space process does not look like a good solution: 1. System may be booted in modes without daemons running (Single User mode) which breaks the button. A module can be made to load earlier from bootload= er making the button work. 2. Currently there's no way of sending arbitrary ACPI event (to call named method) from user-space unless a third-party module like "acpi_call" is loa= ded. So, daemon is limited in sending a fixed number of Sx states, which is not = what expected from Power Button state change. Some GUI software may want to catch button press events (through devd or evdev) and use it to show a menu inste= ad of immediate poweroff/suspend/reboot, such software will not work in case of daemon. 3. There are cases where kernel may start killing user-space processes intentionally (i.e. lack of RAM), which can break Power Button functionalit= y if daemon is killed. 4. User-space process has a way bigger memory footprint, it does innumerous switching between user and kernel while polling GPIO, i.e. overhead it prod= uces is much bigger than of a tiny kthread in module that just sleeps. :-) 5. Proposed module can be easily extended for polling more GPIOs for other features that may appear on Hardware-Reduced ACPI machines. There are lapto= ps with Sleep Button as well. Anyways, I made this module stand-alone and published on Github, anyone in = need can just "git clone && make && sudo make install" it. Thanks. Regards, Ruslan. --=20 You are receiving this mail because: You are the assignee for the bug.=