Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
Hello Everybody, I just installed openSUSE on my Lenovo G430 and was surprised (& happy) to find out that the brightness control in the keyboards actually works. I thought it ...
  1. #1
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229

    [SOLVED] Brightness Control in Laptop (Fedora 10)

    Hello Everybody,

    I just installed openSUSE on my Lenovo G430 and was surprised (& happy) to find out that the brightness control in the keyboards actually works.

    I thought it was a hardware issue between Lenovo & Linux since I have also the same problem with my other Linux partitions. For your information, I have the following: Fedora, Debian, Mandriva, Mint, & PCLinux.

    This feature however works perfectly fine in my XP partition.

    May I kindly ask for help regarding this matter please? If it is possible to also make the brightness control work in my other Linux partitions?

    I would like to start to ask for help specifically for Fedora since this is where I spend most of my time when I use my laptop.

    Thanks in advance!

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Well, according this page, you can try
    Code:
    xrandr –output LVDS –set BACKLIGHT_CONTROL native

  3. #3
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    I think I did not execute it correctly.

    Can you please help me understand the output?

    Code:
    [jun@localhost ~]$ xrandr –output LVDS –set BACKLIGHT_CONTROL native
    usage: xrandr [options]
      where options are:
      -display <display> or -d <display>
      -help
      -o <normal,inverted,left,right,0,1,2,3>
                or --orientation <normal,inverted,left,right,0,1,2,3>
      -q        or --query
      -s <size>/<width>x<height> or --size <size>/<width>x<height>
      -r <rate> or --rate <rate> or --refresh <rate>
      -v        or --version
      -x        (reflect in x)
      -y        (reflect in y)
      --screen <screen>
      --verbose
      --dryrun
      --prop or --properties
      --fb <width>x<height>
      --fbmm <width>x<height>
      --dpi <dpi>/<output>
      --output <output>
          --auto
          --mode <mode>
          --preferred
          --pos <x>x<y>
          --rate <rate> or --refresh <rate>
          --reflect normal,x,y,xy
          --rotate normal,inverted,left,right
          --left-of <output>
          --right-of <output>
          --above <output>
          --below <output>
          --same-as <output>
          --set <property> <value>
          --off
          --crtc <crtc>
      --newmode <name> <clock MHz>
                <hdisp> <hsync-start> <hsync-end> <htotal>
                <vdisp> <vsync-start> <vsync-end> <vtotal>
                [+HSync] [-HSync] [+VSync] [-VSync]
      --rmmode <name>
      --addmode <output> <name>
      --delmode <output> <name>
    [jun@localhost ~]$

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    My mistake. Try it with two hyphens.

    Code:
    xrandr --output LVDS --set BACKLIGHT_CONTROL native
    Also found this:
    Fn key brightness settings | Mandriva Forum

    and from here:
    Code:
    su -
    setpci -s 00:02.1 F4.B=XX
    Where XX in a hex number from 00 to FF.

  5. #5
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    Quote Originally Posted by reed9 View Post
    My mistake. Try it with two hyphens.

    Code:
    xrandr --output LVDS --set BACKLIGHT_CONTROL native
    Also found this:
    Fn key brightness settings | Mandriva Forum

    and from here:
    Code:
    su -
    setpci -s 00:02.1 F4.B=XX
    Where XX in a hex number from 00 to FF.
    Hello reed9,

    IT's WORKING!

    Thank you!

    The screen blinked after I executed this:

    Code:
    [jun@localhost ~]$ su -
    Password: 
    [root@localhost ~]# xrandr --output LVDS --set BACKLIGHT_CONTROL native

    However, the second command gave me this:

    Code:
    [root@localhost ~]# setpci -s 00:02.1 F4.B=XX
    setpci: Invalid value "XX"
    
    Usage: setpci [<options>] (<device>+ <reg>[=<values>]*)*
    
    General options:
    -f		Don't complain if there's nothing to do
    -v		Be verbose
    -D		List changes, don't commit them
    
    PCI access options:
    -A <method>	Use the specified PCI access method (see `-A help' for a list)
    -O <par>=<val>	Set PCI access parameter (see `-O help' for a list)
    -G		Enable PCI access debugging
    -H <mode>	Use direct hardware access (<mode> = 1 or 2)
    
    Setting commands:
    <device>:	-s [[[<domain>]:][<bus>]:][<slot>][.[<func>]]
    	|	-d [<vendor>]:[<device>]
    <reg>:		<number>[.(B|W|L)]
         |		<name>
    <values>:	<value>[,<value>...]
    <value>:	<hex>
           |	<hex>:<mask>
    [root@localhost ~]#
    Do you think I still have to pursue the second command? Its working anyway...

    EDIT: Done also in Mint.
    Last edited by nujinini; 10-15-2009 at 03:33 AM.

  6. #6
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    I just noticed that when I make a reboot, the control of the brightness is also gone

    However, when I execute this :
    Code:
    xrandr –screen LVDS –set BACKLIGHT_CONTROL
    It comes back. Is there a way to make it like, more permanent. So that I do not have to manually install every time I use? Just curious

  7. #7
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Create a file in /etc/init.d/
    Code:
    gksudo gedit /etc/init.d/brightness.sh
    Contents of the file
    Code:
    #!/bin/sh
    xrandr –screen LVDS –set BACKLIGHT_CONTROL
    make executable and run at boot
    Code:
    sudo chmod +x /etc/init.d/brightness.sh
    sudo update-rc.d /etc/init.d/brightness.sh defaults

  8. #8
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    Hello,

    Code:
    [root@localhost ~]# nano /etc/init.d/brightness.sh
     GNU nano 2.0.6        File: /etc/init.d/brightness.sh                      
    
    #!/bin/sh
    xrandr --screen LVDS --set BACKLIGHT_CONTROL
    
    
    
    
    
    ^G Get Help ^O WriteOut ^R Read File^Y Prev Page^K Cut Text ^C Cur Pos
    ^X Exit     ^J Justify  ^W Where Is ^V Next Page^U UnCut Tex^T To Spell
    
    SAVED
    Code:
    [root@localhost ~]# chmod +x /etc/init.d/brightness.sh
    [root@localhost ~]#
    Code:
    [root@localhost ~]# update-rc.d /etc/init.d/brightness.sh defaults
    -bash: update-rc.d: command not found
    [root@localhost ~]#
    I not sure about this third command...

    Thanks!

  9. #9
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    I swear my brain is going. I forgot you're using Fedora, not Ubuntu.

    Change update-rc.d to
    Code:
    chkconfig --add /etc/init.d/brightness.sh

  10. #10
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    I don't know if it's really preferable or not, but I would usually just edit /etc/rc.local and add your command. I went with adding the script to /etc/init.d/ because of my Ubuntu confusion - Ubuntu doesn't have /etc/rc.local.

    The Fedora Basics FAQ

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...