Search This Blog

Friday, December 29, 2017

[SOLVED] - Screen Brightness Resetting To Maximum Value After Every System Restart/Boot

You could try adding a line to /etc/rc.local that will set the desired brightness level. To edit the file, run

 sudo -H gedit /etc/rc.local  
and add the following

 echo X > /sys/class/backlight/intel_backlight/brightness  
so that the end result looks like this

 #!/bin/sh -e  
 # rc.local  
 # This script is executed at the end of each multiuser runlevel.  
 # Make sure that the script will "exit 0" on success or any other  
 # value on error.  
 # In order to enable or disable this script just change the execution  
 # bits.  
 # By default this script does nothing.  
 echo X > /sys/class/backlight/intel_backlight/brightness  
 exit 0  
Substitute X by the desired brightness level.

PS: Alternatively, there may be /sys/class/backlight/acpi_video0/brightness instead of the above. Brightness levels vary wildly, and may range from 0 to 10 or to 1000. To find the maximum value, try

 cat /sys/class/backlight/acpi_video0/max_brightness  
 cat /sys/class/backlight/intel_backlight/max_brightness  


Tuesday, December 12, 2017

isset() Vs empty() in PHP

A Very Nice Video Tutorial Explaining isset() Vs empty() in PHP:

Top Magento Hosting:

Top 5 Posts (Weekly)