Category: Computers

Dell XPS 13 (9343) Review

Bought a Dell XPS 13 (9343), and loaded the laptop with Ubuntu 15.04 (and later, upgraded to Ubuntu 15.10). The 4.10 kernel (shipped with Ubuntu 15.10), has support for I2S mode. This should have supposedly helped, but it did not.

  • Audio Issues (Unresolved)
    • With Windows 10, the audio keeps switching back and forth between Realtek and Intel Sound. To reproduce the issue, sleep the laptop and after it wakes up, sound  disappears. You now have to cold boot the device a couple times to get sound back. Comments on a dell community forum report twiddling BIOS settings for POST – but  it is just the fact that the device was booted a couple times.
    • The BIOS updates do not help (A03, A05 etc. – as of Oct/28/2015, nothing helps).
    • Adding a Bluetooth device (like Bose Soundlink Mini) works for the first time under Windows 10. After that, its a hit or miss. The device appears connected, but it doesn’t work. You have to switch the device off and on, re-pair it and cold boot the laptop.
    • Rebooting to Ubuntu will ensure that your Audio works – but you have to cold boot twice. With that, if you ever boot back into Windows, there’s a chance the laptop will trigger the device back to its bad state.
    • Ubuntu 15.10 recognizes the audio device as “broadwell-rt286”, and due to how “Sound Preferences” work on Ubuntu, you’ll have to change to this device both in the Output tab and in the Hardware tab to get audio back.

      Ubuntu 15.10 Audio Device on Dell XPS 13

    • This article here is the most detailed I found, and has the best information (instead of the voodoo that Dell community applies to work around problems).  Nothing is conclusive and permanent yet, and the fact that BIOS updates still don’t fix this problem is telling that this will likely never be fixed for this model.
  • Mic Issues (Unresolved)
    • Haven’t tried testing the mic extensively, but it runs into similar “device disconnected” problems on both Windows 10 and Ubuntu 15.10.
  • Bluetooth Issues (Unresolved)
    • As detailed above, Bluetooth is a hit or miss. Multiple devices (Bose Soundlink Mini, Bose Wireless Headset and a Bluetooth Logitech Mouse) worked the first time, and after disconnection (they auto-disconnect for some reason), you have to remove/pair/connect again.
  • WiFi
    • Under Windows 10 – WiFi connectivity is a mess. Needless to say, this is where Ubuntu (or any Linux for that matter) rocks. The radio has a more stable performance under Linux – not dropping / switching frequently, as compared to Windows. Of course, if you are close to the source, WiFi under Windows 10 is fine. Carry a measuring tape and do not get too far.

Just one more annoying issue is the fact that the laptop’s wider keys (specifically the “Enter” key), are slightly depressed on one side. I had to adjust to this and hit more precisely.

While trying to return this laptop, the Dell customer exec offered a $100 discount (first offered $75). I saved Dell the $100 discount and let them keep this laptop.

Setup and Play Unreal Tournament 2004 Natively on Ubuntu 14.04 LTS (x64)

Recently learned from a colleague that UT2004 runs perfectly on Linux – natively. Figured from Ubuntu forums, that it does indeed work perfectly.

