You are not logged in.

#1 2019-06-29 09:50:14

saurabh95
Member
Registered: 2019-06-29
Posts: 3

[Solved]Keyboard bottons not working for brightness and audio control.

I just installed Arch linux + Openbox on my HP notebook.

Output of ls /sys/class/backlight is

radeon_bl0

And output of lspci is

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Root Complex
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] (rev 45)
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Host Bridge
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1
00:02.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1
00:08.0 Encryption controller: Advanced Micro Devices, Inc. [AMD] Kabini/Mullins PSP-Platform Security Processor
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 11)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 39)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 39)
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 39)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 42)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 02)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 5
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
05:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01)

On my keyboard
F2 is used to Decrease Screen Brightness
F3 is used to Increase Screen Brightness
F6 is used to Mute/Unmute audio
F7 is used to Decrease Volume
F8 is used to Increase Volume

Last edited by saurabh95 (2019-06-29 14:56:01)

Offline

#2 2019-06-29 10:05:03

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: [Solved]Keyboard bottons not working for brightness and audio control.

You probably have to map the multimedia keys to volume and backlight commands.

You can create GUI feedback for example with a desktop notification or xob or by using a tray icon that registers the shortcuts for you.

Last edited by progandy (2019-06-29 10:15:27)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2019-06-29 12:13:32

saurabh95
Member
Registered: 2019-06-29
Posts: 3

Re: [Solved]Keyboard bottons not working for brightness and audio control.

I've installed acpilight.
But after running xbacklight -set 50, it gives the following error.

/usr/bin/xbacklight: [Errno 13] Permission denied: '/sys/class/backlight/radeon_bl0/brightness'

I didn't wanted to run this with sudo, although with sudo it works. So I created a udev rule

/etc/udev/rules.d/backlight.rules
------------------------------------------------------------------------------------------------------------------------
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"

I just replaced acpi_video0 with radeon_bl0. But still is gives permission denied error.

Offline

#4 2019-06-29 12:54:44

seth
Member
Registered: 2012-09-03
Posts: 64,587

Re: [Solved]Keyboard bottons not working for brightness and audio control.

Please use

GROUP="video", MODE="0660"

where did you get that sh… oh, great - it's in the wiki sad
Is your user member of the video group?

Online

#5 2019-06-29 13:58:09

saurabh95
Member
Registered: 2019-06-29
Posts: 3

Re: [Solved]Keyboard bottons not working for brightness and audio control.

seth wrote:

Please use

GROUP="video", MODE="0660"

where did you get that sh… oh, great - it's in the wiki sad
Is your user member of the video group?

Hey thanks. Now its working. I was not a part of video group.

--------------------------------------------------------------------------------------
For those who are still searching for the solution . Here's the summary of how I made it work

  1. for screen brightness

    • xbacklight only works with Intel so for Radeon install acpilight package.

    • Now you can use xbacklight command on terminal with sudo command

    • To run xbacklight without sudo, create a udev rule.

      /etc/udev/rules.d/backlight.rules
      ---------------------------------------------------------------------------------------------------------------
      ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="radeon_b10", GROUP="video", MODE="0660", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
      ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="radeon_b10", GROUP="video", MODE="0660", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
    • Now add yourself to group video.

      sudo usermod -a -G video insert_your_Username_here
  2. For volume control

    • You can use amixer which is a part of alsa-utils package. So install alsa-utils.

    • Now you can control volume using following commands

      amixer set Master 10%+                                                  // To Increase Volume
      amixer set Master 10%-                                                  // To Decrease Volume
      amixer set Master toggle                                                // Mute/ Unmute
  3. Now you can add these commands to keybindings by editing config file of your preferred WM. Which I have yet to do, but it shouldn't be that difficult

smile

Last edited by saurabh95 (2019-06-29 14:38:42)

Offline

#6 2019-06-29 14:13:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,405

Re: [Solved]Keyboard bottons not working for brightness and audio control.

cool.  Remember to edit the title to prepend [Solved] by editing your first post.  You may need to shorten your title to get it to fit.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB