[Solved] Can't set laptop screen brightness

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
Aleron Ives
Level 3
Level 3
Posts: 122
Joined: Sun Sep 17, 2017 2:20 am
Location: California
Contact:

[Solved] Can't set laptop screen brightness

Postby Aleron Ives » Mon Sep 18, 2017 12:21 am

I'm using a Thinkpad P51 with an i7-7700HQ (Kaby Lake) and an nVidia Quadro M1200 with Mint 18.2 x64 Cinnamon, and for some reason, I can't set the brightness of my display. At first using the Fn key had no effect whatsoever, and when I clicked on the power icon on the panel, it had a slider for the keyboard backlight, but there was no slider for the display brightness at all.

I managed to improve the situation slightly by modifying a line in my /etc/default/grub file:

Code: Select all

original

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

new

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"


Now there is a display brightness slider in the power manager, and when I press the Fn keys, the brightness popup appears; unfortunately, I still can't actually change the brightness. When I use the Fn keys, the brightness bar in the popup is nearly empty, and if I try to raise the brightness, the bar twitches but stays in the same spot. If I try to make the brightness go down, the bar becomes empty, but the display's brightness doesn't actually change. I can move the slider in the power manager freely, but doing so has no effect on the brightness, no matter where I put the slider.

One possible solution I've found is described here:

https://ubuntuforums.org/showthread.php ... st12981340

but this solution is for Intel graphics, and I've disabled the iGPU and run on the nVidia chip exclusively, as everything I've read indicates that trying to switch between the iGPU and dGPU is a major pain on Linux.

I've read that you need a fairly new kernel (>=4.10) to fully support Kaby Lake hardware, so I tried updating my kernel from the stock 4.8 to 4.11.14 using the update manager, but sadly it hasn't had any effect on the problem.

I sure hope somebody has an idea for how to fix this, as running at maximum brightness all the time will make it hard to get decent battery life.
Last edited by Aleron Ives on Mon Oct 23, 2017 5:52 am, edited 1 time in total.

User avatar
Faust
Level 3
Level 3
Posts: 196
Joined: Thu Jul 14, 2016 3:40 am

Re: Can't set laptop screen brightness

Postby Faust » Mon Sep 18, 2017 2:36 am

Have a look here :-
viewtopic.php?f=18&t=250837&p=1365424&hilit=xrandr#p1365424

https://cinnamon-spices.linuxmint.com/applets/view/286

It worked for me , after months of trying everything I could find :D
" And so it goes " - Kurt Vonnegut
The modern reality and the satirical parody are rapidly converging .

Aleron Ives
Level 3
Level 3
Posts: 122
Joined: Sun Sep 17, 2017 2:20 am
Location: California
Contact:

Re: Can't set laptop screen brightness

Postby Aleron Ives » Mon Sep 18, 2017 3:15 am

Thanks for the reply! Does the brightness setting on that applet adjust the screen backlight, or is it only changing the characteristics of the video output? I need a way to adjust the backlight, since my screen is set at maximum brightness all the time, and reducing the backlight is one of the biggest ways to conserve battery power.

Aleron Ives
Level 3
Level 3
Posts: 122
Joined: Sun Sep 17, 2017 2:20 am
Location: California
Contact:

Re: Can't set laptop screen brightness

Postby Aleron Ives » Sun Oct 22, 2017 4:49 am

I've been battling this some more and have new results... and a possible solution I don't know how to implement. I've since tried multiple ACPI settings in grub:

Code: Select all

acpi_osi=Linux
acpi_osi=\"!Windows 2012\"
acpi_backlight=vendor
acpi_backlight=native
acpi_backlight=video
acpi_backlight=none


All of these solutions either leave me with no backlight control at all or at my previous situation of a backlight control that is always stuck at 0. Looking at /sys/class/backlight, I have a folder called "thinkpad_screen". In this folder are the files you would expect to find:

Code: Select all

actual_brightness
bl_power
brightness
max_brightness
type
uevent


The values of actual_brightness and brightness are both 0, while max_brightness is 15, which explains why I can't set the brightness: Linux thinks it's at 0 right now, even though it's actually at maximum.

I decided to do an experiment and check these values in Fedora, which does allow me to change my brightness. In Fedora 26, I have a /sys/class/backlight/nv_backlight folder, and the values of actual_brightness and brightness reflect the true brightness level, while max_brightness is 100, instead of 15.

The only thing I can find to explain the difference is the value of the "type" file: in Fedora, it's "raw", and in Mint, it's "platform". According to this documentation:

https://git.kernel.org/pub/scm/linux/ke ... -backlight

The possible values of "type" are firmware|platform|raw. I would like to try changing the value to raw in Mint to see if I can get the backlight control working, but... I don't know how. People suggest that you can use this command to change the brightness manually:

echo 5 | sudo tee /sys/class/backlight/<your_backlight>/brightness

but this produces permission denied errors if I try to echo a value of "raw" into the type file. Does anybody know how to force the backlight type to a specific value and override the default type? Maybe using "raw" will enable the backlight controls on Mint, if I could figure out how to change it...

User avatar
Pjotr
Level 18
Level 18
Posts: 8854
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Can't set laptop screen brightness

Postby Pjotr » Sun Oct 22, 2017 5:29 am

Try this progressive scheme:
https://sites.google.com/site/easylinux ... adjustable
(item 6 and further, left column)
Tip: 10 things to do after installing Linux Mint 18.2 Sonya
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Aleron Ives
Level 3
Level 3
Posts: 122
Joined: Sun Sep 17, 2017 2:20 am
Location: California
Contact:

Re: Can't set laptop screen brightness

Postby Aleron Ives » Sun Oct 22, 2017 6:14 am

Thanks for the reply, Pjotr. Sadly, none of your suggestions work. As I've written above, none of the ACPI kernel parameters for grub fix my backlight control, although using acpi_osi=Linux causes Mint to at least detect that my display has backlight settings; without it, Mint thinks my display has no backlight controls whatsoever. My laptop has Optimus, but I have the iGPU disabled in the UEFI, so I'm running exclusively on the nVidia chip (Quadro M1200). I see your suggestion to create /usr/share/X11/xorg.conf.d/20-intel.conf quite often in my searches, yet I've never seen any examples of how to create such a file for a non-Intel GPU, if such a thing is even possible.

I had already installed xbacklight, and although I can run the command, it has no effect on my backlight. Neither -set nor -inc/dec cause any change. My lspci result is: 01:00.0 VGA compatible controller: NVIDIA Corporation Device 13b6 (rev a2); however, the setpci command has no effect on the backlight, either. I don't suppose you know how to change the backlight type in /sys/class/backlight from "platform" to "raw"?

User avatar
Faust
Level 3
Level 3
Posts: 196
Joined: Thu Jul 14, 2016 3:40 am

Re: Can't set laptop screen brightness

Postby Faust » Sun Oct 22, 2017 6:16 am

Brightness control - there are so many threads on this topic , and not only on this forum , and not just with Mint !
Try typing "brightness " into the search box at the top right of this page to see .....

I think it would be helpful for many folks with this problem if all of those results could be put in one place .
I don't think there are sticky or pinned topics on this forum , so maybe a new thread called
" Brightness control / problems /issues/solutions " ?

There is clearly no single " one size fits all " solution for this ; no click-and-solve .
But there are plenty of satisfied folk on here who found a solution , eventually , but they probably did a whole lot
of wading to get there .... I know I did , for months !

I'll list just a few of them :-

Screen too bright
viewtopic.php?f=47&t=247674&p=1330322#p1330322
fn+F7 and fn+F8 not working on LM18.1, Asus r laptop, 64
viewtopic.php?f=49&t=238094&p=1275435#p1275435
Brightness not working
viewtopic.php?f=59&t=250038&p=1358132&hilit=Brightness#p1358132
[SOLVED] Fn keys not affecting brightness? Mint MATE 18.2 64-bit w/ 4.10.0-27 Kernel
viewtopic.php?f=59&t=250106&p=1344812#p1344812
viewtopic.php?f=90&t=250736&p=1349558#p1349558

For myself , I recently found my own favorite fix to this irritating and widespread problem here -
viewtopic.php?f=18&t=250837&p=1365406&hilit=faust#p1365406
Last edited by Faust on Sun Oct 22, 2017 8:09 am, edited 1 time in total.
" And so it goes " - Kurt Vonnegut
The modern reality and the satirical parody are rapidly converging .

Aleron Ives
Level 3
Level 3
Posts: 122
Joined: Sun Sep 17, 2017 2:20 am
Location: California
Contact:

Re: Can't set laptop screen brightness

Postby Aleron Ives » Sun Oct 22, 2017 6:36 am

Yeah, it's definitely a common problem. Many of the threads you linked are related to xrandr, which doesn't solve this problem. The --brightness switch on xrandr allows you to adjust the gamma of your screen, which does let you make it appear brighter or dimmer, but it has no effect on the backlight, so you get no battery savings from using xrandr. The xrandr manpage mentions using xbacklight to truly change the screen brightness, but sadly I've already tried xbacklight to no avail.

User avatar
Faust
Level 3
Level 3
Posts: 196
Joined: Thu Jul 14, 2016 3:40 am

Re: Can't set laptop screen brightness

Postby Faust » Sun Oct 22, 2017 8:31 am

Aleron Ives wrote:..... but it has no effect on the backlight, so you get no battery savings from using xrandr. ......


Yes ..... exactly that !
Not only is it annoying to the eyes , it is annoying to know that valuable battery time is being wasted , on something that you don't even want ,
and can't control properly .

Same goes for Bluetooth on Mint 17.3 ( and Ubuntu , and other derived distros ).
It is ON by default on booting , so the user has to turn it OFF again each time .
Changing it in "Settings " is not sticky ; only the " Visibility " option retains your preferences on reboot .... so there is more wasted battery !
{Yes I know , that is OT .... I'll start a separate thread :) }

I have very few complaints with Mint , but those two problems irritate me !
:D
" And so it goes " - Kurt Vonnegut
The modern reality and the satirical parody are rapidly converging .

User avatar
sebastjava
Level 1
Level 1
Posts: 20
Joined: Wed Jun 28, 2017 8:01 pm
Location: Montréal
Contact:

Quick test: laptop screen brightness

Postby sebastjava » Sun Oct 22, 2017 1:40 pm

Are you using MATE?
You could try this quick simple test:
  1. Re-Set ACPI in Grub to your "previous situation of a backlight control that is always stuck at 0", like acpi_backlight=vendor maybe?
  2. Open mate-system-monitor and stop mate-power-manager just one minute.
  3. Now try changing brightness with the function keys...
Did it work? If the answer is "yes", check this:
https://github.com/mate-desktop/mate-po ... issues/216

If you are not on MATE, you could try to switch off the brightness control on your power-manager.

Aleron Ives
Level 3
Level 3
Posts: 122
Joined: Sun Sep 17, 2017 2:20 am
Location: California
Contact:

Re: Can't set laptop screen brightness

Postby Aleron Ives » Sun Oct 22, 2017 9:10 pm

Thanks for the suggestion. I'm using Cinnamon, so I opened the system monitor and stopped the "csd-power" process. When I do that, the Fn brightness hotkeys have no effect anymore and no longer cause the brightness OSD to appear. When I resume the "csd-power" process, the Fn keys are able to trigger the brightness OSD again, but the bar is still stuck, as before.

I'm pretty sure that the reason none of this works is that the kernel isn't able to communicate with my backlight properly. Since the value of /sys/class/backlight/thinkpad_screen/actual_brightness is 0, even when the screen is quite bright, Mint seems unable to tell what brightness level my screen is using, and thus the hotkeys (and the slider) have no effect. My only lead is the fact that Fedora thinks /sys/class/backlight/nv_screen/type is "raw", while Mint thinks the type is "platform". I've been searching for a kernel parameter I can use in grub to force the backlight type to "raw" in Mint, but I've come up empty so far.

Aleron Ives
Level 3
Level 3
Posts: 122
Joined: Sun Sep 17, 2017 2:20 am
Location: California
Contact:

Re: Can't set laptop screen brightness

Postby Aleron Ives » Mon Oct 23, 2017 5:51 am

After ~40 days of off and on tinkering, I finally fixed it! :D

It turns out that updating to kernel 4.10.0-37-generic from the Update Manager solved the problem. I had already tried using kernel 4.11 from the Update Manager's separate kernel menu, thinking that a newer kernel would surely be better than an older one, so when that didn't work, I figured that using 4.10 wouldn't work, either. Kernel 4.10 is the latest one displayed in the main list of updates for me, whereas 4.11 is only available in the hidden kernels menu, so I guess this is why.

Using the acpi_osi=Linux boot parameter causes the same broken behaviour as on kernel 4.8 and 4.11 - the brightness OSD appears but is stuck at 0. When I removed that parameter, two things changed: /sys/class/backlight now shows nv_backlight instead of thinkpad_backlight, and /sys/class/backlight/nv_backlight/type is now "raw" instead of "platform". Both of these changes mirror what Fedora was showing me, including having valid values appear in the brightness and actual_brightness files. There is still one minor bug (or feature, depending upon how you look at it), in that the minimum brightness setting actually turns the backlight completely off; this didn't happen in Fedora, but IMHO this could be useful for setting a "turn off display" hotkey, so I'm not complaining.

Thanks to everybody who contributed possible solutions to my display woes.


Return to “Graphic Cards & Monitors”