Wednesday, August 1, 2012

12 V fans at 24 volts (overvolt 12V fan).

(dated 1st aug, 2012)
I'm talking about the average 12 V fans you'd find at $1; it appears their reliability is pretty good, and looking at their MTBF (4 years of continuous operation), it's desirable to reduce their life with expense of higher airflow.

So I over-volted 2 of these fans to 24 volts and another one (which I dumped a few days ago cause it's bearings were problematic) to 20 volts. Notice, you can't take these fans to 30V, they burn out. So below 30V seems to be safe.

The 20 v one is working continuously for 3 or 4 days, with no signs of wear and tear (despite the fact that the fan's bearings are at a bad shape), and the 24 V ones is used atleast 8 hours a day, and is working since 2 days.

All of these are working fine till now. Notice that people claimed, at these volts, these fans won't last more than a few hours, but their reliability seems good till now, many times their expectations.

I tend to think the first thing to come off are the bearings (being mechanical components), since I don't think the coil of the motor gets too hot to burn the insulation of the copper wires of the windings, although burning of the coil is the second possibility cause the insulating layer degrades over time.

Burning of the controller is ruled out completely cause they were ok even after long operations.

As of the performance, you should realize that the power delivered to the fans is not doubled, should increase 4 folds, cause with the volts, the amps also increases. This means 4 time the air flow, and 4 times the RPM (read fan laws). I measured the power consumption of one of these fans.

To experiment, I attached 2 fans facing (the output of one fan is fed into the output of another) each other and sealed together with insulating tape. When one fans runs, cause of it's airflow, the blades of the other fan will also run; the other fan will also generate an EMF. I'll measure that. It's a measure of RPM.
At 12V, the other fan generated 0.45V, and at 20V, the other fan was at 1.59V, that's more than 3.5 times. Expect 4x at 24V.

At these volts, these fans make a lot of noise cause of air motion, the motor itself doesn't make much any noise. The air flow is so strong that you can feel the suction of the fan from quiet a distance, like 2 or 3 inches. Come up close, and it sounds a bit like a vacuum cleaner.

As of the wiring in my setup I used an external 12V 500 mA adapter clubbed with the SMPS's 12 v source from the molex connectors for the purpose (2 fans).

Don't try to club 2 of the 12 V outlets of the different molex connectors. They come from the same source which will result in a short when positive of one molex meets wit the negative of the other.

Maybe this setup has more value for money than the deltas and 120 mm fans.

Update (Aug 5th 2012) --one of the fans (running at 20 V) broke. My dog bit it, shattering half of it's blades. It ran for ~9 days straight with practically 100% uptime. The same day I bought a new fan with the same specifications.

On night of 7th Aug, the new fan died. It was working continuously for 2 days. It didn't get burnt in any way, but there was a strange problem with it. After giving it power (12 or 24 V), the the fan will rotate for a few minutes, then it'll stop. On manually rotating the blades, it behaved like a spring, or like a very powerful motor with TREMENDOUS torque (and powerful permanent magnets) which's offline.

I've decided to replace the fan with a home-made one. The Q/A of the fan was questionable from the start. It was moving slowly.

Also note that rest of the 2 24 V fans still work

Update -- one of the 2 fans was replaced today by me (on oct 13th 2012). Problems came up with the bearings; it was making too much noise.
But it's to be noted that this problem started before I hiked up the voltage to 12 V; it was showing symptoms of failure.

Update -- Again the new fan that I replaced above gave the same bearing problem; I've replaced it with a new one on 27th feb 2013. However this time the fan was not at 24V all the time cause of cold climate.

Update -- I realized these sleeve bearing fans can be lubricated (search google). That'll solve the bearing problems. However if you ignore the noise for a long time, the fan may incur permanent damage. After this, the fan has practically unlimited life until it's winding burns.

Unlike what Google articles suggest, I'll ask you to fill the oil almost to the brim (but not so much such that when you close it with tape the oil will stick to that tape) and seal it off with a small portion of an insulating tape.

Cut out the tape such that it just covers the hole (keep a little bit of margin), and apply superglue around the border of the tape. Just put a small drop of suerglue at 1 corner of the tape and try to spread it all around the tape to form an airtight seal. If you apply less superglude, it'll be easier to open up the hole again for oiling.

The reason for the complications as above and the reason for using insulating tape specifically is that, these sleeve bearing fans tend to heat up at the bearings and the coil also heats up. Then the oil and air in the hole will heat up and will put pressure on the sealing of the hole. So if you use tape without superglue, the oil will leak out cause the adhesive of the tape is not strong enough to contain it.

If you use a rigid material to seal the hole (insulating tape expands under pressure), like straight and rigid plastic sheets, the pressure inside the hole will increase to a very large amount until the sealing between the shaft and cylinder of the sleeve bearing breaks and the oil leaks out from the other side (this will not damage the fan though). Insulating tape on the other hand expands to compensate for the high pressure, preventing such a thing from happening.

The fan heats much more when you're overvolting it.

The large amount of oil will act as a reservoir and compensates for the evaporating oil. The sleeve and shaft is an air-tight seal (like piston/cylinder) and wont leak oil unless something's wrong with the fan; you can figure that out if the oil disappears from the reservoir the moment you put oil in it (or after a few minutes).

Practically I've seen a suction being formed instead of high pressure in the oil reservoir, that depresses the tape over the hole. The low pressure will be there until all the oil is used up, and then high pressure will develop bulging the tape. After this, within a few days (or maybe months), the fan will start making noises again.

The problem with oil is that it evaporates quick; so grease will be good, but the problem with grease is that it doesn't flow -- so it wont go down the bearing from the reservoir. So what can you do is mix them both and you get the best of both.

Since grease has an oil base, machine oil forms a homogeneous mixture with it. Thin the grease this way till it form a thick mixture which flows easily, then fill it in the oil reservoir.

This mixture lasts much longer (4 to 5 times more as per my stress tests, but in real life, it should be much more durable) and the fan moves MUCH faster cause of reduced friction.

However there are downsides. Once the mixture is used up, there maybe carbon deposits on the shaft which will prevent new lube from going in and at the same thing slow then fan down to a crawl. In this case, you've to actually open the fan up to clean the shaft and sleeve. And before you put it back, you may like to grease the shaft.

See how to disassemble the fan --

http://www.instructables.com/id/How-to-take-apart-a-case-fan/

Tuesday, July 31, 2012

Optical disks -- The most unreliable and expensive data storage medium.

When you think about disks -- thousands of complications come to mind: starting from the disk itself (+/-, DL, RAM etc...) to doubt about the data written on the disk (data corruption) caused by 1000s of possible combinations of problems (dirty lens, bad mechanics, old/faulty driver, manufacturing defect, software fault, writing speed, wrong way of handling, a fingerprint or scratch on the surface etc...)

Following all these facts, it's a matter of chance why a disk should write properly, and in most of my personal experience, they never do, even if they do, they degrade quickly over time and are susceptible of things like fungus etc..

Then it doesn't have any stable shelf life either, at most, it'll be 5 years; i.e you've to rewrite all your disks every 2 years in order to ensure that your data is OK.

Well, after all this, considering the amount of blank disks you waste and the data loss that occurs, disks ARE the most expensive and most unreliable medium.

A much better alternative is to buy hard disks for archival purposes or use tapes.

Wednesday, July 25, 2012

Offline wikipedia howto (with Apache, and mediawiki CMS, PHP, mysql)


Starting point –
Wiki allows downloading of their databases for offline use, these include static HTML (not updated) to SQL dumps to XML dumps.
The most tempting way is to use wiki's official CMS (mediwiki) and host it using Apache locally for internal use. You need to compile php with xml viewer and session support. To import database, you need to build it with the shell interpreter also.
Mediawiki uses PHP and some kind of SQL (mysql, postgre, or sqlite); it depends on the configuration of PHP on what backend will be used.
Next you need to download the XML dumps, follow the above links to do so. As an alternative, follow –
Both point to the same place actually.
Download xml dumps intended as backups (thus may be incomplete). If you want a single XML, download from

The keyword here is the 'pages-articles'. The above file is one large tarball of all articles, other files with name '*pages-articles*' are parts of the actual articles.

These dumps don't have images, only text.

Next, you need to get the sql server started and set the root password (how you do it depends on the OS), next start the apache server, open the wiki CMS and start the setup.

You'll be asked for the username/password for the SQL database you set up for r/w access.

Your wiki will soon be ready and a conf file (in php) will be made available for download which you have to place in the root dir of the installed CMS.

To import the xml database dump, you may use several ways as listed in

The most reliable but slow method is using the importDump.php php script as root to import the pages.

The maintenance folder has this importDump.php script with a lot more script which's used for housekeeping and management. To import –

php importDump.php

e.g –

php importDump.php '/home/de/media_writeit!/temp(others)/enwiki-20120702-pages-articles1.xml-p000000010p000010000'

This's going to take a lot of time. As the script imports, it will show progress on the number of pages imported.

You may check the import by opening random pages, but all of these will be without images.

Next, the images have to be fetched straight from the Internet in a crawler-like fashion, you may use 'wikix', a C program which does so and puts the images in a directory structure which the wiki CMS can read. Wikix takes input of the same xml files you used to import pages into the database from stdin; as output (stdout) it's going to make a bash script to fetch the images and put it in a directory tree (which's intended to be put in the 'images' directory in the place where you extracted the wiki CMS) which the wikimedia CMS can read.

E.g –

./wikix < ../../enwiki-20120702-pages-articles1.xml-p000000010p000010000.xml > scripts.sh

This makes a single script which uses curl to fetch the images.

Now the script has to be placed in the 'images' directory of mediawiki CMS and made to run.

If you use -p switch many scripts will be made which're intended to be run in parallel to allow parallel fetching (via a single master script which calls these scripts). The stdout doesn't have much when this -p switch is used, there's no output.

Download the source code of Wikix (copy-paste in text files) from –

The compiled program is recommended to be placed in the images directory, but you can place it anywhere, just ensure the directory structure holding the download pictures are placed in the images directory of the CMS.

Once downloaded (or partially download) and placed in the images folder, run –

php ./rebuildImages.php –missing

This's going to index the images and link it to the images which're linked in the rendered CMS which makes the images available.
The script lies in the maintenance folder.

Sunday, June 24, 2012

Gigabyte H61m-D2h Linux compatibility.

It works perfectly. All of the VGA, DVI and HDMI outputs work with multi monitor setups. The mic input also works; but I've not tested digital output and input.

Although this product is Linux compatible, but like all Gigabyte boards, it's full of issues.

The front USB don't work, booting from USB CD/DVD doesn't work with the latest BIOS (F5).

There're problems with over clocking.  If you've over clocked the board, and reset the PC (or push the power button for 4 seconds), the BIOS will think there has been a crash cause of bad overclocking settings and it'll reset to defaults after a few minutes of failed starts (the PC starts for a few seconds, then shutsdown, and then starts up again; this happens for a few minutes). And many times, it'll never recover. It'll keep on resetting whole day and night, but it'll never start. You've to cut off the power (or push the power button for 5 minutes) to shut down the PC completely and then start (with OC settings reset to default).

At times doing the above to recover doesn't work, i.e. if you power on the PC, it'll start resetting forever.

And now (update) I realized that this doesn't have to do with overclocking. Even without overclocking, there's no guarantee the PC will boot next morning; it may just fail to boot and after a series of resets, when it finally starts (somehow), it warns you that the overclocking settings are reseted to default -- when infact, I've not overclocked.

Gigabyte has ensured that the dual BIOS feature DOES come to use. The BIOS is deliberately corrupted as the board simply resets again and again, and then when it starts "check sum failure, recovering..."

It doesn't matter if you have a dual BIOS feature or not, cause boards without them will simply never get their BIOS corrupt; whereas this one will frequently.

Another problem, actually more of a Microsoft Intel (for Microsoft Ultrabook and various other things) problem is that the USB will reset from time to time resulting in 'reset high speed USB device' by the ehci_hcd driver. It manifests itself as silent unknown errors on Windows; and this problem is well know with this particular chipset.

No, this's not the end of it. Now I'm getting SATA errors. The SATA link will drop all of a sudden resulting in a 'tack' sound from my HDD. This happens when the HDD is under a lot of load. I'm not sure if this's a known bug, but speaking of sata, the sata controller of this particular chipset has limited life cause of 'unknown Intel errors' (may be they inherited it by trying to make their products too much Windows 8 compatible), however Intel provides replacement for this.

This board can be best compared to Windows and designed for Windows enthusiasts/diehard users. It has a lot of buttons/feature to play and tinker around with, and it really doesn't matter then work or not, Windows users just like to 'see' them and change settings and options; on top of that, we get Windows like reliability and all bells and whistles (anti-virus, anti-spyware, anti-crapware, anti-malware, firewall, tweaking software etc... etc... etc... in contrast to stuff like dual BIOS) which's needed to keep using the board and to compensate for it's bad QA.

All in all, I've warned you, I've had 2 Gigabyte boards (older being a higher end one), and none of them worked well.

Intel HT (Hyper threading) single threaded performance.

I didn't find any info on this, so I decided to test it on my own.

I ran mksquashfs with just 1 thread (-processors 1) with HT truned on and off.

It turned out that, with HT enabled, despite a single thread used (or 1/4th of the no. of threads the processor had to offer), all of the processing power of a single core was utilized. With HT turned on, the task finished in 46 seconds and with HT turned off, it took 45 seconds.

So I suggest HT turned on always, even for single threaded applications.

Saturday, June 9, 2012

The perfect call blocking app (Android).

By perfect I also mean permissions.

Privacy Guard (also called Block SMS & calls in play store) is a simple app with professional grade permissions, so you can be ensured that your contacts are not uploaded to the internet without your knowledge, which other apps might do (cause they have full network access).

It's a very bad idea to install an app blindfolded on your secure Android phone. By installing apps with bad permissions, you're yourself encouraging your phone to get compromised; after doing so, don't blame the OS if you do get compromised, it's all your fault.

Wednesday, May 23, 2012

Using flash? Your site and skills are sold to Adobe.

Well, not exactly sold, but 'at the mercy of'.

You should always keep in mind the disadvantages of relying or learning too much flash; yeah, learning is not bad, but you should be careful what you're learning.

Remember that Flash, shockwave are Adobe product, it's Adobe's property, but your work (your work on Flash), your skills, or you heavily flash ridden website rely on these products. It depends on Adobe how your flash work displays, and also depends on Adobe on what devices you flash work is displayed. Any security vulnerability in Adobe's product may be exploitable via your flash work, and unknowingly you (and Adobe) will be to blame.

And these are not hypothetical examples, but these have been already proven. For starters, Adobe is no longer supported on mobile devices and on Linux, it's been discontinued and your flash (or future flash work based on future versions of flash) work wont work on these devices, even though you want to.

To businessmen with a company's website (who very commonly use flash), all this means that your company is already more dependent on yet, more companies, which no business owner likes; your customers may have a bad experience for your eye-candy flash animation and might not even consider your products simply cause your website didn't open on their device, or they were having technical issues related to flash. To most businesses, a customer wants to see your products, get product information and find information on your products easily, what will they do with eye candy? Even Facebook and Google doesn't have that, why do you need it? People want your website to open fast and provide them the information they need as fast as it opened, they don't want to get hogged by slow animation and loading times which makes your website impossible to view with slow internet connections!

These are the reasons for why not Flash/Shockwave or any propitiatory plugin. With these technologies, you're never your own master, Adobe is your master and Adobe is all about money, not about you.

So go for HTML5 and webgl, they're all about you, all about standards and benefits to the public without any political or business motivation.

Tuesday, May 15, 2012

Low and high frequency sound collection.

 Download from -

http://minus.com/mlUGvWe6m

Contains one minute clips of frequencies from 15hz to 25Khz.

Although the sounds are right, your player might be wrong. Some players produce the wrong frequency. For me Kmplayer worked.

Sunday, May 13, 2012

"Can't establish a reliable data connection to the server" -- android + google account.

This's a fairly common problem which people are facing with Android.

Apart from more common solutions like resetting the phone and logging in via youtube, first you should check if you set the date and time correct or not.

Monday, May 7, 2012

Debian 2 year's release cycle is good for the Desktop.

Debian always got this criticism of long release cycles. 2 years in development of GNU software is revolutionary, but still Debian continues to churn out new stable distros at a snail's pace.

But actually, in my experience this kind of cycle is good for casual users who require only a few set of software to survive instead of complications like the latest DE, software or Window manager.

In KDE and Libreoffice at least, it happens that after each upgrade, there's a regression. And you know those regressions will be ignored long to cause major annoyance (you know the KDE devs will be implementing 'features' instead in their 6 months release cycle), and ultimately these buggy updates with regressions will be pushed to unstable and testing... and nothing can stop it from being pushed.

So, after each update of the distro, there's an element of surprise.

But the sable branch on the other hand will remain with the old version, the few tolerable bugs that existed will continue to exist and people will find workaround for them, and many times the fixes will be backported and updates will be provided, then for the newer software we have the backports, the only problem with them is that it's difficult for the average joe to install form backports. Maybe Ubuntu software centre should be modified show graphical packages form backports also.

Also drivers and kernel can be backported, solving most of the hardware compatibility issues.

People who ask for comparatively newer packages (5%) can usually handle the small inconvenience with testing, but not the average non-IT guy.

So ultimately: Debian's stable's release cycles matches the average user's requirement of a stable and secure desktop.

Friday, May 4, 2012

Philips 192EL2 review.

I don't own many Philips products around; this must have been the first few, and I'm not having a good impression on Philips's QA.

The first monitor I bought did not work... it just displayed a blank screen, nothing else.

So I got it replaced.

For the good part, the brightness is fabulous, and colors are good but the firmware is equally bad.

It's so bad that you have to reset the monitor at times in order to get it's sharpness back.

At times the auto adjustment doesn't work well and you can see some parts of the screen as blurred (yes, the monitor is at it's native resolution). Solution is to reset the settings to factory default.

I would've liked it if there were presets for settings, but following the bad firmware and resets, I wont work hard storing them.

Thursday, May 3, 2012

Samsung Galaxy Y review

This's one of the cheapest Android phones around and is good value for money.

At this price range you really can't complaint about missing features, but still for the review, the phone is not very slow (very fast than you Windows computer) but you can complain, yes, sometimes you do get a few seconds delay when opening the desktop after a long browsing session, or opening calls/contacts if you have a lot of entries in them.

IMO the battery life is ok if you set the brightness to low, but if it's at max, you may have to lug the charger around. Notice you have to set it to high brightness outdoors.

Low resolution display and camera come with the price.

Verdict: It's a good phone for business application with Android expanding the possibilities, but bad as an entertainment phone (cause of low resolution display, slow processor and less ram).

Saturday, April 14, 2012

List of logged in users (with port) in a ssh server.

Run

netstat --numeric --numeric-ports --program | grep ^tcp

To list them, this'll also show the port via which they're connected to your box/server.

Sunday, March 25, 2012

Force GTK UI in QT Libreoffice

Tired of QT related UI bugs in libreoffice[kde]? In the same libreoffice build, you can force the GTK UI as such - 

OOO_FORCE_DESKTOP=gnome libreoffice

i.e. changing this environment variable to gnome in order to start with GTK UI.

If you've not installed gtk or gnome integration (or in Gentoo if you've  not compiled with gtk USE), then it'll open in libreoffice's stock GTK UI which does not respect the system GTK themes.

Saturday, February 18, 2012

Nokia 7210 supported video format/codec/encoding


Nokia 7210's screen size is 320x240 and supports the same video resolution (don't know about the max and the mins yet). It can play mpeg4 compatible streams with aac audio in mp4 containers. However the video is choppy if you specify the qscale as 20 or higher, it'll ok at 15.
All in all, the inbuilt media player is a complete loada crap for videos; it distorts aspect ratio.

Pioneer DV-610AV dvd players supported video encoding/format.

Pioneer DV-610AV dvd players support xvid/divx/mpeg4 in avi container with mp3 audio. It can stand a max resolution of 700x700.

Winff presets and ffmpeg command line parms on demand.

Friday, February 10, 2012

CX 55 review.

If you believe the online reviews, this earphone has a fantastic base, good noise isolation and is great value for money.

Considering the price, there's no way Sennheiser will bribe the reviewers, specially looking at the number of people liking it.

So this earphone should be ----------good-----------.

BUT that one that I got was worst than the cheapest ones I'd ever own. There was practically no bass, but noise isolation was good (better than CX 200).

I doubt that one that I got was is not genuine, this may be the reason.

