Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Thursday, May 24, 2012

Brightness Control for My HP Pavilion System enabled finally

Never knew that the problem that haunted me for years would be related to something I never ever had thought at. Being a software engineer based in Nepal, Loadshedding problem is very common for me. Long hours of loadshedding demands you to have support for longer battery life. Controlling brightness of monitor is very important to prolong battery life. I have HP Pavillion Dv3 system which I bought two years ago. My first step after buying was to install Ubuntu by replacing Vista which accompanied with it. But, I noticed immediately afterwards that ubuntu was not supporting changing screen brightness. After searching for solution I found it out as a general problem. But, I was not able to solve it even after trying various means. I tried this for every time I updated my ubuntu to a newer version till now (12.04).

So, if you also face from same problem, Here are the steps you need to do to fix it. It is related to grub. So, here are the steps
  1. gksudo gedit /etc/default/grub
  2. Change GRUB_CMDLINE_LINUX from "” to "acpi_osi=Linux"
  3. Change GRUB_CMDLINE_LINUX_DEFAULT from (”” or "quiet splash") to “quiet splash acpi_backlight=vendor”
  4. Close gedit
  5. run sudo update-grub
  6. reboot your system
I got it working after doing (I couldn't believe it did!!) and here are the links that gave me that solution. Hope it worked for you too. 
http://livinginjava.blogspot.de/2010/11/ubuntu-1010-brightness-problem-in-acer.html
http://askubuntu.com/questions/139796/cannot-adjust-brightness-on-my-packard-bell-easynote-ts11hr-127ge-laptop

Wednesday, March 14, 2012

Installing Protocol Buffer 2.3.0 in newer Ubuntu versions


Protocol buffer is an important api for storing data internally. But, it has one severe limitation which requires you to have only specific version only. So, when you move into newer version of ubuntu where older protocol buffer version is no more supported then you have to uninstall the newer protocol buffer and replace it by old one eg. 2.3.0.

Here are the steps that you need to do that

# remove existing version
sudo apt-get remove libprotobuf* (* is version you may be having eg. 5, 7, etc)
sudo apt-get remove protobuf-compiler
sudo apt-get remove python-protobuf 

#time to install new one 
sudo apt-get install g++ # if you don't have g++ installed

#download protocol buffer
wget your-protocol-bufer.tar.gz
tar xvf your-protocol-bufer.tar.gz
cd protobuf-2.3.0
./configure
make
make check
sudo make install
cd python
sudo python setup.py install (it attempts to download setuptools-0.6c9-py2.7.egg file from location. But, it is not present. So, download the one available at location http://pypi.python.org/packages/2.7/s/setuptools/ and add it on current location. After adding, rename the downloaded file by setuptools-0.6c9-py2.7.egg and re-run the script again)
sudo ldconfig
protoc --version
libprotoc 2.3.0

Hope it was installed successfully :)