Archive for the ‘Projects’ Category

* purge removed debian packages

Posted on August 23rd, 2010 by jitu. Filed under Linux.


The package manager on Debian based systems differs between removing a package and purging it. When a package is removed, the executable files and libraries (if not shared by others) are deleted from the hard disk. However the configuration files remain so that, if you reconsider your decision and reinstall a package, it does not need to be configured anymore. If a package is purged, all files belonging to the package are removed.

For many years I used to remove packages only. The recent problem was that over the time some changes were done to udev and it started to complain about an old format of a configuration file.

udevd[8055]: SYSFS{}= will be removed in a future udev version, please use ATTR{}= to match the event device, or ATTRS{}= to match a parent device, in /lib/udev/rules.d/someFile.conf

However this file belonged to a package that was removed a long time ago and hence not updated along with udev. I wanted to clean up my system and purge all removed packages. This can be time consuming task, if the package count of removed packages crosses some hundreds. Use

dpkg --get-selections | grep deinstall

to show removed packages and use

dpkg --get-selections | grep deinstall | wc -l

to count them.

Fortunately the package manager provides an easy command to purge all removed packages at once:

aptitude purge ~c

.



* mobility radeon catalyst driver in windows

Posted on March 9th, 2010 by jitu. Filed under Projects.


AMD/ATI does not provide Catalyst drivers (Windows) for its graphic adapters in laptops. The Mobility product line is only supported through notebook manufacturers and hence someone has to download the drivers from the websites of e.g. Dell, Acer, ASUS, etc. But what if the drivers are outdated or worse, if a Mobility Radeon is built into a laptop that is not designed to have one? The politics of nVidia is different and everybody von a nVidia graphics adapter can download and use the nVidia driver. Honestly I assumed the same applies for ATI drivers and it took me some time that Radeon HD3650 mentioned in the supported devices list of Catalyst does not mean Mobility Radeon HD3650.

To install the Catalyst driver anyway, I needed to follow these steps (it was a clean Windows installation, so maybe you have to get rid of an old driver first):

  1. You need the Catalyst driver. Current is 10.2, but it is not supported in DH Mobility Modder.NET. The team is working on that though. Instead I downloaded Catalyst 9.12 (for Windows XP). There are also Omegadrivers maybe you want to try out one of those.
  2. Start the installation of Catalyst, but interrupt the process, when the first dialog comes up after all files got decompressed. Now all the installation files are in C:\ATI\support\9-12_xp32_dd_ccc_wdm_enu (or any other directory that you chose).
  3. Download and install DH Mobility Modder.NET (have a look at the compatibility list mentioned on this side). You need Microsoft .NET Framework 3.5 SP1 (online/offline installer) and MSXML 6.0 to run this program.
  4. Point DH Mobility Modder.NET to the files in the directory stated above and let it process the data.
  5. Execute setup.exe located in C:\ATI\support\9-12_xp32_dd_ccc_wdm_enu\Driver\. That will install the Catalyst Control Center (CCC). However the driver (and hence the most important part) fails to install due to the unsigned driver (missing certificate) as stated in the protocol. Furthermore, you might run into the problem that nothing can be installed at all and the installation process aborts with an error (I had the experience in 10.2, but I do not know, if it also occurs in 9.12). If it fails (error message: “Catalyst Install Manager has failed”), you should check this thread. By applying this patch (the filename starts with the language e.g. CHS = Chinese Simplified, ENG = English, etc and ends with the architecture: x86 = 32bit systems, x64 = 64bit systems), the installation worked on a clean Windows XP professional 32bit installation without hassle. However there are users who report crashes in various other applications after applying the patch.
  6. After installation is done and the driver is not installed, go to your Device Manager and update the driver manually. For that you choose the location of the driver to be in C:\ATI\support\9-12_xp32_dd_ccc_wdm_enu\Driver\Packages\Drivers\Display\XP_INF\. Confirm the unsigned drivers. Now the installation will be completed successfully.

[Update 16/04/2010]
The information given above is not up-to-date anymore. Since the release of Catalyst 10.3, it also supports Mobility Chips natively without the necessity to patch the drivers with DH Mobility Modder.NET.

.



* installation of ati hd 3650 in lenny

Posted on March 7th, 2010 by jitu. Filed under Linux.


I replaced my nVidia GT8600M with an ATI Radeon HD 3650. The installation of the fglrx driver is a complete mess. Maybe this posting will help you to enable the driver in your Debian/Lenny box.

My setup

At my workplace I have a external monitor (max resolution: 1280 x 1024@60Hz). However the DDC database reports this monitor to also support 1400 x something, which results in the display of “Cannot support current resolution” on the screen.
The LCD of my laptop has a resolution of up to 1680×1050 (Lovely, isn’t it? :D Btw, 15.4″, nice NON-glossy screen etc.)
At work I have to give a presentation sometimes, so the LCD screen should be mirrored at a resolution of 1024×768. Otherwise I would like to have a big desktop stretched over 2 screens, so that I can move windows from one side to the other.

At my home there is no external monitor and I rely only on the LCD.

Installation

I installed the proprietary drivers downloaded from ATI (fglrx, version 10.2). I tried to use kernel 2.6.33 (which was released a week ago), but despite a patch, the compiled module did not load due to some missing symbols. So I downgraded to 2.6.32.9. But even then, the installation failed. As far as I remember, the ati-installer script was complaining about a missing directory in /usr/X11R6/lib/modules or similar.
Soon I found a description which resulted in a flawless packaging and kernel module compilation. Despite the fact, the fglrx is in version 10.2, following the steps mentioned for 10.1 lead to success.

Configuration

The configuration was pretty easy and straight forward. However fglrx is heavily using xrandr and since I had nVidia earlier, I was not used to that nor did I know. The nVidia configuration relied heavily in xorg.conf and I thought the same about fglrx.

Issues

There are some issues with fglrx.

  1. The external monitor does not show the proper resolution despite the fact Modeline etc are mentioned in xorg.conf.

    Solution: The problem seems to be that fglrx is not interested in the data reported by the monitor at all. Even if a ModeLine is forced by UseMode, it is completely ignored by fglrx and the highest reported resolution is used (which is incompatible with this monitor as mentioned earlier). Here is an example of that section.

    Section "Monitor"
    Identifier "Monitor1"
    HorizSync 30.0 - 80.0
    VertRefresh 50.0 - 76.0
    Option "VendorName" "Dell"
    Option "ModelName" "E177FP"
    Option "DPMS" "true"
    ModeLine "1280x1024_60.00" 108.9 1280 1360 1496 1712 1024 1025 1028 1060 -hsync +vsync
    Option "PreferredMode" "1280x1024_60.00"
    UseModes "1280x1024_60.00"
    EndSection

    The solution is to alter the resolution bt xrandr while GDM is loaded. For that I added the lines
    EXTERNAL_OUTPUT="CRT1"
    INTERNAL_OUTPUT="LCD"
    xrandr |grep $EXTERNAL_OUTPUT | grep " connected "
    if [ $? -eq 0 ]; then
    xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --off
    fi

    before gdmwhich () (right at the beginning) in /etc/gdm/Init/Default. These additional lines switch off the external monitor (anyway it does not have to show anything) only if it is connected. My xorg.conf is available at the end of this post.

  2. After the user logged in, the attached monitor should be automatically detected and switched on.

    Solution: Thanks ThinkWiki there is a solution for doing so. To ease the switch between externalMonitorOff, mirror and bigScreen I created 3 executable files in /usr/local/bin/xrandr that allow me to switch the mode instantly. To access the files, you have to create starters in Gnome (e.g. right click on desktop -> “Create Launcher”)

  3. After suspend to RAM and resume, the external monitor is switched off and I have to execute something like
    xrandr --output LCD --auto --output CRT1 --off
    xrandr --output LCD --auto --output CRT1 --left-of LCD --mode 1280x1024

    to reinitialize my desktop and to power up my external monitor.

    Solution: A post in the Ubuntu forum leads to the solution. Put the commands into a file in /etc/pm/sleep.d/.

  4. Now the fglrx driver is installed, what about Compiz?

    Compiz should work without any problem, however the resize issue (nVidia, but nevertheless same issue) resurfaced here again. It is very much annoying and I do not use compiz and the moment. I really look forward for the driver radeonhd to support 3D acceleration so that I can discard the whole fragile installation of fglrx.

