Archive for the ‘Free*’ Category

Intel Graphic cards, Linux, Xorg and UXA performance boost

Sunday, June 21st, 2009

For people having Intel graphic chipset under Gnu/Linux, performance using 3D applications or Compiz-* window manager effects has always been a problem. Intel drivers for Xorg never gave problems but have also never been brilliant. I always looked around searching for xorg.conf tuning configuration entries.
Today I was simply browsing Ubuntu Wiki and discovered the UxaTesting page. I wanted to know something about UXA and Intel drivers, so I found a Wikipedia definition:

In computing, UXA is the reimplementation of the EXA graphics acceleration architecture of the X.Org Server developed by Intel. Its major difference with EXA is the use of GEM, replacing Translation Table Maps.

Yeah cool, the official Xorg Wiki Intel Graphics Driver page Gives also some more information, so if you've got one of these chipsets (you can verify using lspci | grep VGA ):

  • i810 and variants thereof
  • i815
  • i830M
  • 845G
  • i852GM
  • 855GM
  • 865G
  • 915G and variants (GMA 900)
  • E7221
  • 945G and variants (GMA 950)
  • 946GME
  • G33
  • Q33
  • Q35
  • 965G/Q
  • G35
  • G41
  • G43
  • G/GM/Q45

You may want to try out the new acceleration method by adding this line


Option "AccelMethod" "uxa"

To your /etc/X11/xorg.conf file, in section "Device".

Please note that:

  1. UXA is not yet stable as EXA. Try it out, signal your experience on the Ubuntu wiki page and fill out a bug if necessary
  2. You will need at least Xorg server 1.6.0
  3. You will need at least xf86-video-intel-2.6.2 drivers
  4. I don't think this is mandatory, but please tell me if you encounter differences when updating to 2.6.30.x kernel. I already have 2.6.30.0 on Sid so I don't know if with a previous version this is working

On Debian Sid I just had to add the Option line to my xorg.conf file.
The performance differences are noticeable and incredible. Everything runs faster and smoother.
My glxgears output went from 60 FPS (using EXA) to 425 FPS (using UXA).
This is a 700% performance improvement!

  • Share/Save/Bookmark

Some little updates

Friday, June 12th, 2009

I am so busy in these days. Today I was sick to study Mathematical Method For Physics, so I took the time to fix some pages of the blog.

First of all, I finally created a page for the Unipoli project to our Programming Project Java opensource Monopoli game. Give it a try, it's funny and free! You can obviously download the binaries and the code, as well as all the documents we wrote during analysis and design phases. You can even download or browse the Javadocs! Here is a screenshot:

Unipoli - Board Overview

Unipoli - Board Overview

Then I also updated my CV that unfortunately remains in Italian. I am a bit confused about which language to use  everytime I write something, sorry!

  • Share/Save/Bookmark

What is taking me busy – Pomotux!

Tuesday, May 12th, 2009

I'm currently pressed by my University life, that's because I don't post often.
There are 3 big projects for this semester: a C compiler, a dynamic website using Java Servlets and JSP and the most interesting one: a C++ program for Software Engineering Project course.
I'm working with other two collegues on a task manager for people using the Pomodoro Technique by Francesco Cirillo.
The project is called Pomotux and is under development following strong software engineering methodologies (Scrum@Xp). Pomotux is under construction since 2 months and uses technologies such as SQLite to store and play with tasks. The interesting fact regarding our data structure choice is that we are also using a framework for obtaining ORM, called LiteSQL.

LiteSQL is a C++ library that integrates C++ objects tightly to relational database and thus provides an object persistence layer

LiteSQL is still young and immature but powerful enough for our scope. We are also happy to provide feedback to their developers, that are ready to help us. They even wrote a patch for us!
Pomotux is reaching an unexpected stability. Unexpected because it is written by 3 young people that come from a light Java experience and saw C++ 3 months ago. It works under Linux and its graphical interface uses QT 4.5.0. It should work on any *NIX variant that meets dependencies, but also under Windows with some light modifications.
It will support just the basic features of the technique (unfortunately we don't have the time to fully work on it) but it's ready for expansions such as team support and statistics.
We will be happy to release the sources as soon as we finish the course, hoping that people will find it useful and that some serious programmers take it and make it the perfect tool for Pomodorians :) I will also contact the author of the Pomodoro Technique when we release it.

  • Share/Save/Bookmark

Back to Archlinux

Sunday, May 10th, 2009

After a short period with Slackware, I took the decision to switch to Archlinux again. I'm using it since one month and I'm very happy about the stability it finally reached. I encountered no freezes using it on my macbook (take a look on their interesting wiki page for info).
I hope that this will last forever :) I've always found Archlinux, its philosophy and its package manager the best combination for a Linux Distribution. Now that it is also stable, there are no reasons to keep away from Archlinux!

  • Share/Save/Bookmark

How to have both Mac Os X and Linux installed and share the same home directory files

Friday, February 27th, 2009