After a few months of use that earphone died (one side). Considering what happened to my CX 200, I'll never buy a Sennheiser again.

Monday, February 6, 2012

Active vs passive TVs.

I'm writing here to share my personal experience with both these technologies; although there are a lot of scientific claim and tests stating that passive is a lot better than active, I'm sharing my personal experience.

To explicitly state, active polarized technology is a complete loada crap; Samsung lies when they claim active is better than passive and the reality is dead opposite to what Samsung claims, Samsung is lying.

Passive has --

1) ~4 times brighter than active.
2) glasses that cost less than 1/200 th of active
3) No health hazard -- active communicates to the TV wireless in high frequency which's bad for health (chances of brain, blood cancer, brain hemorrhage increases by 2 times), remember mobile hazard? It's the same thing.
4) Is a bit cheaper than active
5) Comfortable glasses whcih's a lot easier to wear light
5.5) Verity of frames available with polarized glasses.
6) Flicker-free -- Active is unusable cause of this reason.
7) Free from vendor's monopoly; you don't have to buy the additional pair of glasses specifically from this vendor. The vendor may hike prices a few months after you buy the 3d TV forcing you to pay at times.
8) No risk of discontinued glasses. In active, there's always a risk, you're at the vendor's mercy.

So, all in all, all the 'advanced' expensive 3d technology is like a lead acid battery with golden anode and silver cathode with lead coating on it; it's expensive yet useless.

Anyone buying a passive TV or even monitor appears to be a complete idiot and has too much money to spare.

Wednesday, February 1, 2012

Nokia N72 video encoding.

Nokia has only a history of good phones but no future.

The mighty N72 plays quiet a large no. of resolutions for it's screen resolution. It supports mpeg4 with flac audio in 3gp container.

It supports flac? Surprising? I though Nokia hated software-for-non-profit with the exception of QT of course.

I'll place the ffmpeg parameters on demand, I'll even make the winff presets for N72 for you if you ask and update this post.

Samsung Guru 35, Samsung metro 3530 supported video formats.

Like with most other mobile devices, these 2 phones supports MPEG-4 Part 2 streams (xvid vtag) with aac audio in mp4 container.

Guru's screen resolution is 128x160 and it easily plays videos around this resolution.

Samsung Metro's screen size is somewhere like 320x240 or 220 I guess (in a flipped state) but it's incapable of playing videos in this resolution.

