Volume control with Fn keys

Howdy,

I have been able to set[]up (and play) sound, but, I cannot control the volume with the Fn-cursor up and Fn-cursor down keys (Acer Aspire One netbook).

I have searched and added the following to my /boot/loader.conf:
  • Code:
    acpi_asus_load="YES"
    (I know asus and not acer, but cannot find a acpi_acer)
  • Code:
    acpi_video_load="YES"
    (this activated some of the Fn keys)

Is there something I am missing? I am using audio/mpg123 which has volume control, but I would prefer to do it from the keyboard.
 
Wrexxman said:
I cannot control the volume with the Fn-cursor up and Fn-cursor down keys (Acer Aspire One netbook).
I also have an Acer Aspire One netbook. Most of the Fn keys work out of the box, but the volume control keys apparently don't. It might be possible to get them to work with a bit of tinkering, but I wouldn't know how off the top of my head.
 
It is likely that Fn + the up cursor generates XF86AudioRaiseVolume. You can check by running the X.org utility [cmd=]xev[/cmd] in a terminal. Once you have the key code then you can bind that keycode to a command.

Binding a keycode is desktop specific. I use the following entry in ~/.config/openbox/rc.xml for openbox in OpenBSD.
The syntax for the mixer command is different in FreeBSD so do not copy this blindly.
Code:
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <command>amixer set Master Front 5%+ unmute</command>
      </action>
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <command>amixer set Master Front 5%- unmute</command>
      </action>
    </keybind>
    <keybind key="XF86AudioMute">
      <action name="Execute">
        <command>amixer set Master Front toggle</command>
      </action>
    </keybind>

You should be able to "net' additional guidance specific to your desktop with the search containing your desktop name and "keybind".

You will also want to review the FreeBSD documentation in mixer()
 
@fonz - Thanks for the input, reassuring to read that I am not the only one.

@shepper - Thanks, but I do not have X.Org installed. I am doing my best to keep this machine GUI free.
 
Last edited by a moderator:
Thanks, but I do not have X.Org installed. I am doing my best to keep this machine GUI free

The above posts do not fully describe your goals but inferring that you want to play music mp3's you may want to look at musicpd with an mpd frontend like ncmpc. Ncmpc is an ncurses front end that lets you manage your music collection (FLAC's, MP3's, OGG's) . The default setup uses the - (minus) and + (plus) keys to change volume.

From the OpenBSD man page for ncmpc
KEYS
When ncmpc starts it tries to read user-defined key bindings from the
~/.ncmpc/keys file. If no user-defined key bindings are found then
ncmpc tries to load the global key bindings from $SYSCONFDIR/ncmpc/keys
(the actual path is displayed on the help screen).

You can view ncmpc's key bindings by pressing '1' (help) when ncmpc is
running. To edit key bindings press 'K' and use the key editor in
ncmpc.
 
Back
Top