You are not logged in.

#1 2017-10-14 18:16:22

momu
Member
Registered: 2017-10-14
Posts: 137

[SOLVED] Brightness function keys not working

I want to use Fn+F5 and Fn+F6 to control brightness on my laptop. So i added this to my ~/.i3/config (since I use i3):

bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 5
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 5

It didn't work so I tried this instead:

bindsym XF86KbdBrightnessUp exec --no-startup-id xbacklight -inc 5
bindsym XF86KbdBrightnessDown exec --no-startup-id xbacklight -dec 5

Still doesn't work.

After that I tried executing

xbacklight -set 50

in terminal and it worked. I tried xbacklight with other flags and they all worked.

After that I launched showkey and this is what I got:

For F10:

keycode 68 press
keycode 68 release

For Fn+F10 (Audio mute, which works, all audio keys work)

keycode 113 press
keycode 113 release

For F5:

keycode 63 press
keycode 63 release

And Fn+F5 outputs nothing at all, like it's not even pressed.

When I used XFCE on my previous Arch Linux installation on this laptop (same iso was used for that and this installation) I didn't have this issue.

Last edited by momu (2017-10-15 12:12:05)

Offline

#2 2017-10-14 18:30:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,461
Website

Re: [SOLVED] Brightness function keys not working


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-10-14 21:02:36

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED] Brightness function keys not working

Tried with xev and evtest, same results. Pressing any Fn+Fx is detected except if x is 5 or 6.

Offline

#4 2017-10-14 21:44:53

seth
Member
Registered: 2012-09-03
Posts: 14,040

Re: [SOLVED] Brightness function keys not working

Did you also see that this case is explicitly addressed in the linked page?

Offline

#5 2017-10-15 05:56:30

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED] Brightness function keys not working

seth wrote:

Did you also see that this case is explicitly addressed in the linked page?

No. I read the article but I just don't see where my problem is addressed.

Last edited by momu (2017-10-15 05:59:44)

Offline

#6 2017-10-15 06:34:00

seth
Member
Registered: 2012-09-03
Posts: 14,040

Re: [SOLVED] Brightness function keys not working

Maybe the line that:

literally wrote:

Out of the box, the backlight keys (on F5, F6) might not be available

Offline

#7 2017-10-15 07:08:41

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED] Brightness function keys not working

seth wrote:

Maybe the line that:

literally wrote:

Out of the box, the backlight keys (on F5, F6) might not be available

Looks like I missed that line...

Offline

#8 2017-10-15 07:15:17

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED] Brightness function keys not working

I added acpi_backlight=vendor to kernel parameters and then after making the grub.cfg and rebooting I executed

modprobe asus-nb-wmi

(it's Asus laptop) but it changed nothing.
I also set acpi_backlight=native/video/none/intel_backlight, built grub.cfg, reboot and loaded asus-nb-wmi but still nothing.

Last edited by momu (2017-10-15 07:16:17)

Offline

#9 2017-10-15 09:14:28

hfenigma
Member
Registered: 2017-06-29
Posts: 28

Re: [SOLVED] Brightness function keys not working

maybe you can try brightnessctl, which works for my i3wm setup

Offline

#10 2017-10-15 09:41:59

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED] Brightness function keys not working

hfenigma wrote:

maybe you can try brightnessctl, which works for my i3wm setup

I use xbacklight which does work. The problem is that XF86MonBrightnessUp and XF86MonBrightnessDown keys aren't working.

Last edited by momu (2017-10-15 09:42:45)

Offline

#11 2017-10-15 10:31:15

lo1
Member
Registered: 2017-09-25
Posts: 584

Re: [SOLVED] Brightness function keys not working

momu wrote:
hfenigma wrote:

maybe you can try brightnessctl, which works for my i3wm setup

I use xbacklight which does work. The problem is that XF86MonBrightnessUp and XF86MonBrightnessDown keys aren't working.

