Wednesday, December 31, 2008

Linux and Vista Hibernation problems

Are you experiencing problems hibernating Windows Vista when you have linux installed in a dual boot setting? Does Vista log you out and show you the login/welcome screen when you try to hibernate your computer? The following may be the cause of your problem.

Vista needs the Windows partition to be marked as the active partition in order to hibernate successfully. To do this, you can use cfdisk utility available on most linux distributions. If you want to use Vista to do this, see the update at the end of the post.

For Ubuntu,
sudo apt-get install cfdisk
My openSUSE already had this installed by default. So fire up the terminal/konsole and sudo/su to cfdisk.

Be very careful with this. Do not make changes you do not understand as if you corrupt the partition table, you might lose all your data, along with the OSs. Be sure to backup your important files.

Look at the partitions and change the 'Boot' flag from the linux partition to the Windows partition. Then select 'Write' to change the partition table. cfdisk may give a message that re-reading the partition table failed. This is normal so don't worry about this.

Reboot to Vista and test hibernation.


Update: Much simpler and easier method using Vista, thanks to Marco:
  1. Boot to Vista
  2. Go to Start menu, right click Computer and select Manage to get the Computer Management window.
  3. Select Disk Management under the Storage category. Your partitions will be shown at the right.
  4. Right click on your Vista partition and choose "Mark Partition as Active". Your Vista partition will most probably be an NTFS partition and will be labelled 'C:'
It's that simple! Now why can't we have something like this in YaST2?

A word of caution: If you have grub setup to boot from the boot partition, this method will cause grub to be skipped while booting and Vista will get booted directly. If this happens to you, use a live cd and restore the boot flags for partitions. Set grub to boot from the master boot record to avoid this from happening.

Friday, December 26, 2008

It works! Broadcom Official Wireless driver (wl) with hidden networks!

If you are using the official Broadcom hybrid wireless driver, either manually compiled or downloaded the one available for openSUSE from Packman, here is a quick fix you can try if you are experiencing problems connecting to hidden wireless networks.

I have a Broadcom Corporation BCM4312 802.11b/g.
You can find which one you have using
/sbin/lspci | grep Broadcom

My wireless network uses WPA2 (WPA-PSK) with hidden SSID. My kernel is 2.6.27 and Network Manager 0.7. A description of the bug (or what I think is the bug) follows:

Description of the bug:

After spending long hours going through the source code for Network Manager, wpa_supplicant and the Broadcom driver itself, I have narrowed down the buggy part to the driver. The problem seems to lie in Broadcom's driver. It does not support 'scan_capa'. So to add this support, you can recompile the driver from the source RPM from Packman along with this additional patch.

diff -uNr hybrid-portsrc-x86-32_5_10_27_11/src/wl/sys/wl_iw.c hybrid-portsrc-x86-32_5_10_27_11_new/src/wl/sys/wl_iw.c
--- hybrid-portsrc-x86-32_5_10_27_11/src/wl/sys/wl_iw.c 2008-12-05 14:41:46.000000000 -0500
+++ hybrid-portsrc-x86-32_5_10_27_11_new/src/wl/sys/wl_iw.c 2008-12-26 11:34:11.000000000 -0500
@@ -580,6 +580,7 @@
range->enc_capa |= IW_ENC_CAPA_CIPHER_TKIP;
range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP;
range->enc_capa |= IW_ENC_CAPA_WPA2;
+ range->scan_capa = IW_SCAN_CAPA_ESSID;

return 0;

If you are manually compiling, just make the changes specified by the patch i.e. add this line 'range->scan_capa = IW_SCAN_CAPA_ESSID;' to 'src/wl/sys/wl_iw.c' at the specified place.

Network Manager now uses AP_SCAN 1 for the wl driver, as the driver now reports that it supports SSID scans (scan_capa 0x01). This seems to work for me and Network manager now connects easily to my hidden network without failing 10 times before connecting, like it used to do before. In fact, using AP_SCAN 2, the original wl driver should not even have connected but association is successful even though the connection fails. Network manager caches the SSID of the network and recognizes it next time for which then it uses AP_SCAN 1. Hence the driver sometimes connects successfully after a lot of unsuccessful attempts.

Please let me know if this patch works for you. If something is wrong with this patch or if you want to suggest changes or have anything to say, please feel free to leave a comment.

Thursday, December 25, 2008

Change YaST2 Fonts

Don't like the default fonts in YaST2 modules? Here's how to change them. Just use su to get root access and then use 'qtconfig' to change the fonts.

Qt Configuration with openSUSE default settings

I prefer DejaVu fonts with size 10. You can use these or any other fonts you like.

Qt Configuration after changing font and font size

See the difference between the old and new YaST2 modules! Much more better on the eyes, I think you will agree.

YaST2 Software Management Module (Before)

YaST2 Software Management Module (After)