Download

The zip file contains

  • my xorg.conf. This also includes the old xorg.conf of the nVidia card. The xorg.conf can be found in /etc/X11/.
  • the scripts that allow me to switch between the modes rapidly. Depending, what is executed, I get a my desktop stretched of 2 displays, a mode with the external VGA port switched off or with the content displayed on my LCD mirrored. To figure out the names of the --output parameter, use xrandr in the console.
  • /etc/gdm/Init/Default
  • /etc/X11/Xsession.d/45custom_xrandr-settings. Do not forget to make this file executable. It is called by the next file.
  • /etc/pm/sleep.d/restoreScreen.sh. This file also needs to be executable.

Download!

.



* 2.6.33, debian lenny, nvidia and vbox

Posted on February 25th, 2010 by jitu. Filed under Linux.


Today kernel 2.6.33 became stable. This post describes, how to get 2.6.33 running on a Debian box running on Lenny (the stable version).

  1. If you use make-kpkg (like me) to compile the kernel, you have to get a newer version of the the package “kernel-package”. In Lenny the current version is 11.015. The compilation works with the version that is shipped with testing (currently 12.032). So download the package from a server of your choice and install it with dpkg -i <packageName>. All dependencies are already met.
  2. Obviously the nvidia-kernel-source will create problems as usual:

    /usr/src/modules/nvidia-kernel/nvacpi.c: In function ‘nv_acpi_methods_init’:
    /usr/src/modules/nvidia-kernel/nvacpi.c:511: error: too few arguments to function ‘acpi_walk_namespace’
    make[5]: *** [/usr/src/modules/nvidia-kernel/nvacpi.o] Error 1
    make[4]: *** [_module_/usr/src/modules/nvidia-kernel] Error 2
    make[4]: Leaving directory `/usr/src/linux-2.6.33′
    make[3]: *** [modules] Error 2
    make[3]: Leaving directory `/usr/src/modules/nvidia-kernel’
    make[2]: *** [binary-modules] Error 2
    make[2]: Leaving directory `/usr/src/modules/nvidia-kernel’
    make[1]: *** [kdist_build] Error 2
    make[1]: Leaving directory `/usr/src/modules/nvidia-kernel’
    Module /usr/src/modules/nvidia-kernel failed.

    The patch from this thread in the nVidia forum helped and it works without any problems (apart from all the warning during compilation).

  3. The kernel module for VirtualBox is quite aged and currently at version 1.6.6. The compilation process complains about missing files:

    In file included from /usr/src/modules/virtualbox-ose/include/VBox/types.h:34,
    from /usr/src/modules/virtualbox-ose/SUPDRV.h:39,
    from /usr/src/modules/virtualbox-ose/linux/SUPDrv-linux.c:35:
    /usr/src/modules/virtualbox-ose/include/iprt/types.h:87:30: error: linux/autoconf.h: No such file or directory
    /usr/src/modules/virtualbox-ose/linux/SUPDrv-linux.c: In function ‘VBoxDrvLinuxCreate’:
    /usr/src/modules/virtualbox-ose/linux/SUPDrv-linux.c:734: error: ‘struct task_struct’ has no member named ‘euid’
    /usr/src/modules/virtualbox-ose/linux/SUPDrv-linux.c:735: error: ‘struct task_struct’ has no member named ‘egid’
    kmk[2]: *** [/usr/src/modules/virtualbox-ose/linux/SUPDrv-linux.o] Error 1
    kmk[2]: Leaving directory `/usr/src/linux-2.6.33′
    kmk[1]: *** [_module_/usr/src/modules/virtualbox-ose] Error 2
    kmk[1]: Leaving directory `/usr/src/linux-2.6.33′
    kmk: *** [binary-modules] Error 2
    kmk: Leaving directory `/usr/src/modules/virtualbox-ose’
    make[1]: *** [kdist_build] Error 2
    make[1]: Leaving directory `/usr/src/modules/virtualbox-ose’
    Module /usr/src/modules/virtualbox-ose failed.

    Fortunately it is easy and fast to be fixed either by applying virtualbox-ose-2.6.33.patch.zip or by replacing

    #include <linux/autoconf.h>

    by

    #include <generated/autoconf.h>

    in the files SUPDRV.h, r0drv/linux/the-linux-kernel.h and include/iprt/types.h.

