4

I know there are many similar questions already but none of the solutions listed there helped me.

Laptop: ASUS N551VW

VGAs: Intel Skylake (00:02.0) + nVidia GTX 960M (01:00.0)

Distro: Linux Mint 18 (tried also on Debian 8.6 with the same result) Kernel is updated to 4.4.0-43-generic x86_64

Contents of /sys/class/backlight:

intel_backlight

Reading from brightness, actual_brightness and max_brightness in that folder all give a 913 value. Writing into those has no effect.

What have I tried:

  1. Playing with kernel options in /etc/default/grub:

    acpi_osi=
    acpi_osi=Linux
    acpi_backlight=intel
    acpi_backlight=native
    acpi_backlight=vendor
    video.use_native_backlight=1
    

And their various combinations.

The only effect setting acpi_backlight to native/vendor has is that the GUI stops recognizing the fact I'm pressing the fn keys and doesn't display the brightness icon with it's current level (as it thinks). Without these settings it shows the icon with its level but the real brightness stays at maximum.

  1. Running xbacklight has no effect (despite it's showing no errors and stops for a fraction of second before returning).

If I switch to Intel adapter and try running it with -set - it hangs the laptop completely (restartable only with power button).

  1. Writing brightness value directly using setpci. Has no effect at all.

The most funny part is that in BIOS and BIOS splash screen I can change the brightness using fn+f5 and fn+f6 without any problems but as soon as the Linux starts it sets the brightness to the maximum level and doesn't let to change anymore.

Not sure what else to try.

Upd:

ddccontrol -p -r 0x10 -w 50 output:

ddccontrol version 0.4.2
Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)
Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)
This program comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of this program under the terms of the GNU General Public License.

Probing for available monitors....I/O warning : failed to load external entity "/usr/share/ddccontrol-db/monitor/LGD046F.xml"
Document not parsed successfully.
....
Detected monitors :
 - Device: dev:/dev/i2c-3
   DDC/CI supported: No
   Monitor Name: VESA standard monitor
   Input type: Digital
No monitor supporting DDC/CI available.
If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver).

Upd2:

Upgrading the kernel to 4.8.4 and setting the kernel options string to acpi_osi= solved the issue.

  • 1. Do you see any changes using ddcontrol? i.e. modprobe i2c-dev; ddccontrol -p -r 0x10 -w 50 2. Anything interesting in dmesg | grep acpi? – Dmitry Grigoryev Oct 17 '16 at 18:02
  • Are you able to modprobe asus-specific kernel modules, likeasus_acpi or asus_laptop? – Dmitry Grigoryev Oct 17 '16 at 18:09
  • modprobe i2c-dev outputs nothing (I assume that's a success). ddccontrol output: pastebin.com/Yv43eHb9 – mephisto123 Oct 18 '16 at 10:48
  • 1
    Added it to the question. – mephisto123 Oct 18 '16 at 13:37
  • 1
    Gee, I'm out of ideas then. I know my upvote won't help you as much as an aswer would, but I doubt I'll be able to give one. – Dmitry Grigoryev Oct 18 '16 at 13:44
1

Since you have tried many solutions without success, I think your hardware is simply too new for your kernel...
Try a more recent kernel (or simply a live distro with a more recent kernel e.g. ubuntu 16.10 has got the 4.8...)

  • Unfortunately, it does not work in Ubuntu 16.10 either. It doesn't react to the keys at all. evtest doesn't show any events when pressing these keys. – mephisto123 Oct 25 '16 at 19:55
2

First, setting the brightness and getting Fn key events are two different things.

1a) Figure out which /dev/input/event* device is for your keyboard. (Look at /dev/input/by-id or /dev/input/by-path and follow the symlinks, look at demsg/syslog, or just test all of them). Run evtest on this device, and press the Fn brightness keys. Do you get key events? If yes, good. If no, it probably generates ACPI events, if it does generate events at all without special drivers.

1b) Run xev, move mouse in the window, press Fn keys. Do you get key events? Already ones which have BRIGHTNESS in their name? If yes, good: The translation into X events works.

2) As root, write a number into brightness:

echo 500 > /sys/class/backlight/intel_backlight/brightness

(if this is the correct path). If you want to use sudo, you also need e.g. tee (output redirection is not done as root). Does the brightness change? If yes, good.

If you can answer "yes" to all these questions, all that is needed is some program (e.g. your window manager, or whatever desktop you run) to react to the key events and change the brightness. If the answer is "no", it will get more difficult.

And it's not funny at all that those keys work in the BIOS, because the BIOS already knows which variant you have and interprets them correctly, while Linux doesn't know how to do it (yet).

  • Thank you for the answer. However, as I wrote in my question, keys DO work if I'm not using any kernel parameters that force using of native backlight. However, they do nothing besides displaying the brightness icon on the screen and changing its level. i.e. the system thinks it's changing the brightness but it doesn't. Second, as I wrote in my question, changing /sys/class/backlight/intel_backlight/brightness (nor actual_brightness nor max_brightness) does nothing. – mephisto123 Oct 17 '16 at 14:41
  • "Displaying the brightness icon" is not the same as "work". The BIOS may display the brightness icon (but have a wrong idea about what it should change), or your desktop software may display a brightness icon. If we don't know which (and we don't know unless we find out if you get key events or not), we don't know which part is the problem. And you wrote you used setpci, not that you wrote to backlight. If the Intel chip is not controlling the backlight, but something ASUS specific is, it will get difficult. – dirkt Oct 17 '16 at 14:50
  • The brightness icon is displayed by the WM (Cinnamon). That's why I'm sure the Linux is understanding the keys. Sorry for being unclear on this part. I've tried writing the value using "/sys/class/backlight/intel_backlight/brightness" - no effect. The laptop has a hybrid video - Intel + nVidia. I've tried writing into backlight both when intel and nVidia cards were active, no difference. – mephisto123 Oct 17 '16 at 17:08
  • So some piece of hardware is controlling the backlight, we don't know which one, and we know it's not the intel hardware, and we know it's not on some I2C bus, at least none with the known controllers. Could be some hardware belonging to the NVidia card, or could be something else. Last resorts: (1) disassemble the ACPI tables and look if something stands out, (2) try the closed-source NVIDIA driver and hope it has some features to control the backlight, (3) reverse-engineer the windows driver, (4) reverse-engineer the BIOS. – dirkt Oct 19 '16 at 16:32
  • nVidia proprietary driver is already installed and it doesn't help :( Disassembling/reverse engineering is not an option since I don't have time for that unfortunately. It will take weeks. But thanks for trying to help anyway. – mephisto123 Oct 19 '16 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.