Wednesday, November 19, 2008

The best looking XP theme for linux/gnome ever..

Among all the XP themes for gnome I have seen so far, this theme really looks very close to Windows XP. Plus it’s very easy to install than other themes. Just unpack the theme and run the “” file.

Kudos to whoever who made this theme. It must have taken a good amount of work to get the theme and installer properly finished and working.

Although some people might just ask ‘Why?’, themes like this help people who are new to Linux get adjusted to the new user interface easily. This theme makes them feel comfortable since it resembles an environment which they are already used to (namely Windows).

Beware: This theme does not have an uninstaller! You have to do it manually!

Tip: Ubuntu 8.10 (Intrepid Ibex) users have the option of switching to the guest user account rather than their normal account in order to try this theme and see if they like it or not..

Saturday, June 28, 2008

PDF Printer on openSUSE

PDF Printer is really a necessary feature that should be included by default in openSUSE. But since it is not, we shall install it quickly and effortlessly.

  1. Go to openSUSE Software Search. Search for 'cups-pdf'. Make sure the proper version of openSUSE is selected before you start searching.
  2. Choose the latest version from the results. I chose the one from gcoste's home repository. But you can choose any other too. You can install the rpm by using the 1-click install.
  3. Next we need to add the PDF Printer to cups. So open up CUPS Administration by clicking this link (http://localhost:631/admin).
  4. If cups has already not found the new printer, click 'Find New Printers' under the 'Printers' category. CUPS will have now detected the 'Virtual PDF Printer'. In the next screen, leave the 'Make' section blank. Fill up the 'Provide a PPD File' section by browsing to '/usr/share/cups/model/' directory and selecting the PPD file that came with the cups-pdf rpm. You can find this file by using
    rpm -ql cups-pdf
    The file with the .ppd extension in the list is the one you require to select here. Next, click the 'add printer' button and the pdf printer will be added to cups.
  5. Next we need to configure the default directory in which the created pdf files will be stored. This is by default '/var/spool/cups-pdf/${USER}'. Hence, to store the pdf files onto the desktop, edit '/etc/cups/cups-pdf.conf' file. Change the line
    #Out /var/spool/cups-pdf/${USER}
    Out /home/${USER}/Desktop
There! Now you have successfully installed PDF printer in openSUSE. Try a few pdf prints to verify that the pdf printer is working properly.

For more details including about how to compile pdf printer from source, refer the opensuse documentation here.

Sunday, June 22, 2008

openSUSE 11.0 Released!

After a long wait, the new openSUSE 11.0 has been released! With the fastest package management to date, and the best stable KDE 4 distro available yet, openSUSE is definitely worth the download. Get yours today! And have a lot of fun!

Sunday, February 17, 2008

Doom 3 for Linux

ID Software has always been a good supporter of open source, from releasing the source code for older versions of it's games (quake and doom series) to making available native versions of its games for the Linux platform. Unlike other Windows games which linux users can only hope to run using wine, ID games run natively on linux, requiring lesser resources and also provide better performance.

Doom 3 is one of the great and stunning games made by ID Software. Here's how to install it.

First of all, you would require a legitimate copy of Doom 3 purchased from ID Software.

For the next step, go here and download

onto your desktop.

If you want to try a demo version, download the other file

If there is a newer version, of either files, download the newer ones.

Now run this file putting the following into a terminal.
sh ~/Desktop/

The install program will first detect your distro and system. Press Enter.

Next, it will show you the license. Press Enter.

You will be then asked if you want to accept the license in the next step. You have to accept if you want to proceed.

You will be asked if you want to read the readme file. Select your choice. In the next step, you have to enter the installation path. By default, the installer will install the files to '/usr/local/games/doom3'.

If you want to install Doom 3 for all users, you need to exit here and start the installer again with root permissions in order to write to /usr/local/games. Just put a 'sudo' before the command to start the installer as root. But if you want that all files be handled by the package management of your distro and are a single user, it would be better to install Doom 3 into your home directory.

Create a directory 'Doom3' using the command
mkdir ~/Doom3

in a second terminal. Now give the installation path as '~/Doom3'.

Next, you will be asked for the Symlink path. Keep the default path if you are installing as root. Else, change it to '~/bin' if you are installing as a normal user.

Next choose if you want to install Punkbuster. If you do, you will have to accept a second license agreement.

Next, say 'yes' to install startup menu entries.

The installer will install the files and should finish successfully.

It's not over yet. There's still one last step. Now you will need to copy pak000.pk4, pak001.pk4, pak002.pk4, pak003.pk4, pak004.pk4 files from the Doom 3 Cds. They are available in '/SETUP/DATA/BASE' folder of the CDs.
CD1 -> pak002.pk4
CD2-> pak000.pk4, pak001.pk4
CD3-> pak003.pk4, pak004.pk4

These need to be copied to '/usr/local/games/doom3/base' or '~/Doom3/base' depending upon what you chose as the installation path during the setup.

Now upon restarting your computer or just your DE, you should have menu entries for Doom 3 and Doom 3 dedicated server. If you don't have them, create them, or just do Alt+F2 and run 'doom3' to start the game.

Now, Doom 3 should start without any problems and will ask for the CD key. Put in your key here.

Now you are ready to play Doom 3 on linux. If you face any problems with the installation, consult this page. Enjoy!

Thursday, February 14, 2008

Kima, a kicker monitoring applet

I have tried many different hardware monitoring applications for my linux desktop. But most of them either did not work properly or slowed down my computer or occupied my precious desktop space unnecessarily, distracting me with graphs and plots. Then I found the perfect little KDE kicker applet which gave me exactly what I wanted - a simple monitor. It's called Kima.

It can monitor various temperature, frequency and fan sources and sits inconspicuously in the kde kicker panel. It can monitor hard disk temperatures, CPU temperatures, motherboard zone temperatures, laptop battery charge, system uptime, CPU usage and also fan speeds in rpm. It even supports monitoring the GPU temperature of an Nvidia card.


Supported thermal sources:

  • the Linux ACPI Thermal Zone driver. The corresponding kernel module is called thermal.
  • the thermal sources of the Linux ACPI driver for the IBM ThinkPad laptops. The corresponding kernel module is called ibm-acpi.
  • the IBM Hard Drive Active Protection System (HDAPS) driver. The corresponding kernel module is called hdaps.
  • the Omnibook Configuration Tools & Patches. The corresponding kernel module is called omnibook.
  • the iBook G4 CPU and GPU thermal zones. It may work on other Apple machines as well (please let me know).
  • the thermal sensors available through hwmon (I2C, lm_sensors, ...).
  • the CPU thermal sensor of the i8k kernel driver for Dell Inspiron and Latitude notebooks.
  • the GPU thermal sensors of nvidia-settings (provided by the nVidia GPU card driver tools)
  • the termal sensors provided by hddtemp daemon (make sure hddtemp runs on port 7634 before kima starts)

Supported frequency sources:

  • the Linux kernel /proc/cpuinfo interface
  • the Linux kernel cpufreq subsystem

Supported fan sources:

  • the fan sensors available through hwmon (I2C, lm_sensors, ...)
  • the fan sources of the Linux ACPI driver for the IBM ThinkPad laptops. The corresponding kernel module is called ibm-acpi.
  • the fan sources of the i8k kernel driver for Dell Inspiron and Latitude notebooks.

Misc sources:

  • CPU usage source (for each CPU and/or commulative for all CPUs)
  • uptime source that displays the current system uptime
  • battery source that displays the current state of charge of your batteries


  • cpufreqd control module to switch cpufreqd profiles via cpufreqd remote interface
Give this little applet a try if you are looking for a simple monitoring application. I am sure you will like this one. For openSUSE 10.3, you will need to add the KDE:Community repository. To start the applet in KDE, right-click on kicker and select 'Add applet'. Choose Kima from the list of applets. Packages are also available for Ubuntu, Fedora, Debian, Mandriva, Slackware, Pardus and Gentoo on Kima's website. Cheers!

Monday, February 11, 2008

Why 'sudo rm -rf /' is BAD!

Here's what happens when you run 'sudo rm -rf /'. Really an excellent example why you should not run this command on your linux machine. Thanks to alwayschooseford for this great video!

Compiz with Nvidia

For all those who are using compiz with nvidia and unable to start it using the Compiz Fusion icon and are getting the error 'No GLXFBConfig for default depth', here's what to do.

This is presently for compiz-0.7.0-5.1, fusion-icon-0.0.1_080201-2.1 and nvidia driver version 169.09. Use the latest nvidia driver if you are not using it. I presume you must have installed compiz, compiz fusion and the compiz fusion icon from the openSUSE repository. If you haven't already, then go here to find out how to install it.

Compiz with nvidia needs to first have the option 'composite' enabled in xorg.conf file. If you haven't done this, add this to your /etc/X11/xorg.conf file.
Section "Extensions"
Option "Composite" "Enable"

Next compiz with nvidia also needs to be started with '--no-libgl-fallback' option. This is presently not taken care of in compiz fusion icon. Hence open up

with root permissions. Use 'sudo' or 'su', whichever you like and any text editor you prefer.

Find the line
compiz_args = ['--replace', '--sm-disable', '--ignore-desktop-hints', 'ccp']

Replace it with
compiz_args = ['--replace', '--sm-disable', '--ignore-desktop-hints', 'ccp', '--no-libgl-fallback']

Save the file.

Restart X to be safe and fire up compiz fusion icon and select compiz as the window manager. Compiz should start now. Hope this helps! Bye.