Saturday, May 31, 2014

Fix: Laptop Screen Backlight Brightness Reset on Every Startup/Restart

The resetting of laptop screen backlight brightness on every startup/restart has been a common problem on my Asus N53SV and HP mini 210, both are gear up with elementary OS. Same thing happen as well after laptop come out of sleep mode which is annoying I have to adjust the screen brightness again. To get the screen brightness right, here is a solution:

  1. Open Terminal.
  2. Type sudo nano /etc/default/grub
  3. Find GRUB_CMDLINE_LINUX_DEFAULT="quiet splash". Replace the whole line with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor" as screenshot below.
  4. Press ctrl + o to WriteOut/Save and press ctrl + x to Exit.
  5. Reboot your laptop.

Saturday, May 24, 2014

[Linux] Online Quotes Setup on GnuCash Finance Management

Gnucash provides accounting functions suitable for use by small businesses and individuals. It can track finances in multiple accounts, keeping running and reconciled balances. There is support for customer, vendor and employee processing. It has an X based graphical user interface, double entry, a hierarchy of accounts, expense accounts (categories), and can import Quicken QIF files and OFX files.

Not to mention Gnucash has a helpful ability to fetch latest stock prices with just a single click. But you need to install Perl module Finance::Quote to capture quotes online from various sources. By default, Perl should have been installed on Linux.

Since Yahoo has changed their URL in February 2014, the version 1.20 of F::Q is required. However, you need to install or update manually at the moment.

Steps:
  1. Download https://raw.github.com/Gnucash/gnucash/trunk/src/quotes/gnc-fq-update.in
  2. Rename gnc-fq-update.in to gnc-fq-update
  3. Open the file, replace the first line #!@-PERL-@ -w with #!/usr/bin/perl -w
  4. To make the file executable, open Terminal and enter chmod +x gnc-fq-update
  5. Type sudo ./gnc-fq-update to start installation.
  6. Open GnuCash > Tools > Security Editor
  7. Add the stock information based on Yahoo Finance, as illustrated by images below:

  8. Goto Tools > Price Editor, select your stock and click Get Quotes to fetch quotes online.

Sunday, May 11, 2014

How to Setup Online Stock Price Retrieval on GnuCash

GnuCash is personal and small-business financial-accounting software, freely licensed under the GNU GPL and available for GNU/Linux, BSD, Solaris, Mac OS X and Microsoft Windows.

Designed to be easy to use, yet powerful and flexible, GnuCash allows you to track bank accounts, stocks, income and expenses. As quick and intuitive to use as a checkbook register, it is based on professional accounting principles to ensure balanced books and accurate reports.

GnuCash is my favourite finance software to record and track down my daily expenses and monthly income, in furthering to analyze money usage with financial reports - income statement, balance sheet, and etc.

With the capability to retrieve security quotes online, GnuCash helps me easily to track my investment portfolio. Below is how to setup online stock price retrieval for GnuCash:

  1. Click Start > All Programs > GnuCash > Install Online Price Retrieval. The script will install perl module Finance-Quote which is necessary for online retrieval of prices. Please allow access to networks if Windows Firewall has blocked Perl interpreter.
  2. Wait till you see the screen below. Press any key to continue/exit.
  3. Open GnuCash > Tools > Security Editor.
  4. Click Add to stock information.
  5. Go to http://finance.yahoo.com/ to look for the security you want to maintain in GnuCash. For example, I want to add Malayan Banking Berhad of KLSE. Simply key 1155.KL into Symbol/abbreviation. Checked Get Online Quotes and use Yahoo USA as source. As shown as the pictures below:
  6. Click Tools > Price Editor > Add and select the stock.
  7. Click Get Quotes and GnuCash will retrieve stock prices accordingly from Yahoo Finance.

Thursday, May 1, 2014

How to Install Optimus Enabled Nvidia Graphic Driver on Linux

Optimus enabled Nvidia graphic cards are not going work that well on Linux. Before any installation, please remove all installed Nvidia drivers.

If you encountered black screen/unable to boot into desktop environments due to installation of previous Nvidia driver, you can remove the driver by this way.

Open the Terminal and enter the following commands:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-331 nvidia-settings-331

Install Bumblebee. Bumblebee is a tool that provides Nvidia Optimus support to improve battery life of notebooks. Open Software Center > Software Sources, make sure the following repos are checked.


On the Terminal, type the below commands:
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic

If your computer system is 64 bits, you also need to install this package.
sudo apt-get install virtualgl-libs-ia32:i386

Done. After the installation is completed, you should notice the graphic indicator light on your notebook shows it is currently using integrated Intel graphics. Notebook is much less warmer since the Nvidia graphic is not in use means lesser power consumption.

Optional: To have better performance and less power consumption for Bumblebee, it is recommended to install Primus.

By default Bumblebee uses Optimus (VirtualGL):
Bumblebee uses VirtualGL to copy the image generated by the second (faster) GPU to your display. VirtualGL was intended for use over a network though, so it takes a great many steps to enable this (compression, sending the image over a network link, decompression, etc).

Primus brings better performance and less power consumption when using Bumblebee, by replacing VirtualGL. Advantages over Optimus:
- Less overhead (better framerates) and cleaner solution (no networking or compression involved at all)
- Fixes the "bug" that causes Bumblebee to shut down the GPU too early sometimes (no more need for the "optirun bash" workaround)
- Less buggy/glitchy, easier to debug
- Only uses/starts secondary GPU for OpenGL parts of applications - everything else remains on your main GPU (power savings)

Open Terminal and type the following code to install Primus
sudo apt-get install primus

If your computer system is 64 bits, you need to install this package:
sudo apt-get install primus-libs-ia32:i386

Done.

Sunday, April 27, 2014

Solution: Black Screen/Unable To Boot Into Linux Desktop After Installation Of Nvidia Graphic Card Driver

In some case, we have to install Nvidia graphic card driver manually as Linux Distro did not come with the right driver needed. My laptop is equipped with Nvidia GeForce GT540M graphic card. Hopefully I could get the Nvidia Optimus feature to work on Linux by activating the Nvidia graphic driver via Additional Drivers (There are numbers of Nvidia drivers available). However, after complete installation of driver and restart, I cannot boot into Linux desktop environments.

This symptom means wrong Nvidia graphic driver was installed. To remove the installed Nvidia driver outside the Linux desktop environments, simply follow the steps below:
  1. Boot into Linux Recovery Mode in GRUB.
  2. On the Recovery Menu, select root - Drop to root shell prompt.
  3. Enter command:
  4. sudo apt-get remove --purge nvidia-*
  5. Reboot the computer and you will be to boot into Linux desktop without problem.
Nvidia Optimus