Mathematica rendering 3D plots problems

aboSamoor | July 22, 2009 | 11:18 am

Rendering Graphics3D using Mathematica on linux generally and specifically on Ubuntu 9.04+ is not fun. The output is not displayed till you rotate the object, and once you rotate the 3D object the cpu usage jump to 100% which gives bad experience using Mathematica for Ubuntu users. This is a driver issue which it is expected to be addressed with the newer Intel graphics drivers which introduces UXA option instead of EXA as an acceleration method. As 9.04 was released this new technology was not stable enough to be enabled by default.

Now, to solve the problem for Mathematica you have two options:

  1. Run Mathematica with mesa option
    mathematica -mesa

    • Modify /etc/X11/xorg.conf to add the UXA option
      Section "Device"
      Identifier "Configured Video Device"
      Option "AccelMethod" "uxa"
      EndSection

    • Logout to restart the X server
    • Notice: Don’t forget to backup your xorg.conf before editing ;)

Sources:

  1. UXA option
  2. Mesa option

How to install graphics drivers, Ubuntu?

MAJM | October 14, 2008 | 8:41 pm

To Install graphics drivers on ubuntu.
You need to install the driver and the configuration tool. To do that, just type the following in a terminal window:
sudo apt-get install "drive-name" " configuration-tool"
You need to change “drive-name” and “configuration-tool” according to what you have.

If you don’t know the name of your graphics card, check it here:
lspci

In my case it was Nvidia so i changed “driver-name” to nvidia-glx and “configuration-tool” to vividia-setting.
For ATI cards , you can use xrog-driver-fglrx and fglrx-control

After installation, you need do some changes on the “xrog.conf” file .Use the following command to open the file:

sudo gedit /etc/x11/xrog.conf

restart your computer
have fun

Install empathy on ubuntu linux, hardy 8.04.1

aboSamoor | October 2, 2008 | 12:17 pm

Empathy is a new instant messaging client in Gnome 2.24 which aim to replace pidgin and Ekiga. It provide voice and video chat services besides the usual text chatting service.

Read the rest of this entry »

Using Prolog on Ubuntu

tawfiq86 | June 1, 2008 | 12:43 am

This semester, I opted for a course in Artificial Intelligence. To make the long story short, we had to use Prolog.

I was new to the whole language and structure, but what made me really uneasy was I did not know how to use it on Ubuntu.

Here is how to do it:

Go to your terminal and type:

sudo apt-get install swi-prolog

This will install the swi-prolog interpreter on your computer. Note that you can search for other things relating to Prolog such as documentation etc through typing in terminal

sudo apt-cache search prolog

Now, after you have installed the interpreter it is time to start writing programmes !!!

First open a new gedit (or any other text editor to that effect) and type the following at the head of the document:

#!/usr/bin/swipl -s

The body of the program should follow.

Remember to save the file with the .pl extension as well.

Finally, open terminal again. This time find the directory in which you have the program, if it were the Desktop for instance type:

cd Desktop

now, type:

prolog <name of the programme with .pl extension>

and have a blast!!!!!

p.s. Do not type the name between parenthesis, I only used them as delimiters to show you where to type the name.

A Year of Being Ubuntuer

aboSamoor | | 12:00 am

Wow, the first of June this year is special, a year ago I succeeded to move on toward my freedom. My story started in the beginning of 2005, when I tried for the first time to install Red Hat [I am not sure of the version], my first impression was that this whole thing is completely strange and complicated to learn. Trying SuSE a year after did not solve the problem, and yes Ubuntu is the one who made it. The obstacles I faced were due to my ignorance, which Proprietary Software is to be blamed for in part.

My enthusiasm was sourced by the powerful application I have been using since years, Firefox. My thought was if open source is powerful enough to come up with such a browser what about giving it a chance to master my machines. I decided after my Electromagnetic final exam [1/6/2007] to format my desktop and then install Ubuntu as the lone Operating System [No more XPs], because it’s the only way to learn; when you face the fact you don’t have any other solutions to live other than using Ubuntu.

After three days all my daily needs were solved, a lot of copy and paste from Ubuntu forums make things work. I was wondering when my machine will crash and I’m still waiting !!! If you want to ask me why I am still using Ubuntu, my strongest answer will be; because open source is just FUN. The software is owned by humanity and you are not under someone’s authority. Throughout the year I learned a lot about my machines, the operating systems, the current IT industry standards, and the software engineering tools and their importance to make the collaboration of people over the seas possible and productive in the same time.

I hope the next year will be another year of being an Ubuntuer, in my first year I was a participant in #ubuntu channel, blogger about ubuntu users’ issues and problems, persuading my colleagues to switch to Ubuntu, a founder of The Jordanian Ubuntu LoCo team, and making initiatives to adopt Linux in Jordan education system. But this year I hope that my participation will be different, being a maintainer or even a developer for an open source project is not an easy mission, it needs a lot of passion and determination. However, I believe in the importance of this step for the benefit of the community and the process of upgrading my skills.

I know all of that won’t be sufficient for the non technical persons to switch to Linux, or open source in general. But bear in mind if you believe in freedom, the availability of knowledge for all, better future, or new and good jobs for your friends you have to support open source and there are many ways to do that.

Best of wishes extended to all those developers who devoted their lives and gave their best efforts to provide me and millions others with the opportunity to use high end Software, and yes for freeDom.

–Ramy Eid

Fix flash sound problems on Hardy

aboSamoor | May 16, 2008 | 11:04 pm

Sometimes playing flash on hardy becomes painful, the youtube videos are playing without sound or with very low one, i suggest the following trick to solve that, hoping it will work :)

sudo apt-get install libflashsupport

–Good Luck

Make your alarm in Ubuntu

aboSamoor | | 12:14 pm

As most of the linux users machines are working more than 24 hours a day :P . It will be a good idea make your PC an alarm instead of buying another device ;) , i searched for a solution and i preferred the one packaged already with Ubuntu; Using sleep program will solve the problem, try to look at this :

sleep 5m && totem bla.mp3

this statement contains two commands written on one line using && operator, The first “sleep 5m” will halt the execution of the later command for 5 minutes, after the interval finished totem will execute playing the song you want. to make that for 8 hours, you just type:

sleep 8h && mplayer foo.mp3

for more information try :

man sleep

you can change the mplayer, totem with any program you want :) .

–Good Luck

Fix intel wireless driver on Hardy

aboSamoor | April 28, 2008 | 6:02 pm

I installed Hardy on my ThinkPad R61 which using Kernel 2.6.24.

to know what’s the intel wireless card you have run the following command

lspci -vvnn

For my laptop:

03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG Network Connection [8086:4227] (rev 02)
Subsystem: Intel Corporation PRO/Wireless 3945BG Network Connection [8086:1014]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 217
Region 0: Memory at df6ff000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>

running
iwlist scanning
gives me
lo        Interface doesn't support scanning.
eth0      Interface doesn't support scanning.
wmaster0  Interface doesn't support scanning.

digging for the source of the error i got this message in the log

dmesg | grep iwl

[ 68.062145] iwl3945: Microcode SW error detected. Restarting 0x82000008.
[ 68.062169] iwl3945: Error Reply type 0x00000005 cmd REPLY_SCAN_CMD (0x80) seq 0x4414 ser 0x0000004B
[ 69.064840] iwl3945: Can't stop Rx DMA.
[ 69.196238] Registered led device: iwl-phy0:RX
[ 69.196280] Registered led device: iwl-phy0:TX

I tried this trick, to solve the problem

  1. sudo modprobe -r iwl3945
  2. create a file named iwl3945 in /etc/modprobe.d
  3. in that file enter the following entries
    alias wlan0 iwl3945
    options iwl3945 disable_hw_scan=1
  4. sudo modprobe iwl3945
  5. sudo ifconfig wlan0 up

after that i got my wireless card working, but not the wireless LED. For me that is enough :)

How to open rar files in ubuntu ?

aboSamoor | March 26, 2008 | 9:39 am

Ok, this is pretty easy :)
just install the rar library :

sudo apt-get install rar

rar package supports multiple volume archives and damage protection. It can also create SFX-archives. There are versions which run on DOS, Windows (3.1x,95,NT), FreeBSD, BSDI.

to make a  new rar archive

rar a new.rar file1 file2

to extract a rar archive file

rar  e new.rar

or you can make archives or extract them, by clicking right on the archives and choose from the menu, as you are doing with the .tar.gz archives :)

How to disable Touch Pad in Thinkpad R61 ?

aboSamoor | March 20, 2008 | 5:53 pm

The fastest way to do that , is by entering the BIOS of your NoteBook.

You can do that by the following steps:

  1. while booting, Press ThinkVantage blue button
  2. press F1 to enter the BIOS utility
  3. choose config then press Enter
  4. go to Keyboard mouse section
  5. choose disable option for the touchpad

Enjoy typing without interrupts ;)