So much time since my last post! I'm sure that the best way to come back to blog posting is a nice tutorial.
I'm going to write how to have the same home directory shared between Mac Os X and Gnu/Linux. Let me call Gnu/Linux just Linux from now on.

A unique place for your working directory on both Mac Os X and Linux!

The configuration I'm proposing should be very confortable, as it works with symbolic links.
It lets you to boot either Mac Os X or Linux and have the same directories and files for your everyday use. Meanwhile, the important configuration files and directories (e.g. ~/Library for Mac Os X, ~/.config for Linux) are kept separately on their corresponding partitions.
Another advantage of this configuration is that you can have a small partition dedicated to Linux - let's say 10GB but could be even less - just for installing the programs you need, while your videos, documents, music files are kept inside the biggest partition, the one for Mac Os X.

Disclaimer, assumptions

Basically, you will mount your Mac Os X root partition in Linux, and soft-link your important directories to your Linux home directory.
You will then use them as there were real directories in your Linux home directory. For this how to, there are a couple of things I assume that:

  • You have Linux installed and running natively on your Mac(Book). I'm going to give commands with sudo, so configure it if you're not using Ubuntu-based distros!
  • You know your partition layout. The following is mine. I'm going to use it as example:

    disk0s2 /dev/sda2 MacOsx /
    disk0s3 /dev/sda3 Linux /
    disk0s4 /dev/sda4 Swap

  • You have a clean Linux home directory. This means that you don't have directories whose names are in conflict with those on your Mac Os X home directory
  • You are going to disable file system journaling on your Mac Os X root partition! Please read carefully this Wikipedia page about journaling and this Apple page about HFS+ journaling if you need more information.

Boot Mac Os X

Follow these instructions under Mac Os X:

Open a Terminal.

Identify your Mac Os X root partition:

$ sudo diskutil list

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *111.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS MacOsX 99.9 Gi disk0s2
3: EFI 10.7 Gi disk0s3
4: Linux Swap 1.0 Gi disk0s4

Disable file system journaling for the partition:

$ sudo diskutil disablejournal disk0s2

Do a ls -n of your home directory to discover your user id uid:

$ ls -n

total 0
drwx------+ 11 501 20 374 25 Feb 17:43 Desktop
drwxrwxrwx+ 32 501 20 1088 26 Feb 18:19 Documents
drwxrwxrwx+ 8 501 20 272 26 Feb 18:06 Downloads
[Few Others ...]

My UID is 501. Keep your UID in mind, you will need it under Linux. You obtain the same results by using the command "id".
Reboot your Mac.

Boot Linux

Follow these instructions in a linux shell.

Change your Linux user id (UID). To correctly share the same home directory between both OS, you need to have on Linux the same UID of your Mac Os X user.

sudo usermod -u <uid> <username>

(sudo usermod -u 501 bodom_lx in my case)

To have your new UID applied, either reboot or logout from every shell you opened, even from your desktop environment. Login again.

Create a directory in which you are going to mount Mac Os X root partition:

sudo mkdir /media/</strong>MacOsX</strong
sudo chmod 775 /media/</strong>MacOsX</strong>

put this line at the end of /etc/fstab, as root, with your favourite editor:

/dev/sda2 /media/MacOsX hfsplus rw,nosuid,nodev,uhelper=hal 0 0

Remember to change sda2 and MacOsX

Either reboot the system or type:

sudo mount /media/MacOsX

To mount your Mac Os X root directory in your mount point directory.

Now cd to your Linux home directory and begin to soft-link all of your important Mac Os X directories. Here are some of those I needed:

ln -s /media/MacOsX/Users/bodom_lx/Documents/ .
ln -s /media/MacOsX/Users/bodom_lx/Pictures/ .
ln -s /media/MacOsX/Users/bodom_lx/Projects/ .
[...and many more...]
 

Don't soft-link the Library directory.

Conclusions

Now you have the same important files shared on both Mac Os X and Linux, while the important hidden configuration files are kept in separate phyisical places.
You can listen to your Itunes mp3 collection on both operating systems. You can now develop programs under Gnu/Linux. You can reboot your machine to Mac Os X and take notes during the lectures, and so on! Hope you liked this how to, and comment it as well. Contact me if you find some mistakes or you're in trouble!

  • Share/Save/Bookmark

2009 is a Zen year! Announcing BD-theme Zen

Monday, January 5th, 2009

2008 has been a

chaotic, beautiful, uncertain, loving, annoying, sad, inciting, exciting, claustrophobic, happy, insecure, agoraphobic, free, ugly, closed, wild, lonely, impetuous, serene, safe

year for me. It has been a year of changes.

I would like to enter this new year in a Zen way. I would like 2009 to be a year of tranquillity and serenity.
I want to free me from heavy, non-important details. I want to be more minimalist.

I want to focus on essence rather than on appearence.

While I'm preparing to act in this way, you can enjoy mi first step, the most easy one: a new Wordpress theme.
You can see BD-theme Zen working on my blog, but you can also download it and modify it under the Gnu GPL license (v.3)

Enjoy.

  • Share/Save/Bookmark