It can play videos with maximum resolution at 320x200, otherwise it simply refuses to play. Also there's a limit to the video bitrate this device can process.

I'll place the ffmpeg parameters on demand, I'll even make the winff presets for metro 3530 and Guru 35 for you if you ask and update this post.

JXD 661 video formats.

This device plays MPEG-4 Part 2 streams (xvid vtag) with mp3 in an avi container.

Limit the resolution to 320x240, otherwise the audio/video will be out of sync.


I'll place the ffmpeg parameters on demand, I'll even make the winff presets for JXD 661 for you if you ask and update this post.

Friday, January 27, 2012

KDE volume resets (pulseaudio)?

Recently I'd face a problem with KDE + pulseaudio. On reboot, the volume would reset every time to maximum and the headphone volume reduced, it had to be set every time using pavucontrol or alsamixer.

The solution to this was to set the output to analog headphone or analog speakers (flipping the current output) in system settings > Multimedia > phonon > Devices

Tuesday, January 17, 2012

Benefits of piracy


The law and companies openly claim that piracy does no good; the opinion of the companies is bound to be obvious since they're concerned about sales; this's similar to a politician saying the other party is bad and they are good.
However I've a different approach to this.
The no. 1 beneficial of piracy is the end user; it's tempting to download something which has a market price of $200 (or even $4000) for free by just paying for your Internet connection.

This's beneficial in another way to the end users – the companies wont hike up prices like crazy, cause if they did people wouldn't simply buy their product, bankrupting the company. This works specially well with monopolies like Microsoft and Adobe, otherwise your copy of Windows would start at $500 forcing you to pay it if you wanna use a computer, maybe people had to pay in installments cause of this.

Piracy controls the prices of these software to be reasonable; and if it is, people will not even download pirated instead buy software/movie/album; there's a critical price at which the profit will be maximum. Every businessman knows that.

Equalize distribution of finance – If piracy stops, the rich will get richer; people will be forced to pay for their movies and software breaking the distribution of the economy. Economy is good when everyone has money instead of all money being at one hand; this makes a more of a 1 man rule instead of democracy. Thus stopping piracy completely is bound to do harm.

Following the above stated facts of increased rates of multimedia/software, it'll make the conditions still worst since the price will also be a lot higher which means more profits.

Next comes ISP – they're rather silent on this cause they know it's not good, but good for them. More downloading means more work for ISP, and more profits. Clear and simple.

The pirates – Traffic to a website with ads generates revenues, that's why there're so many websites offering pirated content.

crackers – You know Windows infection. Pirated stuff and websites is one of the best sources of these. Then with compromised Windows systems comes spam > fraud and stolen private content. I believe, in Bittorrent networks, crackers attack Windows computers to compromise them.

Antivirus companies – If the world didn't have piracy of any kind the probability of you having infection (though a pendrive, or the Internet) will be very less; thus less work for antivirus companies and less profit. On the other hand, it's a bad idea to download pirated antivirus software cause it might be infected and with the level of access the infected antivirus software has in your system, your PC can turn into a bot and you can turn to another Windows victim.

Software companies – This might be hard to believe, but if a software comes free of cost a lot of people are willing to adopt it making a monopoly of the software, transforming it into a de-facto standard simply cause everyone can afford it. This's popular is countries with poor cyber laws or bad enforcement of the same. If piracy wouldn't have been there, Windows and Adobe wouldn't have a monopoly in Asia, Africa, South America, and some countries of Europe (I'm not sure about EU) cause people couldn't afford these software; they are less willing to 'buy' a software, instead they would've simply used free alternatives even if they were less in features (like Gimp, Blender instead of Autodesk or Adobe products). Thus, even though Microsoft and Adobe claim they wanna kill piracy, they also know doing so will take away their monopoly, and if this monopoly breaks in one country, it'll break worldwide. This's the last thing MS wants – they solely rely on their monopoly for revenues, otherwise there's no reason to buy any rubbish MS product.
Also, as I've stated before in this Blog, propriety software is bound to always do harm to the masses in the long run. Similarly, software companies too claim that piracy harms people in the long run but they ignore the fact that they are themselves doing harm to the world by 'selling' their propriety software. So software companies are loudmouth on piracy and silent when it comes to dealing with disadvantage of selling their monopolistic software. I smell politics here.

Ground truth is, most companies want money and they'll do anything to get it, they're least concerned about people and lie to the public that piracy is bad for everyone not cause they care about people, but care only about money. Here I'm writing how it's not.

Helping the poor – Although poor people do not deserve too much entertainment, but what's the use depriving the same when you know they can't/won't buy it?

The concept lies by the fact that, if you know that your multimedia/software will never be bought by Alex, why not give it to um for free? There's no harm to the vendor/producer and no harm and benefit to the end user (since the end user won't give you a buck for it till the infinitely of time – nothing can be gained form um).

Search engines – No piracy means less things to search on the Internet, which also means less use of search engines. That's why Google is silent on this, and if they do apply preventive measures, it's usage will downgrade exponentially like the case with Bing, Yahoo. There're plenty of search engines to search the same content in.

File hosting businesses – Want to download your free movie faster? Join today!! Although a report abuse might remove the video within a few days, but a lot of stuff goes unnoticed, so you 'joining in' will still reap benefits off their database of pirated stuff.

It's unnecessarily to mention that a lot of revenues of the likes of rapidshare, 4shared etc... comes from piracy.

So what should be done?

The current state should remain the same.

Piracy shouldn't persist in real life – it's easy to get that cop after that pirate and teach um a lesson; this's done in most developed nations.

Now, the question lies what can be done online?

Many governments like that of the US of A will even go forward to crush people's fundamental rights to make Hollywood richer (or maybe with the intention of extracting more tax from them, no one else benefits); this method is similar to China's – a communist nation which uses the same tactics to crush rebels instead of piracy.

