Thursday, November 28, 2013

Installing Ralink 3090 wifi driver

I installed Kubuntu 10.10 on my new laptop, my laptop is Compaq CQ62- 308AX. It has Ralink 3090 wifi, which is not automatically detected by Kubuntu. Even restricted driver manager does not show any option for this device. So I downloaded the driver from Ralink site (  It is in the source format. I thought I might have to patch the kernel source. I went through the readme file and I found that I don’t have to compile kernel ( yippee an hr saved). Only device driver source is needed to be compile. These days things are much more simple. So I compiled the driver by running command “make” and installed it by “make install”.  It has compiled other ralink wifi modules along with 3090 module.

After installation (using ‘make install’)  reboot the machine, reboot is not necessary in Linux after installing driver.  After reboot it loaded incorrect  rt2086 module. So I tried manually unloading and loading module using insmode and rmmod commands, but it did not worked. To fix this open /etc/modprobe.d/blacklist.conf (as root) and add at the end: blacklist rt2800pci. Also open (as root) file /etc/modules and add: rt3390sta.

After rebooting the machine, wifi is working fine perfectly.

Note :- kernel version 2.6.38 and later contains the driver, so you don’t need compile it.

Here is the step by step guide to install to install Ralink wifi driver

  1. Download driver from Ralink site for your chipset.
  2. Extract it, cd to extracted folder, run make command to compile it.
  3. Run make install as root to install the module.
  4. Open /etc/modprobe.d/blacklist.conf (as root) and add at the end: blacklist rt2800pci. Also open (as root) file /etc/modules and add: rt3390sta.
  5. Reboot machine

Monday, November 25, 2013

Adding additional class to a button in drupal

Recently we were building a multi-domain site, we are using same theme for all sites but we want to have different colors for buttons for each domain. We achieved this using my overriding theme_button in template.php of theme, here is the snippet.

 * Overwrite theme_button()
 * @file template.php
function mytheme_button($variables) {
  $element = $variables['element'];
  // Add some extra conditions to make sure we're only adding
  // the classto the right submit button Now add our custom class
  if (isset($element['#attributes'])) {
    $element['#attributes']['class'] [] = 'button';
    $domain = domain_get_domain();
    $element['#attributes']['class'] [] = $domain['machine_name'];
  $variables['element'] = $element;
  return theme_button($variables);

Friday, June 07, 2013

OpenSuse 12.3 - Review - Very good performance

The first thing that I note is faster booting. It takes about 15 secs, with previous version it was about 45 secs. Second thing is better performance. Desktop is very responsive and takes lesser memory. As compared to Ubuntu 12.04 with KDE 4.10, it consumes about 300MB less RAM in OpenSuse on my office laptop.


I installed it on 2 different variants on 2 different laptops, first one is Dell Vostro- Core i5 2nd generation,4GB ram and second is Compaq CQ-62 AMD Phenom X4, 6GB ram. I installed KDE live on AMD one and Mango Linux on intel one. Mango Linux a OpenSuse derivative developed and maintained by me, contains all additional stuff that is needed after installing OpenSuse, like Google chrome, flash, google earth, vlc, etc... and updates. Installation is no different from previous version. Installation went smooth without any issue.

Hardware support

On both the laptops all the device are detected and are working well. For the first time in KDE bluetooth is working, although not perfectly, I'm not able to receive files via bluetooth. Previously nothing was working for bluetooth using KDE, so I've to use Blueman to share files over bluetooth. I had an issue with wifi on Dell laptop using Ubuntu 12.04, that even with fast internet connection, pages open very slow, so I’ve to use cable for internet. I did not faced such issues with OpenSuse/Mango Linux. I have dual graphics in Compaq laptop first one is Radeon 45XX series one IGP and another is 1Gb 5520 addon graphics cards. IGP belongs to legacy series of catalyst driver and discrete belongs to new catalyst, so I cannot install AMD proprietary drivers, as both cannot be installed together, so I’m open source driver. To disable discrete graphic driver at boot I’m following this thread.


OpenSuse12.3 come with kernel 3.7.10, KDE 4.10.0, Gnome 3.6, LibreOffice 3.6. Latest version of LibreOffice is release 4.0, which release after feature freeze hence not included in default software selection, but is available in a separate repo. I'm use KDE as default desktop environment. I did not find any major issue with it, it is very smooth and stable. I used KDE 4.10 with Ubuntu 12.04, where is faced few crashes and performance was not very good, which did not happen in this case. OpenSuse has reputation of providing best KDE desktop experience, it is feel more polished than previous version. Overall performance is far better than Ubuntu 12.04 and also better than 12.2. The major change in default software selection is MariaDb in place of MySql.


In this release performance is improved a lot, from booting to opening applications and doing day to day tasks. It takes 15 secs to boot with default applications/services,which is very good. In VMWare player it takes about 8 secs. Faster booting matters a lot, although it is Linux, you don't need to reboot often as compared to Windows, but it matters. For example you are about leave office, you shut down your laptop/desktop and then you manager ask to respond to an important email he just send. At this moment if you machine take too long to boot, you feel frustrated.

Another improvement is it takes lesser memory. It takes about 300 to 400 MB less as compared to Ubuntu 12.04. I've 8-10 tabs opened in firefox, 5-6 tabs in Opera, Netbeans with Oracle JRE, Konsole, mysql and apache. I'm running almost same version for all app except MySql and Apache. The performance improvement is because of improvement is base libraries. I would recommend OpenSuse 12.3 for expert and new users alike who are looking for a stable Linux distro with good performance and for fair balance of simplicity and good configuration options for those who want to tweak.

Thursday, January 10, 2013

html encode/decode in drupal

Like all major CMS drupal stores text fields in encoded html format, to prevent cross site scripting attacks. Some times drupal does not process custom fields and encoded text is displayed as it is. I come across similar issue in my current project. I also post question on StackOverflow. While search for solution I come to know about decode_entities function. decode_entities converts html encoded text to more friendly text. Similary to encode special charters in text you can use check_plain.

decode_entities function!

check_plain function!

My question on StackOverflow

Sunday, October 28, 2012

OpenSuse 12.2 : Faster, better

After about 2 months delay from initial schedule, OpenSuse 12.2 finally arrived. During recent time, contribution to OpenSuse has increase a lot, so it is taking time review and accept/reject those changes, this is main cause of delay. OpenSuse is working on a mechanism to handle increased traffic. From the release announcement The latest release of the world’s most powerful and flexible Linux Distribution brings you speed-ups across the board with a faster storage layer in Linux 3.4 and accelerated functions in glibc and Qt, giving a more fluid and responsive desktop. The infrastructure below openSUSE has evolved, bringing in mature new technologies like GRUB2 and Plymouth and the first steps in the direction of a revised and simplified UNIX file system hierarchy. Users will also notice the added polish to existing features bringing an improved user experience all over. The novel Btrfs file system comes with improved error handling and recovery tools, GNOME 3.4, developing rapidly, brings smooth scrolling to all applications and features a reworked System Settings and Contacts manager while XFCE has an enhanced application finder.” I downloaded KDE live image, now start testing.


Installation went smooth without any issue all hardware detected on my Compaq CQ-62 laptop. This time I did not any warning for bootloader installation, previously I got ‘root partition is above 128GB’ for bootloader, because of that issue I did not install bootloader from OpenSuse. Thanks to Grub2 this warning no longer appears, so I went ahead and installed it and system booted properly and Linux mint from other partition is also added to the list. The installer interface is same as last version.

First Impression & Booting

It boots really faster, less than half time as compared to 12.1. OpenSuse 12.1 takes about 72 secs and 12.2 takes 30 sec. I disabled few services and it goes down to 26 secs. After installing vmware and virtualbox it went up to 40 secs, which is still better than 12.1’s 72 secs. I need to find out the way to delay loading for vmware and virualbox modules loading. Anyway, I’m sure that people can reduce boot time to 12.2 in 20 sec for normal desktop. OpenSuse 12.2 uses SystemD is default boot/init system, which is much better. All major distros are switching to SystemD, except Ubuntu, which uses an inhouse alternate Upstart.

Overall system performance is very good. I use KDE desktop, it is very responsive. OpenSuse team has worked hard to optimise KDE. The latest version of KDE at the time of release is 4.9, but included version is 4.8.4. KDE 4.9 is available in OBS repo, the reason for not including is that 4.9 is release time is too close to feature freeze date. I did not updated KDE for the time being. I’m using Kubuntu on my office laptop, but the KDE of Kubuntu is not as fast as OpenSuse.


Overall I’m pretty happy with the improvements and performance of 12.2. It is must faster than 12.1 and also faster than Ubutnu 12.04. Majority of performance improvement comes from improvements in kernel and some base libraries.

I’ve been using it since couple of weeks, I faced only one issue which is related AMD/ATI proprietary drivers. Recently AMD is splitted it catalyst driver, better knows as fglrx, into 2 versions, first is legacy version for Radeon HD 4xxx series and older gpu and another is for 5xxx series and higher graphics cards. Unfortunately I’ve both the cards on my laptop, the IGP of my laptop is 4250 and discrete graphics card is 5400 series card. I tried installing both version of driver but none of them worked for me. Let me know in comments if you find a way to make it work.

Thursday, October 18, 2012

Ideas - Better interface for yast services module

Here I'm posting an Idea to improve the interface to services module of Yast. Yast is the control panel like application in OpenSuse Linux. Yast is superb piece of software, I would say it is one of the best control panel among all OS available.

The current services configuration module is not very user friendly, even simple mode is very confusion for the first time users. Other distributions have much better interface. We can borrow few things from other distros. Ubuntu services manager (USM) - The interface is too simple, does not show service running status. System-config-service (SCS) - The interface is user friendly, separate tabs for background services and on demand service, large area for description and status. Windows - Shows service status in list, option for delay start of services.

I think we take few things each of theme. We can use USM interface for simple mode and SCS for advanced mode.

Yast is a superb control panel application but not cool, now we should make it the coolest app so OpenSuse become much more easy to use OS.
Basic mode should look this

Advance mode should look this