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

doesn't work on 4.4, but works on 3.10.32 #42

Closed
imz opened this issue Mar 6, 2018 · 8 comments
Closed

doesn't work on 4.4, but works on 3.10.32 #42

imz opened this issue Mar 6, 2018 · 8 comments
Labels

Comments

@imz
Copy link

imz commented Mar 6, 2018

I have a problem on linux 4.4.119, but not on linux 3.10.32:

smbios-lcd-brightness --value=1

has a visible effect on linux 3.10.32, but not on linux 4.4.119, though the saved value is modified indeed.

Do you have some ideas?

python-module-smbios-2.3.3-alt1.0.g4fec2ad.noarch
libsmbios-2.3.3-alt1.0.g4fec2ad.x86_64
smbios-utils-2.3.3-alt1.0.g4fec2ad.x86_64

Dell Latitude 6430u

@imz
Copy link
Author

imz commented Mar 6, 2018

@imz
Copy link
Author

imz commented Mar 6, 2018

The situation was the same with older libsmbios-2.2.28-alt1.1

@imz
Copy link
Author

imz commented Mar 6, 2018

It runs like this (but there is no effect):

[root@ovicaa ~]# smbios-lcd-brightness --value=15
Reading current Battery mode setting
    current: 1
        min: 0
        max: 15
Write new Battery mode setting
Reading current Battery mode setting
    current: 15
        min: 0
        max: 15
[root@ovicaa ~]# smbios-lcd-brightness --value=1
Reading current Battery mode setting
    current: 15
        min: 0
        max: 15
Write new Battery mode setting
Reading current Battery mode setting
    current: 1
        min: 0
        max: 15
[root@ovicaa ~]# 

@superm1
Copy link
Contributor

superm1 commented Mar 6, 2018

I would suspect it's related to:

  1. The built-in handling from the dell-laptop kernel driver.
    or
  2. A move to intel graphics driver handling brightness instead

@imz
Copy link
Author

imz commented Mar 7, 2018

Yes, thanks for the ideas. Perhaps, it's the video driver which can control this now. (Whose "move" has this been? Doesn't dcdbas and smbios work on its own?)

 cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness

now makes it bright, and

 echo 0 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness

makes it non-bright.

@superm1
Copy link
Contributor

superm1 commented Mar 7, 2018

I would definitely recommend using that interface instead. It means that there doesn't have to be a SMI invoked in order to accomplish changing the backlight. You'll have better performance this way.

@superm1 superm1 closed this as completed Mar 7, 2018
@imz
Copy link
Author

imz commented Mar 7, 2018

On 3.10.32, there were 3 interfaces and all worked. (Now, I could remember that I tried them all a long time ago and selected smbios as my choice.)

They all work, i.e., have a visible effect. Their values are in different units. Their values affect each other, but in a funny way:

  • Setting through smbios-lcd-brightness affects /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness, but not /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness:
[root@ovicaa ~]# cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness; cat /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness; smbios-lcd-brightness 
976
100
Reading current Battery mode setting
    current: 15
        min: 0
        max: 15
[root@ovicaa ~]# smbios-lcd-brightness --value=1
Reading current Battery mode setting
    current: 15
        min: 0
        max: 15
Write new Battery mode setting
Reading current Battery mode setting
    current: 1
        min: 0
        max: 15
[root@ovicaa ~]# cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness; cat /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness; smbios-lcd-brightness 
168
100
Reading current Battery mode setting
    current: 1
        min: 0
        max: 15
[root@ovicaa ~]# 
  • Setting /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness affects /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness and the value reported by smbios-lcd-brightness:
[root@ovicaa ~]# cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness; cat /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness; smbios-lcd-brightness 
976
100
Reading current Battery mode setting
    current: 15
        min: 0
        max: 15
[root@ovicaa ~]# echo 0 > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
[root@ovicaa ~]# cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness; cat /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness; smbios-lcd-brightness 
168
0
Reading current Battery mode setting
    current: 1
        min: 0
        max: 15
[root@ovicaa ~]# 
  • Setting /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness doesn't affect other values:
[root@ovicaa ~]# cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness; cat /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness; smbios-lcd-brightness 
976
100
Reading current Battery mode setting
    current: 15
        min: 0
        max: 15
[root@ovicaa ~]# echo 168 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness
[root@ovicaa ~]# cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness; cat /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness; smbios-lcd-brightness 
168
100
Reading current Battery mode setting
    current: 15
        min: 0
        max: 15
[root@ovicaa ~]# 

So, it seems for /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness to have been the best place to set the value so that all reported values are consistent.

However, in linux 4.4, there is no /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness.

@superm1
Copy link
Contributor

superm1 commented Mar 8, 2018

That's a pretty peculiar combination. I would recommend to just stick with the intel one.

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

No branches or pull requests

2 participants