How to Install ATI Radeon 7670 graphic driver in Linux Mint / Ubuntu (latest versions)


Hey guys, I have a HP Pavilion g6 lap, which comes with an ATI Radeon 7670M HD graphic card which comes with Windows 8 preloaded. When you install any Linux Distributions side loaded with Windows 8, the graphic driver will not get installed while Linux is being installed, which keeps the graphic card’s fan running all the time. Because of this, there will be a lot of battery drain.

So I’ve decided to install the graphic driver for Linux manually. Here’s a small guide through which you can install the graphic driver in Linux.

During this process, we will install the default fglrx driver through which you can turn off the graphic card if you want.

Process for installing ATI Radeon driver on Ubuntu / Linux Mint

Installing the default fglrx drivers doesn’t involve much process. This is very simple when compared to the previous versions. 🙂

Step – 1

Upgrade your system. This you can do it using the following process:

sudo apt-get upgrade
Step – 2

Install the fglrx drivers. For this enter the following command in the terminal:

sudo apt-get install fglrx

Now restart the computer to complete the installation process.

sudo reboot
Step – 3

After the drivers are installed in your system, now install the necessary pxpress package that is used for switching the graphic card from discrete to integrated and vice-versa.

sudo apt-get install fglrx-pxpress

Now you will get a message that the discrete graphic card is activated. Reboot the system once again.

Step – 4

After you restart, you can check which graphic cards are active using the following command in the terminal:

inxi -G
Step – 5

Now install the AMD Catalyst control center in your system switching between the graphic cards. That you can do it by executing the following command:

sudo apt-get install fglrx-amdcccle

Now reboot your system once again. 🙂

sudo reboot
Step – 6

Now launch the AMD Catalyst Control Center as an administrator so that you can switch between the graphic cards.

In the Settings, switch between the graphic cards as per your need. If you want more battery backup, then it is recommended to switch the graphic card to integrated (i.e. Intel Graphics) The system will ask for a reboot.

After the reboot is completed, now the Linux will use the internal graphic card instead of the discrete graphic card.

Now, once after you change the graphic card to integrated, you will see the increase in the battery backup 🙂

Contributing to Mozilla


Doing good is a part of our code.

Doing good is a part of our code.

Mozilla is one of the most leading open source organizations in the world now. Since a lot of people works for Mozilla by fixing bugs and implementing new features. Since people use multiple platforms for this, here I will provide a small guide through which you can install the source code for Mozilla on multi platforms and how can you start your first contributions. As a Mozillian I prefer any one to start their open source contribution with Mozilla.

While installing Mozilla source code, first thing what you need to do is, that you need to install its dependencies. The minimum hardware requirements are:

  • 2 GB RAM and lot’s of free space in it.
  • For debug and builds: at least 8 GB of free space.
  • For optimized builds: at least 1 GB of free space (recommended 6 GB)

Build Tools and Dependencies

All distro’s one line bootstrap command

This is the best way to install the dependencies irrespective of the distro what you are using. For this open a terminal and copy paste the following commands:

wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && 
python bootstrap.py

If the above command doesn’t work then proceed for one of the following based on the Operating System you are using.

Ubuntu

With the help of the following command you can download and install the prerequisites required for Mozilla build in Ubuntu (as root).

sudo apt-get install zip unzip mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libiw-dev libxt-dev mesa-common-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev
Debian

With the help of the following command you can download and install the prerequisites required for Mozilla build in Debian(as root).

sudo aptitude install zip unzip mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-devlibdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libiw-dev libxt-dev mesa-common-dev libgstreamer0.10-devlibgstreamer-plugins-base0.10-dev libpulse-dev
Debian Squeez Edition

On Debian Squeeze, you need to install yasm-1.x from the squeez backports. You can also get the mercurial bundle if you need the compatibility with an existing mercurial repository.

echo "deb http://backports.debian.org/debian-backports squeeze-backports main" >> /etc/apt/sources.list
aptitude update
aptitude -t squeeze-backports install yasm mercurial
OpenSUSE/SUSE Linux Enterprise

Execute the following command as a root user in your terminal:

zypper install \
  make cvs mercurial zip gcc-c++ gtk2-devel xorg-x11-libXt-devel libidl-devel \
  freetype2-devel fontconfig-devel pkg-config dbus-1-glib-devel mesa-devel \
  libcurl-devel libnotify-devel alsa-devel autoconf213 libiw-devel yasm \
  gstreamer010-devel gstreamer010-plugins-base-devel pulseaudio-devel
RedHat Enterprise Linux (RHEL)/CentOS/Fedora

Execute the following command as a root user:

sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'
sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL-develalsa-lib-devel libXt-devel gstreamer-devel gstreamer-plugins-base-devel pulseaudio-libs-devel
# 'Development tools' is defunct in Fedora 19 use the following
sudo yum groupinstall 'C Development Tools and Libraries'
sudo yum group mark install "X Software Development"
Arch Linux

Execute the following command in your terminal:

-Syu --needed base-devel zip unzip freetype2 fontconfig pkg-config gtk2 dbus-glib iw libidl2 python2 mercurial alsa-lib curl libnotify libxt mesa autoconf2.13 yasm wireless_tools gstreamer0.10 gstreamer0.10-base-plugins libpulse

After doing these depending on the Operating system you use, you can proceed for building Mozilla source.

Building Mozilla Source code

Once after you finish the installation of the prerequisites required for the Mozilla build you can continue with the build process. Build process generally goes with the downloading and installing through the mozilla.hg file. You can download the latest mozilla bundle from here.

Once you have downloaded the mozilla bundle follow the steps given below to install the source code.

1) Create an empty directory and  initialize a new repository (in a directory called ‘mozilla-central’ here):

mkdir mozilla-central
hg init mozilla-central

2) Unbundle the mozilla.hg bundle in the created folder.

cd mozilla-central
hg unbundle /home/path-to-the-bundle/mozilla.hg

3) Create a hgrc file in /mozilla-central/.hg/ , in this file we will be adding the path to the main repository so that we can pull the latest changes and update the bundle before we can start the build process.

gedit /hg/hgrc

in that file insert the following lines and save the file.

[paths]
default = https://hg.mozilla.org/mozilla-central/

4) Enter the following command in the terminal, so that it will pull all the latest changes to the code.

hg pull

and after that the next command to apply the changes to the repository file.

hg up (or) hg update

5) Once after the changes are applied you can start the build process with the help of the following command.

./mach build

This process will take at least 45 min to complete. After that you can see some thing like this:

Your build was successful!
To take your build for a test drive, run: /home/path-to-mozilla/obj-x86_64-unknown-linux-gnu/dist/bin/firefox
For more information on what to do now, see https://developer.mozilla.org/docs/Developer_Guide/So_You_Just_Built_Firefox

Once you see this in your terminal you are ready to start with your first contribution.

Getting started with your first contribution

Now that you have completed the build and you are ready to start fixing a bug. Bug fixing is basically where you need to go through the code and find the part of code that is responsible for the bug. For this you can take the help of the Mozillans in Internet Relay Chat (IRC). You can follow steps for getting connected to Mozilla IRC and clarify your doubts regarding the bug which you got assigned to you.

Connecting to Mozilla IRC

If you are using Mozilla Firefox as your browser it got an extension for IRC called Chatzilla. Chatzilla is basically an IRC client developed by Mozilla. If not that you can use different clients such as Mibbit or IRCCloud as per your convenience.

After opening the chat client, for connecting to the Mozilla server just type the following in the IRC client.

/server irc.mozilla.org

Once after you have connected to the Mozilla Server you can join the channel introduction, it is a channel for beginners. For joining that channel you can give the following command in the

/join #introduction

This is where you can start asking any questions related to bugs or in general also. Depending on the bug which you took and the availability of the mentor you can go and directly talk to him or you can ask any one there. There are a lot of people in Mozilla who are ready to help you at any point of time.

Selecting a Bug from Bugzilla

Bugzilla Homepage

Once you are ready with the build you can go to bugzilla for searching for bugs. As for a beginner it is recommended to start with minor or trivial bugs. You can search for bugs using bugzilla and once you found out a bug just tell in the bug comments saying that you are interested in working for this bug. After some time you will get that bug assigned to you.

Once you are done with selecting a bug, you can go and ask any help regarding the bug in #introduction on IRC.  While fixing a bug in Mozilla you have to find out a particular function which you need to modify. In that case you can use mxr or dxrUsing these two sites you can search for a file or a particular word or a module.

After you have fixed the bug, you have to make the patch. For making the patch you have to use mercurial.

Using Mercurial for creating a patch

Mercurial is used to create patch for the bug which you have fixed. Patch is one which gives you the changed you made to the code. Patch makes the mentor of the bug to review the changes and test it. For this you need to add the following lines to the hgrc file which you have created previously for giving a path to the Mozilla central repository.

[ui]
username = Name 

[defaults]
qnew = -Ue

[extensions]
mq =

[diff]
git = 1
showfunc = 1
unified = 8

This helps you to create a perfect patch for the bug which you have fixed. Once after you attach the patch to the bug then you can wait until the mentor reviews the patch.

That’s it done, hurray….. you made your first contribution. 🙂

Installing Linux alongside with Windows (Dual boot)


Hi, today I am going to explain how to install any Linux Distro on your PC. Basically people think installing Linux along with Windows is a big problem and causes problems to Windows. If you are installing Linux on your desktop it will run perfectly with no problems. You will get the grub screen and everything works perfect.

When it comes to the laptops there will be some problems because of the UEFI problems. The biggest problem is that if you try to install Linux on your laptop, the UEFI will detect the Linux which you are going to install as a virus and it will not allow the installation process. Even if the installation is done also the grub won’t appear properly.

Before installation of Linux on your system you have to change the BIOS settings of the laptop for a proper installation of Linux.

For that after pressing the power button press ESC repeatedly. This will stop the normal boot of the system. Now go to the boot manager. In the boot manager go to the BIOS SETUP settings. In that go to the boot options and enable the legacy support. After changing that press F10 to save the changes and exit. Now you are ready to install Linux without any problem.

Now insert the CD or the bootable pen-drive in your system and then press F9 after you press the power button. This will let you go to the boot manager. In that select the CD-ROM or the USB according to whatever source you are using.

After selecting the source in the boot manager you will be booted in and will be asked whether you want to TRY or INSTALL. Choose whatever you like. Now the installation process starts.

Welcome

Installation Process:

After you start the installation process you will be asked to select the language which you want and click NEXT. In the next screen you will be asked whether you want to connect to Internet or not. If you choose to connect to the Internet it will download the latest packages while the installing process is going on. If the net connection which you are using is slow then it is preferred not to check the Installation of the third-party softwares. Then click on NEXT to proceed to the next screen.

In the next screen you will be asked to choose what type of partition do you want to do. The options will be different if you are installing Linux on the entire hard disk. Otherwise it will show that “Multiple Operating systems detected. What do you want to do?” In this case select Something else (the last option).Memory

Partition1

Once you select the last option and click on the NEXT button you will be taken to a place where you can see what all partitions are there on your hard disk. Select the free space which you have created earlier for installing Linux and double-click on that. Now you can see a small window popping out where you can create the required partitions for installing Linux. One more thing is that it is advised to create a separate root partition in which the Linux is going to be installed. Here we need to take care of four things because you are installing along side with Windows.

  • Creating a swap partition of memory approximately equal to twice the size of your RAM.

Partition2

  • Create an grub partition (Reserved BIOS Boot Area) of 20MB size in which the grub is going to be installed.

  • Create a root partition (“/”) of size approximately around 20GB because the installation itself takes around 6GB of memory.

  • Create a home partition (“/ home”) for the remaining empty space which is left over.

1) Swap Partition: Swap memory acts like a Virtual RAM for the Linux Operating System. Whenever you do some huge installations in Linux like building source codes and all it will consume the entire RAM during the installation of any source code. So what does this Swap does is that it acts like a TEMPORARY-RAM and makes the main RAM free to some extent. So the system may not get hanged in the middle of the installation.

2) Grub Partition: If you are installing Linux alone this partition is not necessary. But in the other case where you will install Linux alongside with Windows you are supposed to make this partition for the grub to get installed.

3) Root Partition: It is advised to create a root partition separately because it won’t be needed to save all the data in another place and then do a fresh install. If you create a root partition separately you can just install the Linux Distro which you want only in the root partition only. The remaining data which you saved in the home partition will be the same after you do another install also.

Now, after you have created the required partitions click on NEXT.

In the next screen you will be asked to enter the user-name and password. Fill all the data to start the installation process. It will take a maximum of 10 min to complete the installation process. Now it will ask for a reboot. Give a reboot to the system.

After rebooting also you won’t get a grub screen sometimes. In that case you pause the normal startup and go to the boot manager. There you can see the Linux Grub. If you don’t see the grub there in the boot manager then go select the Notebook Hard drive in the options. This will take you to the grub menu of the two operating systems where you can select which Operating System do you want.

After logging into Linux open a terminal and enter the following commands as a root user to install all the latest updates available.

    sudo apt-get update

    sudo apt-get upgrade

This process will take some time because it needs to make the system up to date. To get the grub screen you need to do a boot repair.

Note: If at all you are going to do the boot repair on Linux Mint, it will not work properly sometimes. The reason behind this is that the boot repair repository which you are going to add is developed only for Ubuntu systems. Since Linux Mint is a derivative of Ubuntu we can’t say that it will work properly.

Boot Repair: The boot repair is used to reinstall the grub once again manually after installing Linux. To install the boot repair you need to add the following repository and install. All this process is to be done after connecting to the Internet only. For that open a terminal as root and enter the following command.

    sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

    sudo apt-get install -y boot-repair && (boot-repair &)

Once you are done with installing the boot repair, it will open automatically. Now you will see a screen something like this after boot repair opens.

boot repair

Just click YES and in the next screen you will see a small dialogue box saying “UEFI Detected on your system. Do you want to continue or not?“ Just click YES and after some time you will be asked to run some commands in the terminal. Copy the commands given there and install paste in the terminal and install them. After the installation is complete you go and press the OK button. After some time it will ask you to run some more commands in the terminal. Install them also and then press OK. Wait for sometime to complete the installation of the grub. Now you will get a window opened and in that you will be given a paste-bin link, save that link and do a reboot. Now after the reboot you will get the grub installed and you can choose the OS of your choice.

This is the process what you have to follow if you want to install Linux on a system which has a graphic card. If your system has a AMD graphic driver you can follow my blog post on how to install the graphic driver.