As suggested, brightnessctl is probably the best solution in your case. You can bind F5 and F6 (without pressing FN, to keep it simple) to execute a particular brightnessctl command. According to my actual setup with LXDE + LXDM, using xbindkeys, you should have a ~/.xbindkeysrc with something like this

#BrigthnessDown
"brightnessctl s 5- radeon_bl0"
m:0x0 + c:232
XF86MonBrightnessDown
#BrightnessUp
"brightnessctl s +5 radeon_bl0"
m:0x0 + c:233
XF86MonBrightnessUp
##################################
# End of xbindkeys configuration #
##################################

You'll still be able to switch through tty by pressing alt+ctrl+f1 through f6 and probably you'll be able to use the alternative function of those keys by pressing e.g. fn + f5 to reload a web page.

Offline

#12 2017-10-15 11:58:14

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED] Brightness function keys not working

I finally solved it. I deleted all kernel parameters from GRUB_CMDLINE_LINUX_DEFAULT from /etc/default/grub leaving only quiet. After that I added pcie_aspm=force and acpi_osi= to GRUB_CMDLINE_LINUX_DEFAULT line.

GRUB_CMDLINE_LINUX_DEFAULT

GRUB_CMDLINE_LINUX_DEFAULT="quiet pcie_aspm=force acpi_osi="

Then I run

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

and

$ reboot

Now my brightness keys work.

Last edited by momu (2017-10-15 11:58:58)

Offline

#13 2017-10-15 11:58:25

seth
Member
Registered: 2012-09-03
Posts: 14,040

Re: [SOLVED] Brightness function keys not working

regarding the keys: the only thing left would be to lie to the BIOS about the OS - lookup acpi_osi in the wiki.
Since there's a remote but real chance to stall the boot with a "dumb" parameter, you should try those from the GRUB commandline, ie. press "e" and alter ther kernel line.

What notebook is this in particular? Did you check the wiki for the vendor/type on known caveats?

Edit: LOL, you've beaten me by seconds smile

Last edited by seth (2017-10-15 11:59:41)

Offline

#14 2017-10-15 12:04:27

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED] Brightness function keys not working

seth wrote:

regarding the keys: the only thing left would be to lie to the BIOS about the OS - lookup acpi_osi in the wiki.
Since there's a remote but real chance to stall the boot with a "dumb" parameter, you should try those from the GRUB commandline, ie. press "e" and alter ther kernel line.

What notebook is this in particular? Did you check the wiki for the vendor/type on known caveats?

Edit: LOL, you've beaten me by seconds smile


big_smile

Offline

#15 2017-10-15 12:09:42

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED] Brightness function keys not working

seth wrote:

What notebook is this in particular?

Here's the output of inxi -b for detailed information:

System:    Host: leviathan Kernel: 4.9.54-1-lts x86_64 bits: 64 Desktop: i3 4.13-non-git
           Distro: Arch Linux
Machine:   Device: laptop System: ASUSTeK product: E502MA v: 1.0 serial: N/A
           Mobo: ASUSTeK model: E502MA v: 1.0 serial: N/A
           UEFI [Legacy]: American Megatrends v: E502MA.206 date: 07/30/2015
Battery    BAT0: charge: 5.8 Wh 22.9% condition: 25.3/32.2 Wh (79%)
CPU:       Quad core Intel Celeron N2940 (-MCP-) speed/max: 734/2249 MHz
Graphics:  Card: Intel Atom Processor Z36xxx/Z37xxx Series Graphics & Display
           Display Server: N/A driver: intel tty size: 93x46
Network:   Card-1: Realtek RTL8723BE PCIe Wireless Network Adapter driver: rtl8723be
           Card-2: Realtek RTL8101/2/6E PCIE Fast/Gigabit Ethernet controller
           driver: r8169
Drives:    HDD Total Size: 500.1GB (3.8% used)
Info:      Processes: 125 Uptime: 19 min Memory: 719.6/3835.4MB Init: systemd
           Client: Shell (bash) inxi: 2.3.40

Offline

Board footer

Powered by FluxBB