.



* laptop and mxm graphics adapter

Posted on February 10th, 2010 by jitu. Filed under Projects.


From time to time I find some time to work a little bit on my broken laptop from Bullman. I would like to publish my research results here from time to time so that maybe someone benefits from the information. Since the price of a replacement of EUR 242 is too much, I bought a graphics adapter from a seller in China through eBay. It is exactly the same model (nVidia GT8600M with 512MB RAM), but it does not work in my machine. Even the lamp for the screen is not powered up and the laptop switches itself off after around 10 seconds after turning it on.

A little bit more digging revealed that there are mainly 3 manufactures for laptops: Compal, Quanta and Wistron. Acer, Asus, Dell and Bullman just buy the laptop from them and re-brand them with their own logo. For instance the Bullman V-Klasse 8 is an IFL90. If you search for IFL90 in Google you will find many entries related but from different manufactures. Have a look of the specifications of the V-Klasse 8 and IFL90. Finding any similarities?

I have to speculate, but my guessing is that graphics cards with an MXM II interface are only produced for one of the manufactures and hence is incompatible to the others. So the new GT8600M does not work in IFL90, but it will work in Acer. But that is just a guess, since I do not have any Acer here. I think, I will spend some more money to buy also an ATI RadeonHD 3650 and try it out in my IFL90. I found someone who actually succeeded in upgrading his laptop with this adapter. I will let you know. Currently there is the Chinese New Year going on till 18th of February and I have to wait till it is over.

[Update 17/02/2010]
I strongly suspect the Video BIOS to be incompatible to the BIOS of the main board. To get it to work, both BIOS need to be flashed even before any of them gets executed. The IFL90 provides a routine for that. However it involves the need of an external USB Floppy Drive (for those from the post-floppy-era: It is a device able to read/write a plastic disc holding something like 1.44MB per disc. :D ), which are rarely seen these days. Btw, a pen drive does not work (at least not in my machine). For details how to do flash the BIOS or in case you bricked your BIOS have a look at this post number 184. I will try it out as soon as the old graphics adapter shows its faulty behavior again, since I just got an USB FDD. Unfortunately (for you) it seems to work currently. I recently replaced all thermal pads of the memory. If it was the case that over the time the thermal pads shrink and did not make contact with either the memory chip or the heat sink, then I have a working adapter again. Anyhow the Radeon is on its way and I will try that one too. It seems a little bit more powerful than the GT8600M and the driver development by ATI goes in a very much appreciated direction (hint: open source).

[Update 07/03/2010]
The Radeon has arrived and I can confirm that it is working in my Compal FL90 machine. I had the problem that the thermal pads for the memory where to big and the copper of the heat sink did not touch the die properly resulting in a nice crash and white screen after something like a minute after boot. Do ensure that all memory chips and the die have proper contact. The card is up and running now. However the installation of the same was a complete mess.

.



* vyke.com – any useful support available?

Posted on January 27th, 2010 by jitu. Filed under Experiences with Companies, Projects.


My cell phone broke down (not the openmoko, another one from Nokia). It is still in the warranty period and got repaired free of cost. The whole inner life got exchanged, so that I found some new interesting options when I received it. Now fully integrated in the phone is Vyke and Gizmo5. Gizmo5 has just been acquired by Google and does not allow new members. However Vyke sounded also interesting. For around EUR0.03 per hour I can talk to a landline in Germany from India through my WLAN connection. A record breaking price.
However after registration I received something like 10 SMS from Vyke that I shall download their software and telling me my user name and password for the Vyke account. At the same time they sent an email to the registered email ID to validate it. Unfortunately the spam filter of my provider filtered it out and mentioned that in its daily report. Next day I clicked on the provided link to validate my email ID. And then the problem started. They simply suspended the account for “security reasons” (Ehm, who just send user name AND password via SMS around the world? And then they come up with security reasons just because an email did not get validated :-? ). I guess, I did not validate the email in time, but in the evening of the previous day I already charge my Vyke account with EUR10 to use it for outgoing calls.

However the web page itself says that I have to get in touch with the support team. So I went to the form, filled everything out and wanted to send it. But the form validation process told me that my email ID is not valid. So I gave the email ID of my working place which allowed the form to be sent to the support.

The support contacted me and told me that I need to validate my email ID.

Dear customer,
Thank you for contacting Vyke Support.

Date: 26/Jan/10 07:57 AM
Please be informed that we are not received any email from your registered email : XXX@gmx.de

For verification purpose, please copy and paste all reply from Vyke Support to XXX@gmx.de, and send to support@vyke.com with title VSUP-87182

Looking forward to hearing from you soon.
Please do not hesitate to contact us if you need further assistance.
Kind Regards,
Vyke Support Team

That is exactly the way I received the mail (including the struck through part). So I asked them, how shall I validate it, if their web site does not accept it. In addition I send their mail along with my reply to the support through the email ID that needs to be validated. Just now another email has arrived, telling exactly the same once again, but this time the sender name has changed from Mr. I. C. to Mrs. or Mr. N. D. (I think, I must not mention their name due to legal reasons.)

I do not know, if the people working for the support of Vyke are simply unable to read or too reluctant even to try to understand the problem. I will see what happens till tomorrow. Anyway I already made clear that I will cancel my account, if there is any further delay. And the already paid money? Fortunately I am able to cancel any transaction within 14 days of payment and that too very comfortable online. And that method ALWAYS works :D

[Update 28/01/2010]
The support finally understood the problem. They are sorry for the inconvenience caused. However they proved to be unable to read. In the last mail, I wrote:

I am currently considering to cancel my whole Vyke account again (after having it for record breaking one day). Unfortunately I charged my account with EUR10 already and I would expect you to transfer this money back to my account.

Their reply:

As the last payment you made on 26/01/2010 01:00 credit card number XYZ 10.00EUR have been canceled. Your credit is reverted back to your credit card account. Please refer to your corespondent bank for more information. Please purchase again to continue Vyke services.

We will see, if I purchase anything from them again. Maybe the manager of Vyke should spend some amount to provide dictionaries and to explain the word “consider” to their support team. Let us see, if the money comes back at least.

.



* shuffled characters in console, no x

Posted on December 24th, 2009 by jitu. Filed under Linux.


On 22nd of December I did an apt-get update & dist-upgrade. Since then I faced strange problems with the output of my graphics adapter. First I thought, it aged (there is a bug in the packaging of my model: nVidia GT8600M) and I have to replace it. But sometimes it worked after a reboot without any problems. The output showed mixed up characters in tty starting from the boot of the kernel or even earlier during the loading of GRUB. Some characters got replaced by other symbols.

The X server aborted with:

(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
(II) NVIDIA(0): enabled.
(EE) NVIDIA(0): Failed to initialize the NVIDIA graphics device PCI:1:0:0.
(EE) NVIDIA(0): Please check your system’s kernel log for additional error
(EE) NVIDIA(0): messages and refer to Chapter 8: Common Problems in the
(EE) NVIDIA(0): README for additional information.
(EE) NVIDIA(0): Failed to initialize the NVIDIA graphics device!
(II) UnloadModule: “nvidia”
(II) UnloadModule: “wfb”
(II) UnloadModule: “fb”

and the kernel log told me something like this:

Dec 23 12:48:23 jitu kernel: [ 32.945818] nvidia: module license ‘NVIDIA’ taints kernel.
Dec 23 12:48:23 jitu kernel: [ 32.945827] Disabling lock debugging due to kernel taint
Dec 23 12:48:23 jitu kernel: [ 33.205990] nvidia 0000:01:00.0: power state changed by ACPI to D0
Dec 23 12:48:23 jitu kernel: [ 33.206017] nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Dec 23 12:48:23 jitu kernel: [ 33.206573] NVRM: loading NVIDIA UNIX x86 Kernel Module 185.18.36 Fri Aug 14 17:18:04 PDT 2009
Dec 23 12:48:24 jitu kernel: [ 34.051075] ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] 20090521 evregion-424
Dec 23 12:48:24 jitu kernel: [ 34.051092] ACPI Error (psparse-0537): Method parse/execution failed [\_GPE._L02] (Node f702ee64), AE_TIME
Dec 23 12:48:24 jitu kernel: [ 34.051145] ACPI Exception: AE_TIME, while evaluating GPE method [_L02] 20090521 evgpe-568
Dec 23 12:48:24 jitu kernel: [ 34.051386] NVRM: RmInitAdapter failed! (0×26:0xffffffff:1096)
Dec 23 12:48:24 jitu kernel: [ 34.051392] NVRM: rm_init_adapter(0) failed
Dec 23 12:48:29 jitu kernel: [ 39.355725] NVRM: RmInitAdapter failed! (0×26:0xffffffff:1096)
Dec 23 12:48:29 jitu kernel: [ 39.355740] NVRM: rm_init_adapter(0) failed
Dec 23 12:48:35 jitu kernel: [ 44.665717] NVRM: RmInitAdapter failed! (0×26:0xffffffff:1096)
Dec 23 12:48:35 jitu kernel: [ 44.665732] NVRM: rm_init_adapter(0) failed

If the machine was booted in Windows, the graphics adapter was not recognized and a standard driver was loaded.

The following packages and version numbers have been updated:

  • acpid 1.0.8-1lenny2
  • libldap-2.4-2 2.4.11-1+lenny1
  • libexpat1 2.0.1-4+lenny2
  • libexpat1-dev 2.0.1-4+lenny2
  • libmozjs1d 1.9.0.16-1
  • xulrunner-1.9 1.9.0.16-1
  • xulrunner-1.9-gnome-support 1.9.0.16-1

Currently I suspect ACPI for the problem and it seems that somehow the IRQs get messed up. Since I added pci=routeirq to the boot parameter of my kernel in /boot/grub/menu.lst, I do not experience this behavior anymore. It took several reboots and retries by the X server to bring back the IRQs in order.

[Update 20/01/2010]: Even pci=routeirq did not work. Sometimes it was right there from the start. Sometimes it happened after 3 days of continues execution of a simulation. Although I reverted to the previous version of acpid, the problem still persisted. Currently I am trying out an older kernel and nvidia-glx version (2.6.31.2 instead of 2.6.32.2 and 185.18.36-2_i386 instead of 190.42-3_i386). Today it is the fourth day without that the problem occurred again. Let’s see. I am sure, my graphics adapter is getting ready to fail just after updating the post. Threatening it to be replaced (the laptop has a standardized MXM interface between mainboard and graphics adapter), will make it to work again (at least it seems so) :D

[Update 21/01/2010]: As I stated above: A few hours after I wrote updated this post, the graphics adapter failed again. Let’s see, where I can get a replacement from.

.



* convert ogg files to mp3

Posted on November 28th, 2009 by jitu. Filed under Linux.



Unfortunatley and despite of its advantages the majority of handheld devices do not support ogg format so far. Music collections have to be converted into mp3 before copying them to the handheld device. However many devices read out the ID3 tag in the mp3 files to sort them internally into a library. Most conversion methods and tools convert the ogg file into mp3 format flawlessly, but they do not transfer the tag information that is eventually stored in the ogg file.

The little script (copyIDOgg2MP3.pl) attached to this post, helps in that case. It also contains an shell script example (ogg2mp3.sh), how a whole folder can be processed in a single shot.

Usage/Installation

There is no installation as such. Untar the downloaded archive and execute copyIDOgg2MP3.pl OggFile MP3File
Both audio files must exist. So far only ID3 tags in the version 1.1 are supported.

License

The script is published under GPLv3 and comes without any warranty.

Download

copyIDOgg2MP3.tar.bz2

.