Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ACPI event unhandled on arrow keys
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Tue Nov 29, 2022 7:11 am    Post subject: ACPI event unhandled on arrow keys Reply with quote

Hi, for every keypress to left, right, up, down I get these lines in the syslog:
Code:
[root] ACPI event unhandled: button/left LEFT 00000080 00000000 K
[root] ACPI event unhandled: button/up UP 00000080 00000000 K
[root] ACPI event unhandled: button/down DOWN 00000080 00000000 K
[root] ACPI event unhandled: button/right RIGHT 00000080 00000000 K

Why and what can I do? The keys work fine as expected.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Thu Dec 01, 2022 11:13 am    Post subject: Reply with quote

Hi, that message appears to come from log_unhandled() in /etc/acpi/default.sh.
Is this on that ZBook Power G8? I'm not sure about why and where the events come from, and I can't imagine whether there's a relevant UEFI setting. But it reminds me of how I learned HP has funny ideas about how to lay out and set up a laptop KB, with things like firing those combos under the hood so their drivers can pick it up, but then wanting combinations like Fn+S to stroke SysRq. If you just want the messages to go away, you could just "handle" the buttons in that script, doing nothing else for them:

Code:
case "$group" in
        button)
                case "$action" in
                        power)
                                /etc/acpi/actions/powerbtn.sh
                                ;;

                        # if your laptop doesnt turn on/off the display via hardware
                        # switch and instead just generates an acpi event, you can force
                        # X to turn off the display via dpms.  note you will have to run
                        # 'xhost +local:0' so root can access the X DISPLAY.
                        #lid)
                        #       xset dpms force off
                        #       ;;

+                        left) ;;
+                        right) ;;
+                        up) ;;
+                        down) ;;
                        *)      log_unhandled $* ;;
                esac

HTH
_________________
quasi-religious systemic wrongism pessimizes indiscriminately
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Thu Dec 01, 2022 11:27 am    Post subject: Reply with quote

It's the HP EliteDesk 800G1 this time with a "CoolerMaster CM Storm Devastator" USB keyboard (Bus 003 Device 003: ID 258a:0001 SINO WEALTH USB KEYBOARD).
As for keeping my logs clean, I can also write a filter rule for my syslog, but first I like to understand the reason for that log line.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770


Last edited by Massimo B. on Fri Dec 02, 2022 2:20 am; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Dec 02, 2022 12:43 am    Post subject: Reply with quote

I see those messages on my desktop machine, too.

The messages started on Nov 13. Fifteen minutes after I upgraded from sys-power/acpid-2.0.33 to sys-power/acpid-2.0.34.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Dec 02, 2022 1:07 am    Post subject: Reply with quote

It seems that acpid developers added code to generate events for some ordinary key presses, such as arrow keys.

Here is an explanation and a solution: https://wiki.archlinux.org/title/acpid#Disabling_ordinary_key_events.

The proposed solution works on my machine. :-)
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Mon Dec 05, 2022 6:10 pm    Post subject: Reply with quote

Oh dear... I had no idea it has been happening to me as well. dmesg gets all of the attention.

Thanks for the tip!
_________________
quasi-religious systemic wrongism pessimizes indiscriminately
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Mon Jan 09, 2023 7:01 am    Post subject: Reply with quote

