Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brightness Keys Not Working #535

Open
DDAVID22291 opened this issue Sep 20, 2023 · 5 comments
Open

Brightness Keys Not Working #535

DDAVID22291 opened this issue Sep 20, 2023 · 5 comments

Comments

@DDAVID22291
Copy link

The Brightness Keys do not work on 2 different laptops on a fresh install of LARBS. They did work on an older version, though.

I'll post the solution when I figure it out.

@NicholasasaurusRex
Copy link
Contributor

I have a solution that may work for you.

Install this package:
pacman -S light

Then edit this file:
sudo nvim /etc/sudoers.d/01-larbs-cmds-without-password

add this to the end of the file:
,/usr/bin/light -A 10,/usr/bin/light -U 10

Now you need to edit dwm:
sudo nvim $HOME/.local/src/dwm/config.h

find this line:
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = (const char*[]){ "xbacklight", "-inc", "15", NULL } } },

comment it out and add this line underneath it:
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("sudo light -A 10") },

Then do the same for BrightnessDown:
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = (const char*[]){ "xbacklight", "-dec", "15", NULL } } },

and add this:
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("sudo light -U 10") },

when done editing dwm/config.

run these commands:
cd $HOME/.local/src/dwm
sudo make
sudo make install

Then either reboot your computer, logout or renew dwm

This works on my computer.

@ShahramMohammed
Copy link

Same issue here

drees5 pushed a commit to drees5/LARBS that referenced this issue Feb 11, 2024
* for multilanguage support

see issue number LukeSmithxyz#535

* emoji
@bybv
Copy link

bybv commented May 13, 2024

Friends, I had the same problem. In my case it was just a lack of the right package for drivers, but YMMV as it depends on your hardware. The package I needed was:

xf86-video-intel

Good luck!

@ShahramMohammed
Copy link

bybv's solution worked for me as well

@ShahramMohammed
Copy link

ShahramMohammed commented Nov 12, 2024

I ran into another issue with @bybv's solution. Turning the display off breaks xbacklight and it won't work until I exit dwm and log back in. However I did find a solution that solves that issue as well.
Simply install acpilight. Pacman will tell you that it is in conflict with xorg-xbacklight and will prompt you to remove it. Press y to remove it and proceed with the installation. Brightness controls should work normally again. You won't have to change anything else as acpilight uses the xbacklight command with almost exactly the same syntax.

Note: in my case I also uninstalled xf86-video-intel as it was no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants