Sunday, March 17, 2013

Fix for Insignia portable HD radio

If you have a NS-HD01 04.00.14 or NS-HD01A with no sound, you may send the radio to me for repair:

My two radios have been working daily, 7/24, without a problem since I fixed them last November.

Other NS-HD01 versions are not fixable and the NS-HD02 garbage does not worth of any work. More details here.

Friday, March 1, 2013

Web browsers and laptop battery

My Thinkpad X220 comes with a whopping 9-cell 93Wh battery, it is supposedly to go for more than 10 hours but I had been getting only about 7. I had to start an investigation to find out what were using so much more power. One of them is web browser, mainly due to too high timer resolution.

According to Microsoft: if the timer resolution is increased, processor power management technologies may not be effective and can cause up to 25% more power consumption. Who increases TR?

Flash, surprise? the thing I hated, very much, since the very first day of its appearance.

When a browser is playing a flash content such as Youtube, TR is locked to 1 ms. After playing, Flash releases the TR lock, but some browsers, FireFox and Chrome, do not set the TR back to 15.6 ms until you close entirely these browsers. There is no cure for Chrome, but you can easily patch FF 4 and 5.

Open the xul.dll (found in FF installation folder, usually C:\Program File (x86)\Mozilla Firefox) in a hex editor such as Hex Workshop, search for 0x538A5C240C568B74240C3A5E2C741784DB6A01, and change the last byte from 01 to 10.

Obviously I can no longer use Chrome and now I use Opera 12 instead.

Of course, nobody should allow a browser to play flash automatically. For Opera, simply check "Enable plug-ins only on demand". For FF 4 and 5, rename the userContent-example.css file to userContent.css and add the following lines:

{ -moz-binding: url(""); }

BTW, you may also want to add the following lines to prevent scrolling marquee and blinking text:

marquee { overflow:visible; display:block; height:auto ! important; }

blink { text-decoration: none ! important; }

Like flash, they are both battery and eye unfriendly. Don't worry, you can still see the text, just no more scrolling and blinking. For Opera, you create a new file named as user.css, add these two lines and put it in the style folder under the Opera installation folder, usually C:\Program Files (x86)\Opera\styles.

Another thing that had been draining too much battery was the webcam. Once my X220 has been waken up from a sleep, this thing prevents the USB port from suspending. I disabled it in BIOS, because I never use it.

Note that browsers are not the only ones that change and lock TR to 1ms; so you should always close the programs that you do not use to save energy. In my case they are CyberLink PowerDirector 10 and DxO Optics Pro 8.

So, how do I know which hardware and software are using too much energy? Simple, just open a CMD Prompt and run "powercfg -energy" and don't touch your laptop. After 1 minute, open the energy-report.html and you'll see your problems.

One more little tip for Opera: open opera:config, search for chrome, change "Chrome Integration Drag Area" from 20 to 0. This will move the tabs up to the title bar like Google Chrome:

Now my X220 goes for 10 to 12 hours on WiFi browsing. Above findings and cures apply to any other laptops.

Abstract in Chinese

系统定时器的精度一般是15.6毫秒,但是一些浏览器比如FireFox和Chrome一旦打开Flash后,会把定时器的精度锁到1毫秒,导致多达25%的额外耗电,直到你把这些浏览器彻底关掉之后才会恢复。FF的补丁很简单,把xul.dll的一个字节改一下即可。Chrome目前没有解决办法,只能改用别的浏览器比如Opera。使用Opera之后,包括阻挡Flash、滚动和闪烁文字,另外在BIOS里关掉摄像头,我的Thinkpad X220的WiFi浏览时间由原来的7小时左右大大延长到10至12小时。