If countries adopt for it, they won't be letting access to sites hosting pirated stuff; so what will be the difference remaining between this country and China? China prevents people from outside it to gather information and form a thinking to rebel again the government – this's a solid reason to restrict access to information which would otherwise be a thread to the government as a whole; but doing the same just to make the likes of Madonna, James Cameron, Spielberg and Clooney to become richer from what they already are seems like an excuse.

What guarantee do you take that instead of blocking just piracy sites, they start blocking anti-government sites too? If they do, how will you know?

Blocking any kind of information from entering a country could be one of the reasons for a country to be taken over by a dictator, seeing this threat, it's sheer stupidity to do such a thing to make the rich Hollywood richer.

On the other hand if the producer is intelligent and better than one of those management/finance guys, he can seal his IP from piracy if he ponders a bit harder to understand what I mean.

Sunday, January 15, 2012

SBS/polarized/stereo 3d to alaglyph/red, blue 3d

If you have a SBS (side by side)/polarized/3d video, and you want to get the 3d effect without owning a 3d monitory (capable of producing polarized light), you can do so with the classic red-blue anaglyph 3d glasses; but first you have to convert the video to red/blue 3d format. You can use ffmpeg to do so.

ffmpeg has the capability to use mplayer/mencoder filter with -

ffmpeg -vf mp=[the mplayer filter]

The stereo3d filter of mplayer does the trick here, it converts sbs to anaglyph 3d, and I have to say conversion is good!

e.g. -

ffmpeg -i sbs.mp4 -vf mp=stereo3d -acodec copy -threads 10 -b:v 10000k -preset ultrafast -vcodec libx264 ~/test2.mkv

You can also use mplayer to play the SBS video by converting it to anaglyph in real time using the same video filter -


mplayer -vf stereo3d -vo gl_nosw/gl/gl2

The video driver has to be some form of gl for this to work. If you want to use xv, use the scale filter also -

mplayer -vf stereo3d,scale -vo xv

To get this working in smplayer, in the advanced options > options for mplayer > video filters

add -

stereo3d

to the filter chain.

Also you need to change the video output driver to gl/gl2 etc... if you're not adding the scale filter.

You need the latest mplayer for conversion to be fast. If it still doesn't work, you may try out mplayer2.

Monday, January 2, 2012

L420 on Debian Squeeze.

Even if you have all the firmware installed, things wont work out of the box.

You have to install linux-2.6.39 and xserver-xorg-video-intel from the backports to get the right resolution.

For the wireless, you have to install firmware-realtek from the backports. Even after that the wireless LED won't work, but the wireless does work.


Bluetooth works out of the box.

Wednesday, December 21, 2011

Tech mags get bribed by MS for Windows Phone (Nokia Lumia)?

There're no mags or tech news websites which point out to major issues in WP7; they just point out trivial ones.

With an intention to enforce monopoly by anti-competitive practices on both phones and desktops, WP doesnt support the following -

SD cards -- Only in a few Windows phones SD cards are installable, that too internally. Once you install it it becomes an internal part of the phone... i.e you cant use it in any other device -- you'll be forced to used this specific card on your WP like your're forced to use Windows to run Windows programs.

PC interconnect -- It'll only work on Mac and Windows; otherwise you can't do anything through your PC (this includes transferring files and media), also, the Mac version ain't good as the Windows one. The protocols are hidden and follow no standards by only Microsoft standards -- yet another reason to continue using Microsoft products (not cause they're good, but cause you're forced to use it).
Thus you're forced to use a MS software everywhere you use WP -- you have to be dependent on the company for even the simplest tasks in WP.

No bluetooth --  It doesn't support file transfers over bluetooth, cutting the phone off to all non-Microsoft PCs. Double the monopoly, double the monopoly and Bill Gates comes back on top again.

One magazine being a typical MS fanboy since the beginning of time is Chip which's mostly available in Europe and Asia.

Others include techradar.com

As a result, regardless of the reviews, the sales are horrible and people are already trying to sell the phones -- in a period of a week or month.

This proves how Microsoft bribes the press and people around the world to enforce use of it's horrible products which downgrades the the software industry worldwide and bring it to Mr. Gate's feet.

Friday, December 2, 2011

smplayer with mplayer2 (no video?)

Apart form changing the binary location, there is a workaround for this bug, in custom mplayer options set -

-vid -1

And everything should work well.

Thursday, November 17, 2011

Debian/Ubuntu markauto cleanup script.


The Debian installer has a bad habit of marking packages 80% of packages as manually installed which causes a horrible dependency issue.

The script below lists packages which if marked automatically installed wont be removed. This also prevents listing of packages which are having important priority.


#! /bin/bash



# Script to print packages which if marked as installed automatically will not be removed (cause its it's a dependency of another manually installed package)

# This may give wrong output in circular dependencies, cause -

# aptitude why A -- B depends/recommends A

# aptitude why B -- A depends/recommends B

# this means both A and B will be included.

# in this case, one or both of them will have to be manually installed

list="$(aptitude search '~i' | grep --invert-match '..A' | cut -d ' ' -f4)"

# function to cut first line in variable list.

cut_first() {

 list="$(echo "$list" | tail -n +2)"

}

while [[ "$list" != "" ]]

do

 process="$(echo "$list" | head -1)"

 aptitude why $process | grep --ignore-case --regexp="recommends" --regexp="depends" &> /dev/null

 if [[ $? == 0 && "$(aptitude show "$process" | grep --ignore-case --regexp="Priority: required" --regexp="Priority: Important")" == "" ]]

 then

  echo "$process"

 fi

 cut_first

done



Before you use -- I warn, check if the package list is correct, to confirm, all packages if marked auto should not remove any packages as vacant dependencies.

After this you can have a clean system where you can check if the manually installed packages are ok or not.

Tuesday, November 15, 2011

