Bash Script for Brightness Controls For Samsung 535u3c in Lubuntu/Ubuntu/Linux

The default proprietary linux display drivers in Xorg for Lubuntu which I installed in my Samsung 535u3c ultrabook doesn’t work for the lcd brightness settings (xbacklight doesn’t work for this notebook). After setting up my sound successfully, this is the other issue I found for the ultrabook.

You can solve the following by doing the following steps:

Install fglrx (AMD’s proprietary display drivers).
$ sudo apt-get install fglrx-amdcccle-updates fglrx-updates

We need to initalize the fglrx driver so that the aticonfig command will work properly:
$ sudo aticonfig –initial -f

Create a file named sbacklight.sh
nano sbacklight.sh

Here are the contents of the file:

bvalue=`aticonfig --query-dispattrib=lvds,brightness|cut -d "," -f2|cut -d ":" -f2`

case $1 in
# Let us increase the brightness
aticonfig –set-dispattrib=lvds,brightness:$bvalue
# This is for decreasing the brightness
aticonfig –set-dispattrib=lvds,brightness:$bvalue
# This is just for setting the brightness
aticonfig –set-dispattrib=lvds,brightness:$2
echo “That option is not recognized”

Save the file and change the permissions of the file by doing chmod:
chmod 755 sbacklight.sh

This bash script can then be used as follows:

sbacklight.sh inc <value> – increment display brightness by this value
sbacklight.sh dec <value> – decrement display brightness by this value
sbacklight.sh set <value> – set display brightness by this value

In Lubuntu, you can set key bindings by editing the ~/.config/openbox/lubuntu-rc.xml file and by adding keybindings to set your lcd brightness; this is an example below (add or edit this on the said file to your liking – like setting other keys instead of the below to do it – you cannot do this with the default fn+F2/F3 key combination because these are hardware keys):

<keybind key=”C-F11″>
<action name=”Execute”>
<command>sbacklight.sh inc 10</command>
<keybind key=”C-F10″>
<action name=”Execute”>
<command>sbacklight.sh dec 10</command>


  1. Andrew Comly

    The “sudo aticonfig –initial -f” produces a “no supported adaptors detected” response in terminal. I am running Lubuntu on a Samsung Netbook (NC110, Intel Atom N455 1.66Ghz RAM 2GB).

  2. clintcan

    Hi Andrew,

    The Samsung NC110 is an Intel device. Aticonfig is part of the binaries included in the fglrx (Radeon video cards) driver package. This wouldn’t work on your system.

    You can try to edit the bash script to use xbacklight (if your system is supported; proprietary drivers like fglrx do not work)

    xbacklight -inc
    xbacklight -dec

  3. Urko M

    Hey, I am considering buying this laptop (Samsung 535 with AMD A6 4455M). I found it for a nice price with no operating system, and I always use Ubuntu anyway. Would you recommend it?


  4. clintcan

    Hi Urko,

    So far, I’m satisfied with this laptop/ultrabook. Does all my needs and development with it (it replaced my badly overused old netbook) – battery life is average though, but I plug it most of the time anyways. I haven’t tried gaming as this is basically my mobile work machine, but apparently it does very casual gaming just fine based on benchmarks I’ve tried.

    For general use, the default radeon open source video driver may do just fine in Ubuntu. You may just need to adjust your sound configuration if you can’t hear anything from the speakers (see my other post on audio).

  5. andi

    Hi im using this laptop, and after i install fglrx. i looked in system setting -> details. Why now my graphic driver is VESA:DST not Radeon? 😮 😮 😮 can you help me?

  6. clintcan

    Hi andi, have you tried installing development tools and kernel headers? You can try looking into the log file for fglrx errors for more info.

Leave a Reply

Your email address will not be published. Required fields are marked *