You are not logged in.

#1 2016-01-10 14:09:59

jayache80
Member
Registered: 2015-11-19
Posts: 23

brightness control not working on macbook

Hello,

In trying to figure out why my XF86MonBrightnessUp and XF86MonBrightnessDown don't work, I decided to try what they are mapped to manually in the command line:

xbacklight +20

and

xbacklight -20

Those don't work. So I tried this in the terminal:

echo 5 | sudo tee /sys/class/backlight/apple_backlight/brightness

which should set the brightness to 5, out of a max of 15. This didn't work. But wait! This was in the terminal emulator in my desktop environment (LXDE, with openbox as wm, and lxdm as the dm). I decided to try the above command in a true TTY terminal, and it worked! Once I switch back to the desktop environment, the brightness level that I changed in, say, TTY2, carries over.

Anyone know what's going on? And how to be able to adjust brightness from my desktop environment?

Offline

#2 2016-01-10 18:06:41

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

Re: brightness control not working on macbook

Could you try the following command instead:

bash -c "sudo echo 5 > /sys/class/backlight/apple_backlight/brightness"

Your incantation should work, but there is something about it that is causing the hairs on the back of my neck to stand up.


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

#3 2016-01-10 20:05:09

jayache80
Member
Registered: 2015-11-19
Posts: 23

Re: brightness control not working on macbook

Thanks for responding. That command yields the same result. The 'brightness' value is changed (I can see it changed using cat brightness) although the screen's physical brightness remains the same. Only if I execute that command inside a true TTY terminal will the screen's physical brightness change along with the value of 'brightness'

and btw, I had to do:
sudo bash -c "sudo echo 5 > /sys/class/backlight/apple_backlight/brightness

Offline

#4 2016-01-10 20:33:52

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

Re: brightness control not working on macbook

Yeah, that looks better than mine -- except for missing closing quote smile


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

#5 2016-01-10 20:41:00

jayache80
Member
Registered: 2015-11-19
Posts: 23

Re: brightness control not working on macbook

"

smile

So how do I get my BrightnessUp and BrightnessDown commands from my desktop environment to run in the TTY? What is difference between running that command in TTY vs terminal emulator?

Offline

#6 2016-01-10 20:44:51

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

Re: brightness control not working on macbook

I have no clue.  What I was really trying to determine is that the command was being run as root, not as whoever owned the shell/console from which the command was issued.


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