ffmpeg -- maintain aspect ratio with fixed height/width.

I found this in the ffmpeg man pages; 99% users thing this's not possible, but it is possible without   calculating aspect ratio in mind.

Use the scale filter before specifying the input file -

-vf scale=www:www/a

Where 'www' is the desired width of the video you want. To maintain the height - 

-vf scale=hhh*a:hhh

Where hhh is the desired height you want.

Friday, November 11, 2011

Openoffice/libreoffice template pack.

Recently I'd downloaded all templates from templates.services.openoffice.org, so I decided to share all of them -- 


http://www.4shared.com/file/5DJTQ488/templates.html 


 Extract the file, you'll find 4 more archives with names to that of openoffice/libreoffice applications, extract them too to get the templates for the respective applications. 


 You may install the usual way using the templates organizer dialog, as an alternative you may place the extracted folders to ~/.libreoffice/3/user/template, the folders will act as categories of the templates (i.e. in the organize folder dialog, you'll see these folders and inside them will lie the templates). 


 Notice, these are a lot of templates, so opening the templates list in openoffice/libreoffice might take a long time.

Sunday, November 6, 2011

Gentoo splashscreen howto (with/without KMS)

To see a splash screen as you open Gentoo, you need something called the 'frame buffer'...this is basically a driver which has the ability to display video from the text-only console. This's usually generic and not accelerated, i.e. does not take up the unique features of the graphic chip, although we do have a bit of acceleration or device dependent framebuffers.

Framebuffers are involved in making of the console (or Ttys), since Fbs also have a resolution and you can even set the resolution, consoles too have a resolution which can be set by passing kernel parameters. The parameters dependents on the FB driver.

Different framebuffer -- Vesa, Userspace-vesa (generic Fbs), radeonfb, radeondrmfb, inteldrmfb etc....

So first you need to compile your kernel with support of some FBs.
If you're using KMS, you don't need to mark any framebuffer, KMS provides it's own framebuffer. Once the DRM modules load, a FB is provided. If you have compiled the kernel with other Fbs, it'll replace the FB with it's own. This KMS FB is hardware specific and fast. You cant use both KMS FB and other FBs -- only 1 will work.

The mandatory sections to be selected in kernel are -

CONFIG_FB (in Device drivers>graphs support). In that, select -

CONFIG_FIRMWARE_EDID (Support for frame buffer devices>Enable firmware EDID)

you can select which frame buffer support you will compile in -

*** Frame buffer hardware drivers ***

(not required if you're a KMS user)

If you wanna use vesafb, mark it.

In “Console display driver support” which is in Graphs support -

Support for the Framebuffer Console Decorations (CONFIG_FB_CON_DECOR) -- this option wont be available until you apply the fbcondecor patch or install gentoo-sources. Get it from -


Apart from these, select

VGA text console (CONFIG_VGA_CONSOLE)

CONFIG_VGA_CONSOLE (Framebuffer Console support)

Map the console to the primary display 
(CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY)

Disable “Enable Tile Blitting Support” (CONFIG_FB_TILEBLITTING)

Which is in Support for frame buffer devices.

Compile and install the kernel.

Now emerge splashutils with fbcondecor, png and truetype USE flags enabled.

Splashutils is a cross distro method to implement splash screen, but it requires an init script but only if you want userspace splash, thus this needs to be made for every fundamental distro.

Splashutils requires some kind of framebuffer to be present to work -- any will work, it has the ability to start from the initrd.

Splashutils themes are set in 2 options, one verbose where you will get some sorta decoration with the output messages (a decorated console), and the other silent...windows and Ubuntu style.

Splashutils can start from 2 modes -- one initrd, where it start right from the beginning and the other from userspace, i.e. it start after init has started. Thus an initrd is completely optional but you don't get early bootsplash.

This packages give you 2 main applications -

splash_geninitramfs and splash_manager

There are various themes available in portage -

media-gfx/splash-themes-gentoo, media-gfx/splash-themes-livecd and media-gfx/bootsplash-themes

All themes will be placed in /etc/splash...with their names same as the folders in this directory. Each theme supports different resolutions, most common being 1024x768.

You have to append the following lines in the kernel parameters to configure the FB you intend to use and also define which mode will the splash screen work on, silent or verbose. Apart from this, you also have to define what theme to use (optional for userspace splashscreen).

video= splash=,theme: console=tty1

Out of this, only splash= option is necessary even if you're using the splashscreen that starts after init. Otherwise if the splash start from init, everything is necessary.

Depending on what FB drivers you use, you will have to modify the video= option, I.e apart from specifying the video driver, you have to specific options for the FB driver. From here you can set the resolution of the FB console too.

With vesafb, you have to specify the resolution with various options. These are the defaults and safe -

video=vesafb:mtrr:3,ywrap vga=

The options for vga are (numbers of 3 digits) -

320
×
200
640
×
400
640
×
480
800
×
500
800
×
600
896
×
672
1,024
×
640
1,024
×
768
1,152
×
720
1,280
×
1,024
1,400
×
1,050
1,440
×
900
1,600
×
1,200
1,900
×
1,200
16 colors




770


772

774




256 colors

768
769
879
771
815
874
773
869
775
835
864
796
893
15-bit (5:5:5)
781
801
784
880
787
816
875
790
870
793

865
797

16-bit (5:6:5)
782
802
785
881
788
817
876
791
871
794
837
866
798

24-bit (8:8:8)
783
803
786
882
789
818
877
792
872
795
838
867
799

32-bit (8:8:8)1

804
809
883
814
819
878
824
873
829

868
834

As copied over from wiki.
 
If the number is wrong, the kernel will notify.

e.g. -

video=vesafb:mtrr:3,ywrap vga=795 splash=silent,theme:Cynapses console=tty1

With KMS FB, you have to specify only the resolution with option refresh rate as such -


Where -24 is the refresh rate.

or simply video=1280x1024

The console= option should be set to tty1 (when using initrd based splash) otherwise you will not be able to see the splash.

To preview a theme -

splash_manager --theme=one of the themes in /etc/splash --cmd=set --tty=.

Notice, for the theme to work, the console should be at the right resolution.

This program (splash_manager) revolves around a command -- the command is the task that need to be done, either display, set, demo etc.... themes. To specify the command, do it with the --cmd= option.

The command 'list' displays all the splashes available with resolutions. 'set' displays the decoration of the console and 'demo' will give a demo of the boot screen.

After you have decided what theme you'll use, you have to generate the initial ram image; if you're using initrd based splash, this's not required.

splash_geninitramfs --res --generate .

The --verbose option is useful for debugging.

Each theme supports different resolutions. The resolutions are in the directory /etc/splash/. You can also check it out using the --cmd=list command of splash_manager (as stated before).

If you want to copy the theme to an existing image -

splash_geninitramfs --res 1600x1800 --copy

If you already have a theme in the initial ram image archive, you might just like to append the new theme -

splash_geninitramfs --res 1600x1800 --append

Now you can see the reason behind the theme: kernel parameter, this specifies what splash to use during boot of the multiple available in the kernel.

Also notice, for initrd based splash to work, all the correct kernel modules which're required to make the framebuffer should be built into the kernel or should be there in the initramfs. Also the resolution should be perfect from start.

Userspace splash -

For userspace splash you have to start the service fbcondecor, for automatic startups, add it to the boot or sysinit runlevel. You don't need to do this for init based splash... neither you have to configure the service configurations.

The configuration of this service is done from the conf.d directory and the fbcondecor file. Read the comments in it to configure. The splash style (verbose or silent) is read from the kernel's parameters.

Apart from this, you have to see the file /etc/conf.d/splash for further configuration and the theme you wanna load. It's configuration is mandatory.

Wednesday, November 2, 2011

Huawei EC1260 (12d1:140b) (reliance, tata, MTS etc...) on Linux.

This modem works out of the box. Just ensure to have the usb_modeswitch package installed. lspci output - 


Bus 002 Device 003: ID 12d1:140b Huawei Technologies Co., Ltd. EC1260 Wireless Data Modem HSD USB Card



First you need to install usb-modeswitch, then plug in the modem (or replug the modem), then run (as root) -


wvdialconf



You'll now have a file name /etc/wvdial.conf, edit this as root, enter your username, password (usually anything will work), then the number to be dialed (usually *99# or #777). Uncomment these lines also. In an MTS connection, password is #777, username is internet@internet.mtsindia.in and you gotta dial #777. Here's the wvdial.conf for MTS - 



[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone = #777
ISDN = 0
Username = internet@internet.mtsindia.in
Init1 = ATZ
Password = mts
Modem = /dev/ttyUSB0
Baud = 57600



Next run wvdial command, and things should work fine.


As tricks -- in wvdial.conf, increase the BAUD rate to 57600, higher value also works. In case you're using gnome-ppp as the front end, set the modem type to USB modem otherwise you might see lower speeds; I don't know why this happens, although it shouldn't.

Saturday, October 29, 2011

sysctl parameter reset

Every wondered why does you custom kernel parameters in /etc/sysctl.conf doesn't get set on startup even after you add sysctl -p on boot scripts?


The reason might be kdm. It happens that when a user logs in using KDM, it resets the kernel parameters to default, making the init scripts's parameter settings to non existent.


I've reported a bug on this, as an alternative you can set the kernel parameters after you've logged in by setting a timer in the start up script - 


sleep 40; sysctl -p


A better idea will be automatic login; for security, you might configure kdm to lock screen after log in (this can be found in system settings > login screen).

Thursday, October 27, 2011

Linux and CD/DVD burning.

Well, I'm disappointed. Agreed that CD/DVDs or any kind of optical media is a dying game, but it's also critical for professional/home media production.


We do have a lot of multimedia tools which work well, but what we don't have is a good CD/DVD burner, when it co
mes to graphical burners, things boil down to - 
K3b -- the most preferred and the only one.
xfburn -- the second choice, if k3b doesn't work.
Brasero -- Most unreliable and most buggy.
xcdroast -- seriously, I never got this to work
Nero


The backends of all the apps except Nero boils down to - 


cdrkit/cdrtools
libburn/cdrskin


Everything else is deprecated.


I have someone who has the work of converting very old cassette and LPs to ACDs (i.e. he has to burn the recorded tracks to CDs).


A few months ago Nero stopped working after an upgrade, ironically it could not add audio files (wav) to make ACD, everything else worked fine. 
So it was rejected and the fallback was k3b, which a few months later (again after an upgrade) hit a bug where adding audio tracks randomly causes segmentation fault, this is a still a Debian bug.
Next fallback was xfburn -- but it didn't add any gap between tracks of the burnt disk.


Finally Brasero -- the most unreliable (don't ask why) came to the rescue, it did not segfault and was capable to adding gaps between tracks but I think this'll also end up in bugs some day or the other.


Not to mention, I had spend days to figure out the issue with CD/DVD burning on Linux a year ago and fixing strange problem with various hardware, specially pioneer drives and external devices (popular now). Things complicate more with fabulous cdrkit bugs and the dramatic cdrkit-cdrtools clash -- a licence issue, something which no one except Debian devs care about. The ultimate solution that I see is libburn and it's client cdrskin -- they never gave any problem on any hardware.


But cdrskin waits for k3b to add support, till this we only have xfburn. :(

Sunday, October 23, 2011

LP120 on Linux

Audio technica LP120's USB interface is basically a USB audio controller integrated inside the player and it's compatible with Linux, you need to do nothing specific in a Linux distro to configure the card, drivers are build into Linux.


Just configure it through pulseaudio GUI to make it work.