Home page of this blog

Tuesday, November 24, 2009

Using vesa driver in Fedora 12 live CD instead of nouveau

Fedora 12 includes a reverse engineered nvidia driver called nouveau which did not work properly with my nvidia card (9800 GT).



I could not login properly, nor see how Fedora looked/worked.  Somehow I wanted to try Fedora 12. I tried blacklisting nouveau and forcing fedora use vesa to see how it looks.  It worked and,



Here is a textual summary of what I tried which I hope may help someone


When I booted from live USB, I was greeted by "Automatic boot in 10 seconds"

I pressed tab. This brought me to Boot menu. I pressed tab again and added the following


nouveau.blacklist=1


(and pressed return key after appending above to boot)

After some time, nouveau failed to load as expected as there was no param called blacklist in nouveau (we can give any xyz in place of blacklist to force the module not to load into the kernel!, see the last screenshot)

I was greeted by a blank screen. Great. I am not scared by that

I gave Ctrl + Alt + F2 and gave root as the user name. It logged in without prompting a password. I brought down failed X-Server by issuing

init 3


(init 3 brings down runlevel to 3 without graphical UI)

I confirmed if nouveau was loaded by mistake by lsmod and grep as follows

lsmod | grep nouveau

(if loaded, nouveau wont get unloaded easily, no rmmod will work on it, it is tightly bound, so is this prevention mechanism to not allow nouveau from loading)

I used Xorg to configure my Xorg Server as follows

Xorg -configure

which created a new file xorg.conf.new under current directory

and here is how I edited my file to substitue vesa in place of nouveau using sed editor

sed -i s/nouveau/vesa/g xorg.conf.new


and copied the modified file into /etc/X11/ folder using cp command

cp xorg.conf.new /etc/X11/xorg.conf

To start and test X-server I used

startx 


and I was inside gnome with vesa driver running (which of course did not crash or corrupt my display like nouveau driver, alternative solution is using init 5 and logging in as liveuser, which is a hit and a miss, but startx works always)
In case X-Server flickers due to misconfiguration, it is again easy to fix, by giving Ctrl + Alt + F3 or Ctrl + Alt + F4 ... and then stopping X-Server by init 3

Fedora 12 rocks, even when running vesa driver, it is fast fast ....


Some Fedora 12  screenshots running with vesa driver (last screenshot shows dmesg output, showing how Fedora got confused while trying to load nouveau as I appended blacklist param to boot, which I used to my advantage to stop nouveau from loading, any loadable module can be stopped from loading into kernel using this technique)


 






Notes:
1. vesa is a minimal X driver which should work in any situation.
2. Xorg -configure is the command to configure Xorg manually in Fedora
3. lsmod lists the loaded modules and |grep nouveau lists a line if there is a match (grep stands for regular expression)
4. sed -i  edits file in place and s///g searches a pattern in the first // and replaces with pattern from second //
5. init 3 to go into runlevel 3 (and fedora supports classic runlevels unlike ubuntu where restarting Xorg is a bit different http://duopetalflower.blogspot.com/2009/10/new-way-to-stop-or-start-gdmx-in-ubuntu.html )
6. init 5 brings to graphical desktop manager

Monday, November 16, 2009

screenshots of openSUSE 11.2 and ubuntu karmic 9.10 running in seamless mode

Here are the screenshots of ubuntu 32 bit on virtualbox-ose in openSUSE 11.2 under seamless mode. You could see the fuse of gnome menus  and KDE menus in second screenshot and fuse of openSUSE 11.2 and ubuntu package managers running side by side!!





Saturday, November 14, 2009

I am running ubuntu karmic 32 bit in 64 bit openSUSE 11.2 KDE

openSUSE 11.2 KDE4.3.1 is awesome, extremely fast and very beautiful. I started loving it. Neither can I miss my favorite ubuntu , nor can I miss openSUSE 11.2 KDE 4.3 after getting a feel of its speed, power and beauty. So here is what I did and I am not that good in explaining how I configure. But let me try explaining thinking the reader in second person

If you have a core 2 duo or a quad core PC you need not miss either! Why? Because core 2 duo or quad core processors are coming with hardware virtualization. By default hardware virtualization is disabled in bios. If it is disabled you can enable it in bios. Hardware virtualization makes the guest OS run with near native speed. see X86 Virtualization in wikipedia

I installed openSUSE 11.2 and consider it as a powerful host for hosting guest OSes. As the kernel is very much optimized for desktop use, virtue of  64 bit openSUSE 11.2 kernel with 1000Hz frequency ( unlike ubuntu karmic 64 bit which is 100Hz frequency kernel and that is the main reason I dumped 64 bit ubuntu)

I installed virtualbox-ose, and using virtualbox I have ubuntu karmic running as a guest OS. virtualbox-ose has two parts host and guest

host is the OS which is powerful enough and can host other OS on top of itself, guest is any OS which should be able to run in virtualmachine. ubuntu 32 bit felt light on top of virtualbox and it is a good guest OS

Host

The powerful openSUSE 11.2 with 1000 Hz frequency kernel is my host. To install virtualbox in openSUSE 11.2 is just a click away. Goto yast and install it, suse will resolve all dependencies. Or if wanted to do it command line it can be done as follows

sudo zypper install virtualbox-ose virtualbox-ose-kmp-desktop

Guest

By default after installing ubuntu ran well, but graphics acceleration was not good . So I installed guest additions from the virtualbox menu (Devices --> Install Guest Additions)

Then rebooted and now ubuntu ran well as a guest

Here are the screenshots for your enjoyment (if you view this from a tabbed browser, right click the following images and open in new tab to get a full view)




 




Here is the virtualbox settings I configured as an image



I ticked the following in system menu while configuring

1. Enable ACPI
2. Enable IO APIC
3. Enable PAE/NX
4. Enable VT-x/AMD-v
5. Enable Nested Paging


and ticked enable 3d acceleration in display menu while configuring

and I configured networking as bridged




Why virtualbox?

Because, virtualbox has a open source edition and it offers 3d acceleration in guest OS, kudos Sun Microsystem for such a great product


To look further, there are numerous articles about virtualization in internet. To get virtualbox with full USB support, download and install it from virtualbox.org instead of installing ose edition from repository

Friday, November 13, 2009

Installing adobe 64 bit flash player in openSUSE 11.2

Download 64 bit flash player alpha from adobe site,

http://labs.adobe.com/downloads/flashplayer10.html

see screenshot below





In the page, goto last link "Download 64-bit Plugin for Linux" and right click and save as see screenshot below






Goto file manager and extract the zip (or use command line if you wish)

See screenshot below



Goto command line (konsole or gnome-terminal) and change directory to Download by giving cd Download

Then use sudo command and copy the shared object into lib64/browser-plugins under /usr folder as follows

sudo cp libflashplayer.so /usr/lib64/browser-plugins/

you will be prompted superuser password (in suse, sudo command prompts super user password)


see the screenshot below how the copy command executes in konsole



That is it, you have installed 64 bit flash player in opensuse11.2

To check if the flashplayer is installed, goto firefox and type about:plugins

You should be seeing a new flash plugin, which you installed now



64 bit flash player in action (along with sound of course), how simple, isn't it ?



Enjoy

Tuesday, November 3, 2009

Ubuntu Karmic 9.10 with droid font looks crisp and beautiful

I installed the droid font which is the default android font coming with android mobiles. Ubuntu repository has this droid font and can be installed as follows

sudo apt-get install ttf-droid

After changing the default font to Droid serif, every text looks better and crisper in Ubuntu (atleast to my eyes)

Here is how to change the default font

Right click on empty area of desktop and select menu Change Desktop Background  and select Fonts tab

or


System --> Preference --> Appearance --> Fonts

Change the default font to Droid Serif (and not Droid Sans) and choose the size as you like

Here is the screenshot showing my font defaults


Another screenshot showing nautilus displaying folders, see the Applications menu, nautilus menu, text under folder, everything feels better with droid serif font


I hope you will also be able to get a better font experience like this

Tuning Ubuntu 9.10 Karmic for speed and better internet connectivity

After installing Ubuntu Karmic 9.10, I changed the following tunables

swappiness and vfs_cache_pressure

swappiness --> If we have large RAM, there is probably no use for a swap file and we can decrease the swappiness to a very low value without fear. If the RAM capacity is 512 MB or less than 1 GB RAM, then Ubuntu or any linux uses swap as a swapfile. The default swappiness is normally 60 (but I have seen 40 in case of Fedora 11 after updates). Do not touch the swappiness and cache pressure unless you have atleast 1 GB of RAM

If we decrease swappiness, speed of opening programs feels faster

to get current swappiness of system

sudo sysctl -q vm.swappiness

to change swappiness to value 20, which is low


sudo sysctl -w vm.swappiness=20

to increase the speed of browsing files and folders again and again, we should decrease vfs_cache_pressure. Default vfs_cache_pressure is 100, if we decrease it, kernel virtual machine (vm) caches files more and more

to get current vfs_cache_pressure

sudo sysctl -q vm.vfs_cache_pressure

to set vfs_cache_pressure

sudo sysctl -w vm.vfs_cache_pressure = 50

You can read original tuxradar article about improving speed by clicking this http://tuxradar.com/content/make-linux-faster-and-lighter

Sometime today morning when browsing irctc and opening some news sites, youtube, Ubuntu took a very very long time. Then I remembered that old debian lenny errata page and followed it and tweaked tcp window scaling settings. If you ever feel that you are not able to visit some sites or browse properly, follow this debian errata

Debian Errata, see buggy routers may cause problem

or

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=401435

or

http://kerneltrap.org/node/6723

If you are bored to read the above and continue reading here, what I did, here is what I did after following the above errata page

 Hit the site you are having trouble viewing, if you feel there is problem open terminal and change the system param as follows

sudo sysctl -w net.ipv4.tcp_rmem="4096 65536 65536"

and


sudo sysctl -w net.ipv4.tcp_wmem="4096 65536 65536"

 If you don't feel the same browsing/network issue you faced before setting these two tunables, then proceed below to make the changes permanent

To make above changes permanent upon reboot(speed increase and net improvements) 

Add these lines to end of /etc/sysctl.conf by editing it (sudo vi etc/sysctl.conf)


#decrease swappiness
vm.swappiness=20
#improve file/folder browsing speed
vm.vfs_cache_pressure=50
#debian tcp window scaling errata fix
net.ipv4.tcp_rmem=4096 65536 65536
net.ipv4.tcp_wmem=4096 65536 65536


Note: sudo sysctl -p reapplies all the settings from /etc/sysctl.conf and can be used


A screenshot showing how my /etc/sysctl.conf looks after above changes