I finally managed to get the thing to compile by making one slight adjustment to the compile
file:
Line 16 reads:
$CC $CFLAGS $LDFLAGS $DEFINES -o $OUTPUT $SRC_DIR/*.c
Change it to:
$CC $CFLAGS $DEFINES -o $OUTPUT $SRC_DIR/*.c $LDFLAGS
Alternatively, you can issue the following two commands right before running ./compile
:
echo -e "16c16\n< \$CC \$CFLAGS \$LDFLAGS \$DEFINES -o \$OUTPUT \$SRC_DIR/*.c\n---\n> \$CC \$CFLAGS \$DEFINES -o \$OUTPUT \$SRC_DIR/*.c \$LDFLAGS" >compile.patch
patch compile compile.patch
Your system has nvida chips. So please install driver from Addtional Drivers
(press Super / Win, and search for it). Reboot and see if it solves the problem.
If above not working try following (but don't uninstall the driver)
execute sudo gedit /etc/default/grub
Change this line
GRUB_CMLINE_LINUX_DEFAULT="quiet splash"
to something like below
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"
Execute sudo update-grub
and reboot . See if brightness keys are working.
It is still possible ubuntu won't remember your brightness settings. So you have to change brightness each time.
Please let us know the result as many sony users are facing this problem.
Update: This is for setting brightness manually.
Try following for path shown by ls /sys/class/backlight/*/brightness
and replace accordingly.
Get the maximum brightness:
cat /sys/class/backlight/intel_backlight/max_brightness
Try a lower value to set the brightness, say output is 2048 so I will try with half of it
echo 1024| sudo tee /sys/class/backlight/intel_backlight/brightness
If this works, make this happen in each login automatically by doing the following
sudo gedit /etc/rc.local
Enter this line just before exit 0
. It should look like
echo YOUR_VALUE_HERE > /sys/class/backlight/intel_backlight/brightness
exit 0
Also you can try with xdotool
Best Answer
There is currently no automatic method that I am aware of built into Ubuntu. However, take a look at lightum
It works fine on my mac but I have my lgiht senser in
/sys/devices/platform/applesmc.768/light
You can check out the code and make the modifications or use it to write your own app.
The principal is sound, and I have seen other scripts do the same thing. If you don't want to tackle lightum try this or take a look at this mac info.
I know you have a sony but the process should be the same, read the sensor, set some values to a file in /sys/