What is this post going to tell you that others don’t? How to buy UT2004 online, download it and set it up on Ubuntu (without having to worry about a CD, because it’s 2014 and not 2004).

  1. Install wine:
    sudo apt-get install wine
  2. Get wintricks:
  3. Make it executable:
    chmod u+x ./winetricks
  4. Install steam:
    ./winetricks steam
  5. You’ll see something like this downloaded:
  6. Run setup with wine:
    wine /home/$USER/.cache/winetricks/steam/SteamSetup.exe
  7. If you didn’t change the path to install, launch steam with wine:
    wine ~/.wine/drive_c/Program\ Files/Steam/Steam.exe -no-dwrite

    (That -no-dwrite is important because the text disappears without that on Steam. We don’t want to use this for gaming any way, so this is fine).

  8. Create account or log in to your existing account on Steam.
  9. Search for Unreal Tournament 2004.
  10. You’ll get an option to buy UT for about $8 (real cheap right now) – buy it.
  11. Download the game and install it (took me about 30 minutes).
  12. Now copy (or move) this game from ~/.steam/drive_c/Program\ Files\ \(x86\)/ into another location.
  13. Download the mega pack and linux patch bundle from (titled UT2004 Mega Pack Linux + LinuxPatch)
    (If this link is dead, search the Internets).
  14. Overwrite the mega pack and patch files into this other location where you moved your game to.
  15. Install this:
    sudo apt-get install libstdc++5
  16. Also:
    cp /usr/lib/x86_64-linux-gnu/ /Wherever/Your/Unreal/Dir/System/
  17. Finally, get the CD key by running:
    wine regedit
  18. Search for UT2004 (and you should find a key with the CD key in it)
  19. Copy this CD key into a file named cdkey that is placed in /Wherever/Your/Unreal/Dir/System/
  20. Launch /Wherever/Your/Unreal/Dir/System/ut2004-bin-linux-amd64
    ome of these steps will change if you are running this on a 32bit system.)

I did not come up with all these steps, so I’m linking all the resources below in case you need additional help/instructions:

  1. (for steps 1 through 6)
  2. (for “no fonts/text appearing” – the -no-dwrite in step 7)
  3. (for the mega pack installation steps 13 through 16 and 19)
  4. (for the CD key step 17)









So I see that there’s some bots coming in to ssh into I can’t stop those guys. As long as there are doors with locks, there will be attempts to break in. Even though this site has everything turned inside out, bots don’t care, they’ll try to get in anyway.

Anyway, the purpose of this post is to warn folks out there that you shouldn’t keep your usernames (on your ssh port) that are a part of the list in this text file: Actually, there are a lot of ways to make sure that your ssh port is well protected, and disabling all users but the one that you would actually only use (AllowUsers setting in /etc/ssh/sshd_config) is a great way to do this. Also, please disable password authentication. Use keys only. If you dunno what I’m talking about, it might just be a good idea to not run sshd at all. Heh.

Some very interesting names in there. Who the hell is praktikant that made it into that list? Lucky bastard.

Lenovo S400 IdeaPad – Upgrading RAM & Wireless Card + Installing Ubuntu

I bought a Lenovo S400 IdeaPad back in December last year, and well, it wasn’t such a great decision. To begin with, the pros of this laptop distract you so much that it is hard to get away from the idea of owning it. It’s very:

  • lightweight and sleek

That’s about the entire list of its pros. Can’t think of anything better.

So I decided to get rid of the cons. Here they are:

  • 4GB RAM – not enough sometimes
  • wireless card – very slow
  • no linux

Things that I haven’t been able to fix, but are annoyances nevertheless, are:

  • glossy screen – somehow I like a matte screen much better
  • weird touchpad – almost all these “Pads” in the market have this “no button” touchpad now which is hard to get used to

Requirements and Purchases

Things that you will need to upgrade your RAM and Wireless Card:

Now the last thing on that list was the most time consuming of all. In a nutshell, Lenovo has locked down supported wireless cards to only the ones that they would like. So, you have to take a backup of your BIOS, give it to an expert and then download it back with a flash utility and flash your BIOS to whitelist every card. If you don’t do this, after you have changed your Wireless card, you will get a “Unauthorized wireless card; power off and remove it” message from your BIOS.

You may ask, why do you have to backup “your” BIOS and get it altered, isn’t there already a copy on the Internet that you could “just” use. Yes, there are copies but they have customizations that will not go well with your laptop. Hence, you want to keep things simple – flashing a BIOS with someone else’s copy is not to be taken lightly (it may brick your laptop).

 So that I don’t have to keep replacing my Wireless card until I got my BIOS flashed, I also bought a:

..that I used until the wireless card started working. All this time I had to keep my Wireless card disabled in BIOS, so that I don’t get the “Unauthorized..” message.


Getting BIOS modified to whitelist Network cards

Now, to get into the BIOS, you have to use the “Fn+F2” key (or just F2 if hotkeys are disabled) on the “Lenovo” screen.

If you are only looking to add RAM to your laptop, you can skip this section.

To get a copy of your BIOS which has wireless cards whitelisted, you will have to use Windows and follow these steps (CAUTION: use the following at your “own” risk, I take no responsibility if you brick your laptop):

    1. go into your BIOS (Fn+F2 key or just F2 key if your hotkey (Fn) is disabled) and note your BIOS version and other details and post it on the forum (in the next step) along with the backup of your BIOS (see third step)
    2. post it on this forum
    3. post your current BIOS on the forum above by first backing it up using this utility:
      1. to use this utility, copy the files into C:\ so that C: has _BACK directory in it and then open a command prompt “Run as Administrator”
      2. go to C: (just type C: and press enter) and then cd C:\_BACK
      3. run backup.bat (just type backup.bat and press enter)
      4. you will get a .bin file in that directory, zip it up and upload it using and give the folks in forum a link to it along with other details from your BIOS – also, make sure that you tell them that you need wireless whitelisting plus give them a hint to use the “prr” tool for this
    4. if the forum guys tell you to flash from a pure DOS environment, try the following steps, if not, then you just run that utility from Windows and things should go well. For me, Lenovo had locked the BIOS by disabling flashing and I had to flash it from pure DOS environment.
    5. once you get a link back with the whitelisted BIOS, create a DOS bootable USB drive using this link
    6. you have to now flash your BIOS from a “pure DOS” environment, hence you have to create this disk, copy stuff from the archive you got from the forum, reboot into DOS and then run “flash.bat”
    7. just copy the files from the archive you got the link back as (don’t copy extra drivers utilities as some sites suggests – you will need as much memory as possible and copying CD drivers etc. blocks up all that space and you will get failures)
    8. to boot from the USB disk, make sure you have enabled “legacy” boot in BIOS and have selected USB as the first boot device. If you don’t see boot device order, restart your computer again to see it (InsydeH2O supposedly has a bug)
    9. once you boot up into DOS, all you have to do is run flash.bat (or whatever the forum post instructed you to run) and you should see a rewriting of BIOS

Above was all of the software part to get your Wireless card done. What follows is how to disassemble the laptop and get the Wireless card and RAM installed physically.

Physical Changes (Installing the Wireless Card/RAM)

To upgrade the RAM and Wireless card, you have to open up the laptop. It’s pretty simple though, and here are some photographs of how I did it.

      • Get rid of the battery first:
      • Start by unscrewing the left-most screw below where the battery was:
      • The second screw in the middle:
      • And then the right-most one:
      • The uncover more screws beneath those soft pads (notice the direction in which they open) – you would need a tiny flat screwdriver to pop them open:
      • The one on the right to battery opens towards right:
      • The one on the left of the battery, open towards the left:
      • The front ones both open towards the back (or towards the battery):
      • Make sure ethernet cable is detached (if you have one connected) and then slowly work your way to open this thing up. Don’t exert too much force, but keep applying tact to open it. ;)
      • Now in this photo here, you can see that the RAM is on the lower right hand side. The RAM comes off very easily if you use a flat screwdriver to unlock the holding gate (a shiny one). I forgot to take more photos of that, but you can very easily find something elsewhere on the internets (you don’t have to though, it’s easy to figure).
      • Now the wireless card is beneath a black bus wire that needs to be disconnected by opening up another locking gate (black and plastic in nature) towards you.  Please be very careful.
      • Again, use a flat small screwdriver for this and very gently latch open this thing. Notice how the gate is now facing upwards (v/s it was latched down in the previous photo). It’s hinged to the white bank.
      • Once the gate is open, you can hold the bus and drag it out. Gently, very gently. :) See the next photo.
      • As I hold up the bus wire, you can see the wireless card that is connected by two cables – one black and one white (these are supposedly the “antennae” wire) and it’s again “banked” into a black socket.
      • Unscrew the only screw that’s holding this thing in place:
      • After you’ve unscrewed it, it’s very easy to slide this thing out from the black bank (it kind of pops up a little bit already), gently pull it out:
      • Notice how I disconnect the wires, you don’t need any tools to do so, just gently twist and pull them out. They will come off with just the right amount of pull. The following photo shows the “black” one out already (also notice that the black one goes on the left, the white one on right – although it shouldn’t matter a lot).
      • Now, I keep the old one down and take the new one up (notice that my new card has “three” sockets v/s only “two” on the old one). The new one has an extra socket but you can use the ones on the sides only and you’re good.
      • The black one is now being connected to the left most socket, the white one on to the right most socket.
      • There, it’s all connected (gentle pressure puts them in).
      • Slide the card back into the bank.
      • Push the bus wire back in from the top and latch the black gate in.
      • Covering the laptop up is just as easy you pulled it apart, just drive the screws back in after you’ve latched the cover on.

Installing Ubuntu

My objective of having Ubuntu installed was to make sure that I can dual boot into Windows and Ubutu from the GRUB menu with UEFI enabled. A rough outline to keep things in mind follows

    • Download 64bit Ubuntu from when you want to burn the image to CD
    • Make sure you disable “Secure Boot” in BIOS under the Boot Options menu (use F2 or Fn+F2 key to get into BIOS)
    • To boot from the CD you will have to enable “Legacy Mode” instead of UEFI Mode – also, reboot and go into BIOS again to select Notebook Bay etc. in boot priority above the hard drive
    • Once you get into Ubuntu installation, make sure that you give Ubuntu it’s own /boot and select “Grub” as boot method
    • Ubuntu will load up GRUB but you will not be able to load up Windows since UEFI has been disabled in BIOS, hence go back into BIOS and enable UEFI boot mode
    • Now get into Windows (and you wouldn’t see Ubuntu boot options by the way) and install something called “EasyBCD” which lets you install an EFI image for Ubuntu (it can auto-detect and do so) – there is documentation online if you search about how to use EasyBCD to enable Ubuntu dual booting with Windows
    • You will have to go back into Ubuntu and modify /boot/grub/menu.lst to fix the Windows UEFI boot image there in case it’s not working

How to use a GPG key and encrypt stuff?

In the wake of increased attempts at online frauds and information stealing, I thought it only befitting to write this step by step tutorial down for people who have never heard of GPG.

Simply put, GPG keys are used to encrypt information. To “encrypt information” means to make the information secure in a way that only a particular person can see what it contains. In other words, you lock the information and only the person having the key to the lock can open it.

Use Case 1: Bank account information over emails
Never send your bank account information (your account number, the name on the account, type of account, card number etc.) by email. Don’t even send the bank/branch you hold accounts in. Nothing – just don’t send any information at all over email.

So then how do you send information if you need to? Use GPG. Follow these simple steps:

  1. Put your account information in a text file (using your favorite text editor).
  2. Save the file and call it, say, account.txt.
  3. Run these commands (on your Linux/Unix/FreeBSD box):
# curl -L '' | gpg --import
# gpg --output account.gpg  -r 0x0B5267B1E3662EBB --encrypt account.txt

If you try and open account.gpg in the same text editor, you would see some garbage in there, which can now only be decrypted by the person whose key you used to encrypt account.txt.
Command 1 (of step 3)  was where  you downloaded my key (hosted on the link and imported it into your gpg keyring.
Command 2 (of step 3) was to tell gpg to use  0x0B5267B1E3662EBB (which is a public key identifier of the key you imported) to encrypt the file account.txt.

For people who use Windows, there’s an easier way out: The steps above would be very similar – I am sure there would be a way to import a key into that program using a URL. So then, all you do is provide it the URL of the person whose key you want to import and it should be able to use that key.

The file  account.gpg is now ready to be sent over email (to the person whose key you imported in command 1 of step 3).

This tutorial is only about encryption – decryption is a separate topic. (..and my primary motive for this post is to let people emailing me quickly encypt stuff).

See also: [].

I Don't Tweet

Twitter has been downright silly for me since the very beginning – but then I thought may be that is because I don’t use/understand it well. Then I saw this: and was very glad. Some nuisance about twitter:

  • “tweet tweet” – someone is doing something somewhere – go check
  • “tweet tweet” – retweet – someone really did it
  • “tweet tweet” – this url is f**king – you have to f***ing click it to see what the heck I am talking about
  • “tweet tweet” – gawd this news I heard was really the same one every one else knows about – retweet!
  • “tweet tweet” – i want to so follow you for the reason of you following me in reciprocation – puhleez
  • “tweet tweet” – sent from my chuck-phone – I bought a $500 device to tweet all the time, how cool!

All that said, I still am on twitter in some automated way, where blog posts get tweeted. Heh.

Well, I just thought I’d add this one in too:, on how bloggers and tweeters have a gazillion share buttons on their blogs/posts or anywhere else. And then, once again like:

  • “tweet tweet” – that road is like blocked for the last 2 years, but let’s tweet about it #road #bangalore #fail #totallyapocalypticfailure
  • “tweet tweet” – the keys I forgot in my backpack, came thru from my car’s back seat #keys #forgetting #stupidme #stupidyou #car
  • “tweet tweet” – vote my ?post=3441 on reddit #reddit #my…com?post=3441

Affinity for processors

My old roommate comes visting yesterday and we have a technical discussion with exchange of technologies we’ve been experiencing.

So there is this taskset command on Linux which you can use to actually move a process to a particular CPU on your system. Thing is, these guys are using an OS called SixWind (also WindRiver) that is used to run on one out of the two cores on their machine. The other core is used to run other binaries which include their customized application and anything else that is needed. Essentially, the OS runs separately against the application helping maximum usage of resources.

Now I tried doing a taskset on my dual core CPU (in my lappy), for a process (a small executable having an infinite while loop). Turns out that the process at first instance doesn’t get allocated to the CPU. My roommate couldn’t figure out the anomaly here and left. I kept on to it cuz the possibilities were limitless. I kept on doing additional things, killing the process and experimenting with larger processes and real world applications – like Thunderbird and Firefox. Eventually, I figure out that it really won’t matter if I set the affinity of one process onto one CPU or the other. How it started to work was when I went into super user mode and started switching affinity for some of the k* processes. The whole thing crashed and I was glad.

I was more careful next time and started off with setting affinity for kswapd (which is seldom working). Then I wrote a bunch of programs (using some virtual memory code from here) and managed to see how kswapd was working very well on just cpu#1. There’s still some performance to be tested, but I guess that helped me in getting to a point where I could see that when I let Thunderbird compact folders and ran test programs, things were better than wehn there was no affinity.


Rewind to somewhere in May 2000.

I had a small pet project of converting all our Jagjit Singh audio CDs into mp3. I had access to a computer only during Summers and I had very little time (about a month and a half). So I would have to do too many things in much little time. I would rip the CDs using a primitive CD cutting software (AudioRipper may be) and then edit the mp3 tags in Winamp. There was CDDB sans Jagjit Singh. So I would manually look up track names on the back of the jewel case, type in and then use another software to submit data back to CDDB.

It became a tedious affair to tag the mp3s after they were created. Well, there was a (the real overture) in those days that helped me find a nifty utility called mp3tagEditor(beware of look alikes – there’s just one The damn thing was so awesome that mp3 conversion became my summer hobby! I wouldn’t mind playing with blade/lame as long as this coolio was around. (dbpowerAmp came some time in 2001 I guess).

Well, what makes me write this after 8 years at 3 AM in the morning is the fact that mp3tag editor has grown up with me! I just tried it (after a really long time; I decided to do some mp3 management). The bloody thing is so so awesome that you just have to kill yourself to dream of something that it can’t do. Floran (Heidenrich) is one awesome guy. I just wish all other software matured like this super cool utility. The only glitch is that this is still a Windows utility, and though I haven’t tried it, I hope it would run on Wine.

So what did I really like about it is the fact that when you do a Tag to Filename or vice versa, you’ve got some awesome functions, regexes and extra fields that makes it much more fun. Another thing was the inclusion of getting Tag sources using a “web search”! Just give it the album name and it would pick out a list of albums from the FreeDB and match against your files. May be there’s other software doing similar things, but nothing can be better than free, tried and tested.

Lowmus – Play songs to your audio (music) system

Screen shot: Amarok XUL Remote + Winamp Edcast Plugin
Screen shot: Amarok XUL Remote + Winamp Edcast Plugin

I wanted to play music from my laptop to my music system. So, if I fire up Amarok (or Winamp, in case it’s my wife), and I play a song – that should start playing onto my music system.

The best way to achieve it was to connect a low end machine on the network and connect the Audio out from the sound card of that machine into the music system’s Auxiliary port. Hurdles were the software to make it work seamlessly. Follow on…

Apart from a low end system, you also need the perfect OS, which expands to openSUSE. Perfecto.

  • an old system (can be as old as a Pentium 100 Mhz, with some 128MB RAM to spare)
    • this old system would be connected to the Auxiliary input of your music system
  • an openSUSE 10.3 CD (KDE) – Gawd, I love the lizards..
  • a laptop running any Linux or Win*****

After I got 10.3 SUSE running on the host, I connected lowmus (that’s the name I gave to my Pentium 2 166 Mhz with 256 MB RAM) to my old Panasonic audio system (a really old model) and did this:

  • sudo zypper in fluxbox icecast amarok

The next thing to do was login locally to the box (lowmus) and select fluxbox as my default window manager. I configured fluxbox to run amarok and icecast at startup. Essentially, this:

  • mkdir -p ~/.icecast/log/
  • cp /usr/share/icecast/doc/icecast_minimal.xml.dist ~/.icecast/icecast_minimal.xml
  • # changed password on line 24 onwards in ~/.icecast/icecast_minimal.xml
  • # changed logdir to ~/.icecast/log on line 134 onwards in ~/.icecast/icecast_minimal.xml
  • # changed user and group on line 183 onwards in ~/.icecast/icecast_minimal.xml
  • # edited ~/.fluxbox/startup to add these lines:
    • /usr/bin/icecast -c /home/$USERNAME/.icecast/icecast_minimal.xml &
      /opt/kde3/bin/amarok &
  • Used icecast plugin for Winamp on the laptop to stream video to lowmus
  • Configure icecast plugin to stream as Ogg and give the host IP of lowmus along with the passwords you had set above
  • Make sure to configure Amarok on the remote host (lowmus) to play a local stream
    • Fire up amarok on lowmus
    • Click on Playlist > Add Stream > enter [http://localhost:8000/stream.ogg
    • The stream.ogg is the mount point you configured in your Winamp plugin (edcast) or Amarok plugin
    • Hear the sound of music already? (if your player on laptop is playing music)
  • If you play Amarok on your lappy, there are loads of plugins available for icecasting music to lowmus
  • The only other thing you need on your laptop is the Amarok XUL remote
    • Make sure to do a sudo zypper python-qt on your remote host (lowmus)
    • Amarok XUL remote should be installed by doing Amarok > Tools > Script Manager > Install Script > (select the xul-remote-tgz file) and click ok! (do that on lowmus)
    • Configure the script to have the localhost’s IP and a port (preferable 8888) – click Run!
    • Fire up firefox on your laptop and connect to the IP above, like
    • It would automatically install Amarok Remote plugin for firefox
    • Go to Tools > Amarok remote on Firefox (laptop) and click on Configure
    • Give your host (lowmus) IP a username (given in a step above) and password – port=8888
    • After you connect, you see Amarok’s playlist on your laptop from the remote host
    • You can increase/decrease volume using amarok remote and change to a different song on the playlist on the remote host (if you have enlisted those)

Play along!