You are not logged in.

#1 2016-06-11 11:45:52

nesk
Member
Registered: 2011-03-31
Posts: 181

acpid: volume example from Wiki not working

I'm trying to get Fn volume keys working via acpid https://wiki.archlinux.org/index.php/Ac … me_control

[root@arch events]# acpi_listen 
button/mute MUTE 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K
^C
[root@arch events]# cat /etc/acpi/events/vol-d
event=button/volumedown
action=amixer set Master 10- unmute
[root@arch events]# systemctl restart acpid.service 
[root@arch events]# amixer get Master
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 67 [77%] [-15.00dB] [on]

< pressing Volume Down several times >

[root@arch events]# amixer get Master
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 67 [77%] [-15.00dB] [on]
[root@arch events]# journalctl -n5
Jun 11 14:44:20 arch root[7054]: ACPI group/action undefined: button/volumedown / VOLDN
Jun 11 14:44:20 arch root[7058]: ACPI group/action undefined: button/volumedown / VOLDN
Jun 11 14:44:20 arch root[7062]: ACPI group/action undefined: button/volumedown / VOLDN
Jun 11 14:44:20 arch root[7066]: ACPI group/action undefined: button/volumedown / VOLDN
Jun 11 14:44:21 arch root[7070]: ACPI group/action undefined: button/volumedown / VOLDN

Running amixer set Master 10- unmute from terminal successfully changes volume.

Last edited by nesk (2016-06-11 13:54:52)

Offline

#2 2016-06-11 12:17:37

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: acpid: volume example from Wiki not working

The last few messages are from the script in /etc/acpi/handler.sh, so unrelated to the volume event. Does it work if you run the command from a root shell:

$ su -
# amixer set Master 10- unmute

Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2016-06-11 12:27:24

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: acpid: volume example from Wiki not working

Alad wrote:

The last few messages are from the script in /etc/acpi/handler.sh, so unrelated to the volume event. Does it work if you run the command from a root shell:

$ su -
# amixer set Master 10- unmute

Yes, it works.

Offline

#4 2016-06-11 12:53:07

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: acpid: volume example from Wiki not working

Stop the acpid service, and run it from a terminal:

# systemctl stop acpid
# acpid --debug

Then press the buttons and post the output here.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#5 2016-06-11 12:56:54

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: acpid: volume example from Wiki not working

Alad wrote:

Stop the acpid service, and run it from a terminal:

# systemctl stop acpid
# acpid --debug

Then press the buttons and post the output here.

[root@arch events]# acpid --debug
Deprecated /proc/acpi/event was not found.  Trying netlink and the input layer...
input layer /dev/input/event0 (AT Translated Set 2 keyboard) opened successfully, fd 4
input layer /dev/input/event1 (Lid Switch) opened successfully, fd 5
input layer /dev/input/event10 (Video Bus) opened successfully, fd 6
input layer /dev/input/event12 (Dell WMI hotkeys) opened successfully, fd 7
input layer /dev/input/event14 (HDA Intel HDMI HDMI/DP,pcm=3) opened successfully, fd 8
input layer /dev/input/event15 (HDA Intel HDMI HDMI/DP,pcm=7) opened successfully, fd 9
input layer /dev/input/event16 (HDA Intel HDMI HDMI/DP,pcm=8) opened successfully, fd 10
input layer /dev/input/event2 (Power Button) opened successfully, fd 11
input layer /dev/input/event3 (Sleep Button) opened successfully, fd 12
input layer /dev/input/event4 (Power Button) opened successfully, fd 13
input layer /dev/input/event7 (HDA Intel PCH Headphone Mic) opened successfully, fd 14
input layer /dev/input/event8 (HDA Intel PCH Dock Mic) opened successfully, fd 15
input layer /dev/input/event9 (HDA Intel PCH Dock Line Out) opened successfully, fd 16
inotify fd: 17
inotify wd: 1
netlink opened successfully
acpid: starting up with netlink and the input layer
parsing conf file /etc/acpi/events/anything
parsing conf file /etc/acpi/events/vol-d
acpid: 2 rules loaded
acpid: waiting for events: event logging is off
acpid: client connected from 653[0:0]
acpid: 1 client rule loaded
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 57 [66%] [-22.50dB] [on]
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 47 [54%] [-30.00dB] [on]

Offline

#6 2016-06-11 13:13:46

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: acpid: volume example from Wiki not working

Judging by the output, it successfully decreased the volume. See if it's the same when launching acpid from systemd:

# systemctl edit --full acpid.service # append --debug to ExecStart line
# systemctl restart acpid.service
# journalctl _SYSTEMD_UNIT=acpid.service # post output

Last edited by Alad (2016-06-11 13:17:33)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#7 2016-06-11 13:49:07

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: acpid: volume example from Wiki not working

Alad wrote:

Judging by the output, it successfully decreased the volume. See if it's the same when launching acpid from systemd:

# systemctl edit --full acpid.service # append --debug to ExecStart line
# systemctl restart acpid.service
# journalctl _SYSTEMD_UNIT=acpid.service # post output
Jun 11 16:47:37 arch acpid[13908]: amixer: Unable to find simple control 'Master',0

Offline

#8 2016-06-11 14:11:54

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,901
Website

Re: acpid: volume example from Wiki not working

Not a System Administration topic, moving to Kernel and Hardware.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2016-06-11 14:53:37

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: acpid: volume example from Wiki not working

Looks like it's a systemd issue then, or an error elsewhere which is triggered by a condition in systemd or the service file. Opening an issue (mentioning it works when running acpid manually) may give more clues:

https://github.com/systemd/systemd/issues


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

Board footer

Powered by FluxBB