3

On Knsole(GUI) I executed

xrandr --output HDMI1 --brightness 976

then the screen turned to almost a white board. I can't use GUI any more. Press ctrl+alt+F2, got a tty. I want to reset brightness, but execute xrandr got

can't not open display

Can I change brightness from tty?

9
  • 1
    Have you actually tried setting the display variable? e.g. DISPLAY=:0 xrandr --output HDMI1 --brightness 1.0 Commented Dec 31, 2017 at 1:41
  • Tried, but got can't open display :0 Commented Dec 31, 2017 at 2:20
  • Well the primary X server display may be something other than :0 - check with ps -ef | grep '[X]org' for example Commented Dec 31, 2017 at 2:32
  • Confirmed, it's :0 loginctl show-session c1 | grep Display Display=:0 Commented Dec 31, 2017 at 2:49
  • 2
    So the issue was that you were logging into the tty as a different user from that owning the display? Commented Dec 31, 2017 at 3:28

2 Answers 2

5

Try

echo 4 > /sys/class/backlight/acpi_video0/brightness

That will set brightness to 40%. You may need to change the directory to match your video card. Note also that you'll have to be in the video group.

xbacklight can be also helpful, e.g.

xbacklight -d :0 -dec 30

should decrease brightness by 30%.


Be aware that these two are hardware modification (people usually prefer that to manipulate screen brightness), and your initial command xrandr --brightnes uses software to manipulate gamma. The screen may or may not look exactly the same after applying these different techniques.

4
  • Awesome use of /sys. Although I'm pretty sure @steeldriver's command should also work. Commented Dec 31, 2017 at 1:46
  • I reboot and solved problem. I tried xbacklight -d :0 -dec 30 in GUI, no error but nothing happened. Only xrandr --output HDMI1 --brightness .8 change brightness as expected. Commented Dec 31, 2017 at 2:33
  • @AladinLee How about xbacklight -d :0 -set 10? Commented Dec 31, 2017 at 2:37
  • Also no effect. And also change /sys/class/backlight/intel_backlight/brightness no effect. Commented Dec 31, 2017 at 2:42
1

The command you are using:

xrandr --output HDMI1 --brightness 976

is telling xrandr to set the brightness 976 times higher than normal.

  • 1.0 sets to normal brightness
  • 1.1 sets 10% above normal brightness but it's not recommended to go over 1.0 as colours wash out.
  • 0.75 or .75 sets to 75% of normal brightness
  • 0.66 sets to 2/3 normal brightness, etc.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.