That dropped a lot. But I still have more unhandled events. Here is the complete list from my logs and I guess there are more unhandled events from buttons that I just did not press yet:
Code:
grep unhandled /var/log/everything/* |cut -d " " -f 4- |sort -u
[root] ACPI event unhandled: button/down DOWN 00000080 00000000 K
[root] ACPI event unhandled: button/kpenter KPENTER 00000080 00000000 K
[root] ACPI event unhandled: button/left LEFT 00000080 00000000 K
[root] ACPI event unhandled: button/right RIGHT 00000080 00000000 K
[root] ACPI event unhandled: button/up UP 00000080 00000000 K
[root] ACPI event unhandled: button/volumedown VOLDN 00000080 00000000 K
[root] ACPI event unhandled: button/volumeup VOLUP 00000080 00000000 K
[root] ACPI event unhandled: cd/stop CDSTOP 00000080 00000000 K
[root] ACPI event unhandled: jack/headphone HEADPHONE plug
[root] ACPI event unhandled: jack/headphone HEADPHONE unplug
[root] ACPI event unhandled: jack/lineout LINEOUT plug
[root] ACPI event unhandled: jack/lineout LINEOUT unplug
[root] ACPI event unhandled: jack/videoout VIDEOOUT plug
[root] ACPI event unhandled: jack/videoout VIDEOOUT unplug

What the hell are they going a lot of quite default buttons and events? That's worth an upstream bug report...

So for now I extended my current drop list:
/etc/acpi/events/buttons:
event=button/(up|down|left|right|kpenter|volumeup|volumedown)
action=<drop>

event=cd/stop
action=<drop>

event=jack/lineout
action=<drop>

event=jack/videoout
action=<drop>

event=jack/headphone
action=<drop>

_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Mon Jan 09, 2023 3:39 pm    Post subject: Reply with quote

here's a list. I didn't ask but I imagine that the idea is to be able to make anything at all (not like your limited-privilege window manager) respond to all kinds of input like button/screenlock and button/coffee and button/wlan... whether or not systemd-* already does. OK, you might argue that printing a warning by default on every single one of them is needed so you can quickly find out what any button is called, but it's kind of noisy without even a --verbose switch.

If touch'ing and rm'ing a file is "good enough" for such a switch, Gentoo's /etc/acpi/default.sh is in the portage tree and not in the source tarball. It's not immediately obvious how to get user patches to apply to that instead of needing to adjust the ebuild. Oh no, does phpBB eat tabs? It looks like it does. Admittedly verbose_events isn't a good name unless it logs everything, handled or not...

Code:
# diff -u /etc/acpi/default.sh /etc/acpi/default.sh.new
--- /etc/acpi/default.sh   2023-01-09 09:56:44.891936343 -0500
+++ /etc/acpi/default.sh.new   2023-01-09 10:17:36.700501630 -0500
@@ -11,7 +11,9 @@
 value=$4

 log_unhandled() {
-   logger "ACPI event unhandled: $*"
+   if [ -e /etc/acpi/verbose_events ]
+      logger "ACPI event unhandled: $*"
+   fi
 }

 case "$group" in


edit++: the upstream script would have the same problem although they seem to only provide & suggest it but not install it. But then, it seems from that Arch wiki solution that Arch also installs it or something like it. shrug
_________________
quasi-religious systemic wrongism pessimizes indiscriminately
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Mon Jan 30, 2023 9:03 am    Post subject: Reply with quote

Weird, today again I see these lines in the log:
Code:
Jan 30 09:59:17 [root] ACPI event unhandled: button/kpenter KPENTER 00000080 00000000 K
Jan 30 09:59:19 [root] ACPI event unhandled: button/up UP 00000080 00000000 K

while still having this file:
Code:
# cat /etc/acpi/events/mybuttons
event=button/(up|down|left|right|kpenter|volumeup|volumedown)
action=<drop>

event=cd/stop
action=<drop>

event=jack/lineout
action=<drop>

event=jack/videoout
action=<drop>

event=jack/headphone
action=<drop>
Any mistake in that file? Isn't it applied?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Mon Feb 27, 2023 8:18 am    Post subject: Reply with quote

Any idea?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Tue Feb 28, 2023 1:25 pm    Post subject: Reply with quote

Something is broken by that config. I found some / subdirs now with weird namings
Code:
drwx------   1 root root   34 13. Feb 08:41 ''$'\360''!'$'\220''1'$'\324\177'/
drwx------   1 root root   34 13. Feb 13:28 ''$'\300''!'$'\220''1'$'\324\177'/
drwx------   1 root root   34  8. Feb 10:14 ''$'\300\361''#3M'$'\177'/
drwx------   1 root root   34 10. Feb 07:38 ''$'\360''!~5'$'\264\177'/
drwx------   1 root root   34 10. Feb 08:13 ''$'\300''!~5'$'\264\177'/
containing files .timestamp and current with the log entries of ACPI event in current.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Wed Mar 01, 2023 4:43 am    Post subject: Reply with quote

I don't have any original ideas about why acpid keeps logging those things without regard for the config. But the .timestamp and current files are like the ones that metalog normally puts in /var/log/everything. That directory doesn't belong to anything according to portage because metalog also creates any directory it's supposed to use according to /etc/metalog.conf if it doesn't exist and a message arrives. Is that what you're using? Are the acpid events the only things in those current files? Did you put things in metalog.conf trying to get acpid to shut up?
_________________
quasi-religious systemic wrongism pessimizes indiscriminately
Back to top
View user's profile Send private message
sdauth
Guru
Guru


Joined: 19 Sep 2018
Posts: 555
Location: Ásgarðr

PostPosted: Wed Mar 01, 2023 11:33 am    Post subject: Reply with quote

mike155 wrote:
It seems that acpid developers added code to generate events for some ordinary key presses, such as arrow keys.

Here is an explanation and a solution: https://wiki.archlinux.org/title/acpid#Disabling_ordinary_key_events.

The proposed solution works on my machine. :-)


Thanks! It works fine on my Thinkpad :wink: I have another horrible acpi event showing up every minute (!)

Code:
ACPI event unhandled: processor LNXCPU:00 00000081 00000000


Can I make it quiet too ?
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Fri Mar 03, 2023 12:05 pm    Post subject: Reply with quote

dbtx wrote:
I don't have any original ideas about why acpid keeps logging those things without regard for the config. But the .timestamp and current files are like the ones that metalog...
Yes, I use metalog. Not only acpi logs are written to those weird folders, also other stuff. I guess it's a bug in metalog after enabling /sbin/consolelog.sh... further discussion here.

PS.: Solved.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770


Last edited by Massimo B. on Wed Jun 21, 2023 7:09 am; edited 1 time in total
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Fri Mar 03, 2023 4:13 pm    Post subject: Reply with quote

sdauth wrote:

Code:
ACPI event unhandled: processor LNXCPU:00 00000081 00000000


Can I make it quiet too ?


I would try adding
Code:
event=processor
action=<drop>
although the word 'processor' never appears in acpid sources, not yet, not even in a comment. It probably comes down from the kernel like that.
_________________
quasi-religious systemic wrongism pessimizes indiscriminately
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Wed Jun 21, 2023 7:10 am    Post subject: Reply with quote

Massimo B. wrote:
Weird, today again I see these lines in the log:
Code:
Jan 30 09:59:17 [root] ACPI event unhandled: button/kpenter KPENTER 00000080 00000000 K
Jan 30 09:59:19 [root] ACPI event unhandled: button/up UP 00000080 00000000 K

while still having this file:
Code:
# cat /etc/acpi/events/mybuttons
event=button/(up|down|left|right|kpenter|volumeup|volumedown)
action=<drop>

event=cd/stop
action=<drop>

event=jack/lineout
action=<drop>

event=jack/videoout
action=<drop>

event=jack/headphone
action=<drop>
Any mistake in that file? Isn't it applied?

This issue is still there, I can't get the messages hidden from log files. Any idea?
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Sat Aug 12, 2023 4:45 pm    Post subject: Reply with quote

I can't believe, the issue is still polluting my log files. Is this wort a bug report? Upstream bugreport to acpi? According to portage, is this really still hosted at SF? The tickets there look very outdated: https://sourceforge.net/p/acpid2/tickets/
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
thumper
Guru
Guru


Joined: 06 Dec 2002
Posts: 550
Location: Venice FL

PostPosted: Sat Aug 12, 2023 11:48 pm    Post subject: Reply with quote

I too, thought this was handled (no pun intended) some time ago, I've had the forum set to watch this thread, so I checked today, and it's back to being noisy.
Code:

Aug 12 00:35:27 janus root: ACPI event unhandled: button/left LEFT 00000080 00000000 K
Aug 12 00:35:28 janus root: ACPI event unhandled: button/right RIGHT 00000080 00000000 K
Aug 12 00:56:16 janus root: ACPI event unhandled: button/up UP 00000080 00000000 K
Aug 12 03:21:38 janus root: ACPI event unhandled: jack/lineout LINEOUT unplug
Aug 12 03:21:38 janus root: ACPI event unhandled: jack/videoout VIDEOOUT unplug
Aug 12 03:21:38 janus root: ACPI event unhandled: jack/lineout LINEOUT plug
Aug 12 03:21:38 janus root: ACPI event unhandled: jack/videoout VIDEOOUT plug
Aug 12 13:47:09 janus root: ACPI event unhandled: jack/lineout LINEOUT unplug
Aug 12 13:47:09 janus root: ACPI event unhandled: jack/videoout VIDEOOUT unplug
Aug 12 13:47:09 janus root: ACPI event unhandled: jack/lineout LINEOUT plug
Aug 12 13:47:09 janus root: ACPI event unhandled: jack/videoout VIDEOOUT plug
Aug 12 19:35:58 janus root: ACPI event unhandled: button/up UP 00000080 00000000 K
Aug 12 19:36:01 janus root: ACPI event unhandled: button/down DOWN 00000080 00000000 K


For now, I just applied the workaround proposed earlier in this thread by editing /etc/acpi/default.sh


George
Back to top
View user's profile Send private message
mobiusproject
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2003
Posts: 129

PostPosted: Tue Feb 06, 2024 8:41 pm    Post subject: Reply with quote

Massimo B. wrote:
I can't believe, the issue is still polluting my log files. Is this wort a bug report? Upstream bugreport to acpi? According to portage, is this really still hosted at SF? The tickets there look very outdated: https://sourceforge.net/p/acpid2/tickets/

I am finding that you can only have one event/action set per file else it will only honor the last one. So instead have multiple files
Code:
# cat /etc/acpi/events/buttons
event=button/(up|down|left|right|kpenter|volumeup|volumedown|mute)
action=<drop>

# cat /etc/acpi/events/cd
event=cd/(prev|play|next|stop)
action=<drop>

# cat /etc/acpi/events/jack
event=jack/(lineout|videoout|headphone)
action=<drop>

Thanks for pointing me in the right direction.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum