Posts Tagged ‘Ubuntu’

Slow disk access and overall speed issues in newer ubuntu and linux mint

April 10, 2017 Leave a comment

I have the subjective feeling that the newer versions of ubuntu and its derivatives including linux mint has slowed up a bit compared to pre unity ubuntus(11.04) or linux mint 17. I had been looking for the reason for some time. This probably won’t apply to you unless you are using a slow ‘hard disk’. The symptom is that subjectively the disk access latencies are larger (eg. applications take longer to start).

Linux has a software component called the IO scheduler. This takes care of scheduling requests to the permanent storage devices. There are a few choices for the algorithm to be used for this purpose. The choices and current selection can be seen by issuing

cat /sys/block/sda/queue/scheduler

(For me the sda is the drive containing all linux partitions. It may change for you ie. sda, sdb, sdc.. or hda, hdb, hdc…)

The default in modern ubuntu and linux mint is the ‘deadline‘ scheduler; probably a decision based on benchmark performance results on modern hardware. I changed this to ‘cfq‘, and subjectively the system became a lot more responsive. You can temporarily tryout the setting by writing the new scheduler name to the above file using command

sudo sh -c 'echo cfq > /sys/block/sda/queue/scheduler'

If you find think system responsiveness is better than before, you can make the changes permanent by writing following settings to /etc/default/grub and running update-grub2

sudo vim /etc/default/grub

Type the setting


Exit editor.


From next reboot onwards the setting should now takeplace at boot itself.


System C on Ubuntu – Installation

August 15, 2012 2 comments
Installation of systemc-2.3.0.tgz is straight-forward.. Just follow the instructions in INSTALL file. This log is for systemc-2.2.0.tgz

I am looking towards learning systemC. So the first step is setting up one on my PC. It was not so straight-forward for somebody like me who has done only a few hours of research about systemC. So I thought of logging my experience setting up systemC in Ubuntu 11.04. (The best way to backup information is to make it public)

1.What is it

Initially I was thinking it is a new language all-together, with a different set of tool-chain. With a little bit of research, I came to the conclusion – “to the user, systemC is c++ library and header file collection, that can be linked to other c++ files using any c++ compiler & linker”.

2. Where to get it

According to the wikipedia page on systemC, it’s just an IEEE standard, which anybody can implement. So there will be multiple versions of the systemC. Luckily, Accellera has a proof of concept implementation, which is available for free from here. You need to register, providing your email id. After registration and logging in, the systemc-2.2.0.tgz (I am not very clear about the TLM stuff. Will first experiment with this and then the latest 2.3.0, with TLM)can be downloaded. If you directly go for systemc-2.3.0.tgz, some of the steps here may be irrelevant.

3. How to setup

Unzipped the file, and read the README and INSTALL. Followed the instructions in INTALL file. But got a compilerĀ  error in sc_utils_ids.cpp, regarding some namespace issue while running make. As an embedded engineer, I am really bad at any language other than plain C. So did the searching, the following two links came up



Downloaded the 0001-missing-system-headers-function-qualification.patch file from the second link. Patched the original sc_utils_ids.cpp file with the patch using command

patch -i ~/Downloads/0001-missing-system-headers-function-qualification.patch ../src/sysc/utils/sc_utils_ids.cpp

Then did a make and make install again. This gave me the libraries and include files in /usr/local/systemc-2.2.0 (As I have used the ../configure –prefix=/usr/local/systemc-2.2.0 to do the configuration).

Categories: Log Tags: ,

Install Firefox 4 on Ubuntu

May 11, 2011 2 comments

Firefox 4 is catching on. Still Ubuntu has not put this in its stable repositories, for the older versions. Newbies in Ubuntu will find installing Firefox 4 difficult. This describes the method I used to install Firefox 4.

First download Firefox 4 from the official site. The downloaded file will be an archive named firefox-4.0.1.tar.bz2. Extract the archive file by right click and extract here. A folder firefox will be created. Inside this folder, a file firefox is present. Give execute permission to this file by typing sudo a+x firefox/firefox.

Double clicking the file will open a message box. Choose Run in the message box. This will open the Firefox 4.0 browser. This is the simple way of using Firefox 4.

A neater way is to move the folder firefox either to a separate folder for programs in your home folder, or to the /usr/local/ directory. For the former, running the firefox file inside the firefox folder is enough. Moving the folder to /usr/local will require root’s permissions. Type sudo mv firefox /usr/local to move the folder to /usr/local/

The older version can be removed using synaptic, which leads to a broken application launcher in the top panel. Right click on it, and choose properties, browse for the firefox file or enter its path correctly. The command that I have to use will hence beĀ usr/local/firefox/firefox %u, as I have moved the folder firefox to /usr/local Click on the icon on the left choose firefox/icons/mozicon128.png. Click on the launcher to launch Firefox 4.0

ARM development under Ubuntu 10.04

March 6, 2011 1 comment


ARM is a very popular microprocessor architecture for embedded systems. Many mobile phones, netbooks and other similar portable computing and communication devices have an ARM core inside. Usually these ARM based embedded systems will have some operating system as well. Hence application development for ARM can be either on top of the OS or without the OS. In this page I will be describing about development of ARM applications without an OS (bare metal development).

C is the language of preference for embedded development, especially when it comes to systems without OS. I’m using the following set of tools to develop the C code and turn it into a machine language.


Code::Blocks IDE

Compiler, Linker etc.

Computer with Ubuntu Linux

Setting up the system

Code::Blocks is an easy to use Integrated Development Environment, which can be installed form Synaptic Package Manager or Ubuntu Software Center. Install Code::Blocks from one of these application.

Some of the bare metal development tools are listed here. Download the GNU GCC Toolchain for Linux. Extract the archive file by right click >> extract here. Now open the terminal and move the extracted folder to /usr/local/ directory. This can be done by issuing the command sudo mv arm /usr/local/. Though it is not absolutely necessary to move it to the /usr/local/ directory, it is the neat way. Add the location of the binaries to PATH, by issuing echo ‘export PATH=/usr/local/arm/bin:$PATH’ >> ~/.profile. You will need a reboot(Logging out and Logging in may be enough) of your computer for the new path to take effect. Verify whether the steps so far are done correctly by issuing arm-elf-gcc -v and see if the gcc is reporting the version. With this the tool chain installation is done.

You have to configure Code::Blocks to use the ARM GCC Toolchain. For this, goto Settings>>Compiler and Debugger…. A dialog box as shown below should appear.

Change Selected Compiler to GNU ARM GCC Compiler. Choose the Linker settings Tab, and add to other linker options -TLPC2129-ROM.ld, as shown. This configures the Code Blocks to use the file named LPC2129-ROM.ld as the linker configuration script.

In the Search directories tab, add /usr/local/arm/arm-elf/include for Compiler and /usr/local/arm/arm-elf/lib for Linker. This step make the Include and lib directory known to Code::Blocks and hence the compiler/linker.

Click on the arrow to the right of the Search directories tab, to reveal more tabs. In the Toolchain executables tab, set the Compiler’s Installation Directory to /usr/local/arm. Press OK to save the configuration. Code::Blocks is now configured correctly with the ARM GCC toolchain.

Starting an ARM project

Choose File>>New>>Project. Select Empty Project from the dialog box, and press Go. Enter ‘Folder to create Project in:’ and ‘Project Title:’ and press Next. Choose GNU ARM GCC Compiler, and clear the ‘Create “Release” Configuration’ checkbox, and press Finish. Now you can add your own source codes to the project. Do remember to add a crt0.S file to the project and to keep a file named LPC2129-ROM.ld in the project’s directory.

Categories: Hobby, Tech Tags: , , , , , ,