Electrical resistance of Kundan, Orbit insulated wires

October 3rd, 2017 No comments

When the electrical resistance of the copper cable is high, the possibility of power loss is higher leading to heating and melting of cables.  So, I decided to measure the actual resistance of commercially available electrical cables with three different cross-sectional areas.

1 sq.mm 1.57 Ω @ 30℃
Kundan 1.8 Ω
Orbit 1.8 Ω
2.5 sq.mm 0.628 Ω @ 30℃
Kundan 0.7 Ω
Orbit 0.9 Ω
4 sq.mm 0.392 Ω @ 30℃
Kundan 0.6 Ω
Orbit 0.7 Ω

From the analysis, “Kundan” seems a better choice.

Ref: http://hyperphysics.phy-astr.gsu.edu/hbase/Tables/rstiv.html

Tags:

Boot Ubuntu from RAID

May 13th, 2016 No comments

I had lately setup RAID 5 (three 2TB disks) with i7 6700 + ASUS H170 MoBo + 32GB DDR4 RAM followed by installing Ubuntu 16.04 x64 on it.  The installation went very well with Kernel 4.4.0-21.  But, upon restart the installation was unable to move ahead as the Kernel was not able to read from the RAID device.

Basically, the issue is that the install kernel didn’t have the RAID drivers embedded within.  Upon digging for few hours, found one solution at http://ubuntuforums.org/showthread.php?t=2220063 , which didn’t work as is.  The following modification worked:

  1. Boot from Live DVD image, which would load the RAID drivers automatically allowing you to see the device correctly.
  2. Now mount the root partition. (say /mnt/root-partition)
  3. Edit /mnt/root-partition/etc/initramfs-tools/modules for adding drivers that should get embedded into Initialization RAM drive file System (initrd).
  4. Add the following list at the end of the modules file.  The list is generated using “lsmod|grep raid” during the live DVD session.
    1. dm_raid
      raid456
      async_raid6_recov
      async_memcpy
      async_pq
      async_xor
      async_tx
      id6_recov
      raid6_pq
      libcrc32c
  5. Run “mkinitramfs -r /mnt/root-partition -o /mnt/root-partition/boot/initrd.img-4.4.0-21-generic”
  6. Reboot the machine to see that RAID is being detected.
  7. Install dmraid (apt-get install dmraid), which would again fix the initrd image with necessary stuff.
  8. Now, my machine works smooth.

If nothing worked, get a small HDD to install the OS in it.  While booting the OS, you may load the drivers via /etc/rc.local and dmraid commands to activate the RAID device and mount it for use.

Tags:

Installing nvidia driver in MSI GE72 6QD

February 11th, 2016 No comments
  1. Uninstall all nvidia drivers.
  2. Change GRUB_CMDLINE_LINUX_DEFAULT to:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.preliminary_hw_support=1 i915.enable_execlists=0 intel_pstate=disable i915.enable_rc6=0"
    
  3. Then run sudo update-grub2 to make the change permanent.
  4. Restart your laptop to witness the proper function of video screen, which is using the Intel GPU now.
  5. Now you can change the screen brightness using the Fn+Brightness key. Previous to this change, my screen brightness remained the same always.
  6. Install the latest nvidia driver using apt-get. In my case, I installed 361.18 and my Kernel was 4.2.0-27
  7. Restart now and see nvidia driver in action. I had checked the functionality by running nvidia-settings.

Reference: https://gist.github.com/ngangat/02c8279e49783328de3a

Update:  In 16.04 Xenial release, I get a lot of the following errors

PCIe Bus Error: severity=Corrected type=PhysicalLayer, id=00e0(Receiver ID)
device [8086:a110] error status/mask=0000001/00002000
[ 0] Receiver Error

This problem can be overcome by adding pci=noaer to GRUB_CMDLINE_LINUX_DEFAULT.

Tags:

கனவுகள் மெய்ப்பட வேண்டும்

January 11th, 2016 No comments

காணும் கனவுகள், காட்சிகள் மட்டுமன்று
வருங்காலத்தின் வெள்ளோட்டமே அவையாவும்;

