How-to Install Nvidia Driver on 2.6.25-2 Debian Kernel (with Xen)

Another big surprise rolled out from the Debian Unstable repository when today I updated my kernel from 2.6.25-1 to 2.6.25-2 - the maintainers have enabled Xen in the non-Xen kernel (linux-image-2.6.25-2-686). The result from this is that Nvidia drivers don’t compile throwing error about Xen enabled kernel.

The solution (if you don’t want to recompile your own kernel) :

As usual backup before executing any of these :)

  1. cd /lib/modules/2.6.25-2-686 (or wherever are your modules)
  2. grep CONFIG_XEN . -Rl | xargs -i sed -i -e ’s/CONFIG_XEN/CONFIG_LUPO/g’ {}
  3. export IGNORE_XEN_PRESENCE=1
  4. sh NVIDIA-Linux-x86-173.08-pkg1.run (or you can use patched 169.12 - http://www.nvnews.net/vbulletin/showthread.php?t=110088 )

Source: linux-image-2.6.25-2-686: nVidia driver fails to compile due to active Xen support

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Live
  • NewsVine
  • Reddit
  • Slashdot
  • SphereIt
  • Spurl
  • StumbleUpon
  • Technorati
  • YahooMyWeb

How-to Install VMware Player / Workstation on 2.6.25 Kernel

After the successful How-to install VMware Player and Workstation on 2.6.24 Linux kernel and with 2.6.25 up and running on my Debian Unstable (Sid) I had no option but to update the procedure.

  1. Download latest and greatest products from VMware
  2. Install and patch as described in the previous post (use vmware-any-any-update-116.tgz)
  3. Download the vmware-any-any-update-117-very-ALPHA.tgz
  4. Extract the archive in /usr/lib/vmware/modules/source (or wherever are yours vmblock.tar, vmmon.tar, vmnet.tar)
  5. Run vmware-2.6.25.sh and then vmware-config.pl
  6. If compiles - have fun, if not drop me a line :)

Important notes:

  1. The original author of the patches is 6xx I have modified the vmmon.patch since otherwise I was getting the error at the bottom of the article. The original patches can be found here
  2. vmware-2.6.25.sh is a very dumb script - read it carefully before executing. It will be even better to paste the commands one by one
  3. This any-any patch has nothing to do with the original any-any patches by Petr therefor I do not want to take the credit for it. All I’m trying to achieve is to gather the Linux VMware community here and share ideas. If someone wants to help and make the patches more unified and smarter just drop me a mail (can be found on the home page)
  4. I take no responsibility for any problems or damage that may
    occur as a result of using any of the information contained in this article.
    Use the information at your own risk ;)

Error log:

    include/asm/page.h: In function ‘pte_t native_make_pte(pteval_t)’:
    include/asm/page.h:128: error: expected primary-expression before ‘)’ token
    include/asm/page.h:128: error: expected ‘;’ before ‘{’ token
    include/asm/page.h:128: error: expected primary-expression before ‘.’ token
    include/asm/page.h:128: error: expected `;' before ‘}’ token
    include/asm/paravirt.h: In function ‘pte_t __pte(pteval_t)’:
    include/asm/paravirt.h:955: error: expected primary-expression before ‘)’ token
    include/asm/paravirt.h:955: error: expected ‘;’ before ‘{’ token
    include/asm/paravirt.h:955: error: expected primary-expression before ‘.’ token
    include/asm/paravirt.h:955: error: expected `;' before ‘}’ token
    include/asm/paravirt.h: In function ‘void pmd_clear(pmd_t*)’:
    include/asm/paravirt.h:1171: warning: missing braces around initializer for ‘pud_t’
    include/asm/paravirt.h:1171: warning: missing braces around initializer for ‘pgd_t’
    include/asm/paravirt.h:1171: error: cannot convert ‘pud_t’ to ‘pgdval_t’ in initialization
    make[2]: *** [/tmp/vmware-config2/vmmon-only/common/task.o] Error 1
    make[1]: *** [_module_/tmp/vmware-config2/vmmon-only] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.25-1-686'
    make: *** [vmmon.ko] Error 2
    make: Leaving directory `/tmp/vmware-config2/vmmon-only'
    Unable to build the vmmon module.
    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb

    Downtime due to Wordpress 2.5 high CPU usage

    Sorry for the downtime guys. I have reached my CPU usage limit due to turning on automatic database backup feature in Wordpress (or something else - not quite sure).

    Lets hope from now on everything will be ok.

    Update:

    With my blog suspended for second time I got really pissed and investigated the reasons. My previous believes about buggy pluggins was not correct and with little googling I found out that Wordpress 2.5.x has some serious problem with CPU usage. As I examined my load logs it is obvious that the PHP process is using more than 5 times as previous versions.

    The solution is either to install WP Super Cache or to downgrade to the previous version before 2.5.

    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb

    Howto Create Lossless Flash Screen Captures (Screencasts) for Free

    Two weeks ago I started my search for free solution that can do cross-browser and cross-platform screen captures. After couple of days I understood that creating screencasts without using Camtasia is hard because I needed something that can do the following:

    1. Produce Flash Video (FLV) which is good for streaming
    2. Use a lossless codec for great quality
    3. Works under Windows XP
    4. Gives good quality/size ratio

    The solution is Camstudio + Camstudio Lossless Codec + miniRec + FFmpeg

    Camstudio is free open source screen capture software (in relatively mature state) with great set of features described on the official website ,blog and forum

    Camstudio Lossless Codec is not really necessary because exporting in uncompressed video works too but requires alot more space. I tried other lossless video formats like MSU Screen Capture Lossless Codec but since I’m converting it in Flash Screen Video it doesn’t make much difference.

    miniRec Audio Recorder is nice and very simple application for recording your voice while capturing the video stream. While Camstudio has build-in audio recording support I had too much troubles with it (the encoded FLVs had some strange bugs) so I’m just recording it separately.

    FFMpeg - as usual the cherry of the pie now with support for the Flash Screen Video format (flashsv). With its help it is easy to produce high quality lossless FLVs with relatively small size.

    How it all works out:

    1. Install Camstudio 2.5 Beta 1 - there are many tutorials on youtube about it and I’ll skip this step. Also you can check the official install screencast - http://camstudio.org/video/install/ which is for abit older version
    2. Install Camstudio Lossless Codec - it is quite easy, just download the archive, extract it somewhere, right click on the inf file and chose install
    3. Run Camstudio and click on Options –> Video Options. For me the best settings for getting as small as possible files are like this:
      Camstudio Settings

      (If you have any better suggestions please share with me)

    4. Download and install miniRec from here. I have not used any special settings since the voice is compressed by FFmpeg while merging the video and audio streams. My suggestion is to set a global shortcut key for both miniRec and Camstudio so it is possible to fire them almost simultaniously.
    5. Record all you want :)
    6. Get FFmpeg. There are versions both for linux and windows. I’m currently using SVN-r12810 but anything relativly recent should do the trick.
    7. The magic for converting your avi to flv is:
      ffmpeg -i input.avi -vcodec flashsv output.flv
      if you are joining with the audio use:
      ffmpeg -i input.avi -i input.wav -ar 22050 -vcodec flashsv output.flv
    8. And the result will be like this:
    You do not have flash installed.

    PS. The song that is used in the screencast is under Creative Commons and can be found here

    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb

    Howto Optimize Rendering Speed of ASP.NET Ajax Websites

    A common case for most ASP.NET sites is slow frontend rendering due to many Javascripts. The typical requests graph looks like this:

    ASP.NET Rendering Graph

    All these AXD files are embedded Web Resources usually Javascripts and sometimes CSSs. The bad news about having many embedded Javascripts are:

    1. Many HTTP Requests (meaning generating more load to the web server)
    2. Poor rendering time because when the browser starts downloading a Javascript file it stops downloading(rendering) everything else (easily seen on the graph)
    3. Less chance for caching any of those files
    4. If HTTP compression is enabled in the IIS many files mean more load and worse compression ratio than one merged file.

    The most common scenario for having many embedded Javascripts is either using AJAX or some commercial .NET controls.

    The solution for merging AJAX AXDs in a single file is described in those two great posts:

    Script combining made easy [Overview of the AJAX Control Toolkit's ToolkitScriptManager]

    and

    Script combining made better [Overview of improvements to the AJAX Control Toolkit's ToolkitScriptManager]

    The recapitulation when with a friend of mine (Julian) tested out this technique was reducing the loading time with about 2 seconds on a quite clean and well build site. Also the better HTTP compression reduced the size a bit.

    If you are using ComponentArt’s Web.UI version 2007.2 or later controls there is solution posted on their blogs too:

    Optimizing Web.UI Client Script Deployment

    And couple more general advices:

    1. If it depends on you merge all your Javascript and CSS files
    2. Load CSS at most top of you page
    3. Load Javascripts at most bottom of your page (if possible)
    4. Minify both Javascripts and CSSs
    5. Be smart :)

    Update: Stefan Dobrev sent me a link for moving the AJAX Javascripts to the bottom (point 3 of the list above) which should improve rendering time too. Thanks Stefan

    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb

    Howto Convert Vmware Windows XP IDE Disk to LSILogic SCSI

    I quite often use my Windows XP VM running under Vmware Server 1.0.5 (Debian Unstable) and because I still don’t have RAID I am forced to try every possible performance optimizations.

    Latest and greatest was when successfully converting my 10 GB preallocated IDE disk to LSILogic SCSI following procedure close to this one. (Try it on your risk !)

    1.Create LSI Logic disk:

    vmware-vdiskmanager -c -s 100mb -a lsilogic -t 0 tempDisk.vmdk

    2. Add SCSI definitions in your VMX file:

    scsi0.present = "TRUE"
    scsi0.virtualDev = "lsilogic"
    scsi0:0.present = "TRUE"
    scsi0:0.fileName = "tempDisk.vmdk"

    2. Boot the VM and install LSI Logic driver - use WHQL 1.20.18.00 (at least I could not install the latest version)

    3. Make backup of the VM Disk !

    4. Open the disk definition file (.vmdk). Get from there the disk size (sum of all extents)

    # Extent description
    RW 20971520 FLAT “WXP-flat.vmdk” 0

    Then create another disk

    vmware-vdiskmanager.exe -c -s 20971520 -a lsilogic -t 1 anotherTemp.vmdk

    This one is only needed so you can get the new geometry and replace it in the original .vmdk

    5. Replace old geometry with new from anotherTemp.vmdk. In my case I replaced this

    ddb.adapterType = "ide"
    ddb.geometry.sectors = "63"
    ddb.geometry.heads = "16"
    ddb.geometry.cylinders = "16383"

    with this

    ddb.geometry.cylinders = "1305"
    ddb.geometry.heads = "255"
    ddb.geometry.sectors = "63"
    ddb.adapterType = "lsilogic"

    6. Update you VMX file so scsi0:0 points to the main disk image.  Also you can remove the old IDE definitions.

    7. Boot your VM and have fun.

    Couple of other performance suggestions:

    1. Always defrag your guest operating system disk.

    2. Use MemTrimRate = "0"

    3. Use scsi0:0.mode = "independent-persistent"

    4. Keep your guest operating system as light as possible. Turn off themes, effects, unneeded services etc.

    Resources used:

    http://sanbarrow.com/ide2scsi.html

    http://communities.vmware.com/thread/50084

    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb

    Javascript 2.0 is Coming

    Jeremy Martin has done a great review of the upcoming Javascript 2.0. His article points out the major changes including:

    • Introduction of classes, interfaces and primitives ( OOP -  yeee)
    • Strict mode with compile time type checking
    • Namespaces
    • Many other…

    The list of changes looks great to me, the only thing that still bothers me is the possibility of inconsistent implementation in the major browsers.

    For more info checkout the full article.

    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb

    Firefox 3 - The Browser War Rages On

    There are already couple of discussions/reviews about the new and improved Mozilla Firefox 3 memory management but i was amazed from the amount of work they have done.

    Worth reading is the original blog post from Pavlov explaining the methods he and the other developers used for optimizing Firefox 3 memory usage, caching and fighting against leaks. The post is a bit long but there is very intersting information that is quite usable for almost every application developer.

    Also couple of days ago Arstechnica compared IE7, Firefox 2, Opera 9.5 Beta, Safari 3.0.4 Beta and Firefox 3 beta 4 and proved that there is obvious improvement and FF 3 uses less memory than other browsers.

    With the new look and redone bookmarking system (sqllite as backend and location autocomplete from the bookmarks) I will still stick with Firefox as preferred browser.

    Couple of screenshots:

    [singlepic=17,150,150,,left][singlepic=18,150,150,,left][singlepic=19,150,150,,left]

    And because for some IE8 vs Firefox is not interesting enough I suggest checking the newly released Safari 3.1

    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb

    Internet Explorer 8 Beta 1 Review with Screenshots

    Couple of days ago I played a bit with the brand new and not so shiny Microsoft Internet Explorer 8. As this is the first Beta release it is mainly meant for designers and developers so they can get their clocks synchronized with Microsoft. For me as a xhtml-css-javascript abuser the most interesting thing was the new standard mode rendering engine which was already main topic in couple of discussions.

    For the review I used Microsoft Server 2003 SP2 because this was what I had installed under VMware virtual machine and I wanted a quick way to revert if I don’t like it.

    Downloading - only 14MBs… done

    Installing – easy and relatively fast… done

    Running…

    On the first run you will be encouraged to choose between express settings or to manually set search engines, activities providers and other options. As IE newbie I selected express settings.

    [singlepic=8,150,150,,left][singlepic=9,150,150,,left]

     

    My first expressions were:

    • Hey there is now a bookmark toolbar – great
    • There is big blue button “Emulate IE7” – strange

    [singlepic=10,150,150,,]

    Ok let’s check the new features:

    1. Activities:

    [singlepic=15,150,150,,left][singlepic=6,150,150,,left][singlepic=7,150,150,,left]

     

    Activities are contextual services that provide quick access to external services from any webpage. Activities typically involve one of two types of actions

    Nothing exciting about this - just sending the selected string to some “Activity provider” via the right click context menu. Still it saves the users couple of clicks and copy-paste operations. For example while I was browsing a page I highlighted the word “violin” and using the Ebay Activity provider was able to find violins on sale. Something that will be quite useful is to have activity provider which can compare prices at different online shops.

    2. WebSlices:

    [singlepic=4,150,150,,left][singlepic=5,150,150,,left][singlepic=3,150,150,,left]

     

    Web sites can expose portions of their page as a WebSlice that users can subscribe to and bring that content with them on their links bar wherever they are on the web. Users receive update notifications when the content changes.

    Generally the idea is not that revolutionary as it sounded at first. Using special markup the website developer/designer can give the end user the ability to automaticly check for updated pieces of the website. It is like rss feeds with pictures. However for both Activities and WebSlices the end user has to “install” the corresponding provider/website slice.

    3. Internet Explorer Developer Toolbar

    [singlepic=11,150,150,,left][singlepic=12,150,150,,left][singlepic=13,150,150,,left]

     

    Now IE comes with dev toolbar preinstalled (yeee) and extended. By first expressions Microsoft team have given more attention to Javascript tools. The bad news is that IE dev toolbar is still far away from Mozilla Firefox FireBug extension. From my quick walkthrough it I found out that you can enable/disable applied CSS styles but can not edit them which is something quite useful.

    4. Speed

    [singlepic=14,150,150,,]

    As usually I used my trusty companion when it comes to measuring Javascript performance - http://mootools.net/slickspeed/
    For comparison I used the same testing environment just before installing IE8 where I had Internet Explorer 6 and the news are quite good. On most tests it behaves almost twice as fast as IE6. There is still room for optimizations (comparing to other browsers) but it is good to see MS are doing efforts in this direction. In the official site it is said that they have also improved rendering time - something that is pretty subjective and hard to test.

    5. Rendering Engine

    [singlepic=16,150,150,,left][singlepic=2,150,150,,left]

     

    After visiting couple of sites (including google maps) I understood why there is such big blue button “Emulate IE7″(second screenshot was done in emulated mode). From the screenshot above you will see how “Internet Explorer 8 standards mode” mess things up (first screenshot). I will need much more investigation but I can not understand how “Cascading style sheets 2.1 compliance” can break so much things - even Yahoo’s home page has displacements. I’m sure Microsoft will fix lots of things until final version, but for sure I will have to re-evaluate my CSS/XHTML knowledge before coding IE8 friendly sites.

    I wish only good to IE8 because after all there will be billions who will use it.
    All trademarks and copyrights are held by their respective owners.

    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb

    Easy Way to Create Dynamic Flash Charts

    For the Javascript Framework performance comparison I needed a good quality bar chart so I got my Microsoft Excel to do the work (as you can see quite good) however if you need to do some quick changes or to dynamically generate charts the answer is Open Flash Chart. It has a good API including .Net, PHP, Java, Perl and other languages support. Documentation is not great but enough to do your work. I played around with it loading data from .txt file and got the performance chart bellow easily done

    You do not have flash installed.

    Cool huh !!!

    These icons link to social bookmarking sites where readers can share and discover new web pages.
    • bodytext
    • Sphinn
    • del.icio.us
    • Facebook
    • Mixx
    • Google
    • Furl
    • Live
    • NewsVine
    • Reddit
    • Slashdot
    • SphereIt
    • Spurl
    • StumbleUpon
    • Technorati
    • YahooMyWeb