LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bodhi (https://www.linuxquestions.org/questions/bodhi-92/)
-   -   Bodhi Laptop Backlight Slider doesn't work for me (https://www.linuxquestions.org/questions/bodhi-92/bodhi-laptop-backlight-slider-doesnt-work-for-me-4175655989/)

enigma9o7 06-18-2019 06:01 PM

Bodhi Laptop Backlight Slider doesn't work for me
 
Topic sums it up. The moksha gadget doesn't do anything, slide up, slide down, nothing changes.

It's a sony laptop (VPCF115FM) and fn+f5/fn+f6 also are supposed to adjust it, but they don't do anything under bodhi either.

enigma9o7 06-18-2019 07:22 PM

Here are some clues.

If I press FN+F5 a bunch of times,then reboot, my backlight is quite dim. Slider is still all the way up. [I must then FN+f6 a bunch of times then reboot to get bright again.]

If I turn the slider all the way down, then reboot, my backlight is quite dim. Slider is back to the top tho. [I must then FN+f6 a bunch of times then reboot to get bright again.]

Basically, my conclusion is that backlight changes don't take effect until after reboot, and the slider (moksha module) apparently can't read the current state (on my hardware).

Obviously, my goal is immediate changes.

rbtylee 06-19-2019 11:37 AM

Do the backlight buttons work in any other distro? I mean everything is working ok here, or as programmers are fond of saying it is working on my machine ;)

BW-userx 06-19-2019 12:31 PM

I hope you have learned how to use a terminal and some basic cli commands, if you are willing to looking your system file-system to be sure of correct paths/dir you can use this or at least check to see if your system is even willing to turn up your lights.

Code:


#!/bin/bash

# for use to set laptop backlight on
# hp 8460p with ATI graphics card, and hp 840 g2
#
# Ran with user with sudo permissions
# set at nopasswd
# put in $HOME/bin
#set in .bashrc
#if [ -d "$HOME/bin" ] ;
        #then PATH="$HOME/bin:$PATH"
#fi

#Monday Feb 18, 2019


#set -x

if [[ -z $1 ]] ; then
        #check for hp 8460p setting or hp 840 g2 setting
        [[ -d /sys/class/backlight/radeon_bl0/brightness ]] && \
        { sudo su -c ' echo 200 >  /sys/class/backlight/radeon_bl0/brightness' ; \
          echo "Backlight Max setting is $(cat /sys/class/backlight/radeon_bl0/max_brightness)" ; \
          echo "Backlight is set at $(cat /sys/class/backlight/radeon_bl0/brightness) " ; }
         
          [[ -d /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight ]] && \
          { sudo su -c 'echo 800 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness' ; \
                  echo "Backlight Max setting is $(cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/max_brightness)" ; \
                  echo "Backlight is set at $(cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness)" ; }
else
        [[ -d /sys/class/backlight/radeon_bl0/brightness ]] && { sudo su -c 'echo "$1" >  /sys/class/backlight/radeon_bl0/brightness' ;
        echo "Backlight Max setting is $(cat /sys/class/backlight/radeon_bl0/max_brightness)" ;
          echo "Backlight is set at $(cat /sys/class/backlight/radeon_bl0/brightness) " ; }
         
          [[ -d /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight ]] &&  { sudo su -c 'echo $1 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness' ;
                echo "Backlight Max setting is $(cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/max_brightness)" ; \
                echo "Backlight is set at $(cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness)" ; }
fi

[[ $? -gt '0' ]] && { echo $? ; }

you should just use this as a template to your own systems blacklight dir and look at the files within it to get the right ones to use , you max and current light settings, then just run it according to you system, not mine. It will brighten up your day if you get it to work. :D

enigma9o7 06-20-2019 02:50 PM

Quote:

Originally Posted by rbtylee (Post 6007189)
Do the backlight buttons work in any other distro? I mean everything is working ok here, or as programmers are fond of saying it is working on my machine ;)

Under windows 10, the slider works fine. The function keys don't do anything but I believe that's due to lack of Sony software installed.

I booted puppy. There is no built in slider. However I did learn something useful when I searched how to set brightness in puppy. By changing /sys/class/backlight/acpi_video0/brightness it works. (I didn't think to check the F-keys)

Back in my Bodhi installation, I see the slider is adjusting that the value in that file too. One difference is I'm using nvidia drivers under bodhi, whereas puppy was just live usb using noveau.

So I booted Bodhi live usb. Slider works fine. So I think it's somehow nvidia driver related...

enigma9o7 06-20-2019 03:04 PM

Quote:

Originally Posted by BW-userx (Post 6007209)
you should just use this as a template to your own systems blacklight dir and look at the files within it to get the right ones to use , you max and current light settings, then just run it according to you system, not mine. It will brighten up your day if you get it to work. :D

Doesn't seem I have any of the applicable files...
https://i.imgur.com/nRrgLMq.jpg

BW-userx 06-20-2019 03:25 PM

make google your friend. look at https://wiki.archlinux.org/index.php/Backlight
in the nvidia part, towards the bottom of page and see if that does anything.

enigma9o7 06-20-2019 03:26 PM

Solved. Once I knew to search Nvidia related, I found a solution.

create /usr/share/X11/xorg.conf.d/10-nvidia-brightness.conf with the following:
Code:

Section "Device"
    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    Option        "RegistryDwords" "EnableBrightnessControl=1"
EndSection


rbtylee 06-20-2019 03:39 PM

Good Job :) Glad you worked it out.


All times are GMT -5. The time now is 06:23 AM.