காட்சிகளின் கருத்தை ஆழப்புரிந்து
கருத்தை கர்மமாகக் கொண்டு, யோகமாய்;
கருமத்தை கர்த்தா விலக்கி கடமையாய்,
கர்த்தாவே கருமத்தை கருத்தாய் கதிமுடிக்க,

கண் திறந்து கண்ட கனவுகள் கரையேருவது
மெய்யன்றி வேறில்லை,
மெய்யுணர் மதியோனே!!

Tags:

Automated Linux GUI Applications using X11::GuiTest

November 3rd, 2015 No comments

Lately, I wanted to extract from application-embedded medical lexicon to construct a database for easy use of the lexicon data.  The application was ancient (1998) and Windows 32bit.  The application does not work in Windows version beyond Windows XP 32bit.  But fortunately, the application was very runnable in Ubuntu 14.04 over Wine layer.  A snapshot of the application is shown below:

app

There were several restrictions in the application, viz.,  “Select All” does not work, direct copy-paste does not work.  But the traversal of lookup items on the left pane could be fully done using keyboard keys.  So, the process for extracting every item is:

  1. TAB + TAB to go to the left pane containing the lookup items
  2. TAB to move to the right pane.
  3. Ctrl + Shift + End would select the entire text on the right pane.
  4. Ctrl + C copies the selected text to the clipboard
  5. Using “xclip”, it is possible to get the clipboard data into the driver script.
  6. Save the recovered clipboard content to a file.
  7. Move back to the left pane by Shift + TAB.
  8. Down arrow to move to the next item in the list.
  9. Goto Step 2, until exhaustion.

The ideal toolkit for this project is the X11::GuiTest library in Perl (https://metacpan.org/pod/X11::GUITest). The same toolkit is available in software repository, which could be installed using sudo apt-get install libx11-guitest-perl.  The codeblock that I’d used in Perl for getting is done is listed below.

# Start the application 
StartApp('/path/to/app');

# wait unconditionally for 5 seconds to allow the app to come to front.
WaitSeconds(5);

# move the cursor to the scroll list
SendKeys('{TAB 2}');
sleep(2);

for (my $i = 0; $i < 20; $i++ )
{
 # move the cursor to the right pane
 SendKeys('{TAB}');

 # select all
 SendKeys('^(+({END}))');

 # perform copy
 SendKeys('^(c)');
 
 # read the data from clipboard and print that in stdout
 my $clipboard = `xclip -selection clipboard -o`;

 if ( $clipboard ne $clipboard_prev ) { print '-'x 80; print "\n$i\t$clipboard\n" };
 $clipboard_prev = $clipboard;
 
 # move back to scroll list
 SendKeys('+({TAB})');

 # goto next item in the list.
 SendKeys('{DOWN}');
 WaitSeconds(0.7);
}

 

Tags:

Recovering KNotes Data

October 5th, 2015 No comments

The HTML data of KNotes app is stored at

~/.kde/share/apps/knotes/*
~/.local/share/plasma_notes/*
~/.local/share/notes/new/*

The data can be copy-pasted across to recover from the previous installation.

Tags:

போதையானர் (Vs Pythagoras)

September 7th, 2015 No comments

ஓடும் நீளம் தனை ஒரேஎட்டுக்
கூறு ஆக்கி கூறிலே ஒன்றைத்
தள்ளி குன்றத்தில் பாதியாய்ச் சேர்த்தால்
வருவது கர்ணம் தானே

Premise: Consider the Running length of the base of a right-angle triangle as “a” and the standing height “b” and hypotenuse is “c”. As per Pythagoras theorem we have c2 = a2 + b2[Update] Ensure that the triangle is rotated to have the base side longer than the height side.

Proof:  As per the poem we have to consider (7/8) of the base length, that is  (7a/8) and half of the height, which is (b/2) and sum them up to get the hypotenuse “c”

We have (7/8)a + (1/2)b = c => 7a + 4b = 8c.

Consider an easy example of 3, 4 and 5.  By Bodhaiyanar, we get 7*4+4*3 = 40 = 8*5 => c = 5.  We were able to find the hypotenuse without using square root operator in constant time.

Caveat: This algorithm works only for whole number hypotenuse values.  For others, it gives a quick and approximate estimate.

Tags:

ஆசிரியர் தின வாழ்த்து

September 5th, 2015 No comments

தெய்வத்தை தொழுவதும்,
தெய்வீகத்தில் நிலைப்பதும்,
அத்தெய்வமாகவே உருபெருவதும்,
உய்வதின் நோக்கமாகக் கொண்டவர் யாவரும்;
அத்தெய்வீகத்தை அறிவிப்பவர் குருவே என்பதை ஆழ்ந்துணர்ந்திருப்பர்.

தெய்வீகம் ஒவ்வொருவருக்கும் வேறுபடலாம்,
சிலருக்கு தெய்வத்தை ஆராதிப்பதிலும்,
சிலருக்கு செய்யபடுதொழிலிலும் ஆராய்ச்சியிலும்!

எதுவாக இருப்பினும்,
அதன் ஆழ்பொருளை உணரவைப்பவரே குருவாவார்.

குருவின் கடைக்கண் பார்வைக்கு ஏங்குவோர் பலர் மத்தியில்,
எங்கள் அனைவருக்கும் தாங்கள் அருள்பாலித்திருப்பது,
எப்பிறவியில் யாமியற்றிய புண்ணியமோ!

இந்த ஆசிரியர் திருநாளில்
பெருந்தகையாக எழும்பி
எம்மை ஆட்கொள்ளுமாரே..

Approximate English Translation

to worship the almighty,
to be engulfed in spirituality,
to become the supreme soul,
for all who have these as destiny,
possess deeper realization that
only “guru” could show the path.

spirituality differs for individuals,
for some it’s in worshiping,
for some it’s in work and research.

whatever be the genre
the one who announces the path
remain the “guru”.

whilst several yearning for the glimpse of the guru,
what goodness we’d done in our past lives,
to be basking in your blessings, showering upon us.

in this teacher’s day eve,
raise high like a tide,
and fill us with wisdom.

Tags:

Kubuntu 15.04 Playback Control Media Keys not working

July 24th, 2015 No comments

For some reason, while the other 2nd functions keys were working fine, the Play/Pause, Previous & Next keys stopped working in Kubuntu 15.04 since the clean installation. Volume buttons were working fine.  Upon lot of digging, finally the solution was just a workaround by using MPRIS-remote.

sudo apt-get install mpris-remote

Goto System Settings->Shortcuts->Custom Shortcuts

Edit -> New Group -> “Media Player”

Edit -> New -> Global Shortcut -> Command/URL

Enter “Media Play” for the command name.

On the right pane, Click on “Trigger” -> Set the shortcut key;

Click on “Action”-> “/usr/bin/mpris-remote pause”.

Likewise create commands “Media Next” : “/usr/bin/mpris-remote next”

and “Media Previous” : “/usr/bin/mpris-remote previous”.

Clementine is a MPRIS compatible player, which means this hack solves the problem!

 

Tags:

What are the things which a computer engineer should know about?

April 15th, 2015 No comments

Answer by Sudarsun Santhiappan:

When you are an engineer, you are expected to "know" everything about your field.  This means, you are not limited by the training you undergo, but how much can you stretch beyond that point to become comprehensive enough.  Typically, an engineer is someone who can solve real life problems pertaining to engineering.  If you cannot solve problems, you better not call yourself an engineer, but a person with a printed engineering degree.

The following story was an advertisement in Pudiya Thalaimurai Tamil News Channel:

"A very proud rich father and his mechanical engineer gold medalist son were travelling back from the city to their village.  On their way back, the car breaks down and the driver tries to fix it.  After some time, the driver bails out saying that he had to the nearby town to pick a mechanic.  The proud father intervenes the driver, pointing his eyes on his gold medalist son, said; we have a gold medalist in the car, why would we need a mechanic from outside.  The son looked perplexed and pleads to his father that this problem was not taught in his education!!"

You see, the expectation from the society and family is that you should be able to solve any problems pertaining to your field.  So, you better be serving them rightfully, atleast in terms of attempting to solve the problem.

What are the things which a computer engineer should know about?

Tags: