Friday, April 06, 2012

Mouse Operation.

Logitech G9 repair:

When my Logitech G9 mouse started to "mis-click", I thought that it was time once again to replace a mouse. Again.
The problem presented itself as a rare double-click when a single-click was intended. But later, the frequency of these rare occasions went up and it had become a habit of the mouse to randomly double-click or even triple-click, and drag-and-drop operations could not be successfully completed half the time.

I did the sane thing first; that of sending in a warranty support request to Logitech. But while waiting for their response, I read up on this issue, which turned out to be more common among Logitech mice owners. The usual suspect when the clicks start mis-behaving was the micro-switch, or the "clicker", that interprets the clicks. This is also the component that produces the distinctive "click" sound when engaged.

More specifically, the minute, springy copper part of the micro-switch was the culprit. It appears that this copper clicker conducts current to convey a click, and once it starts losing some of its springiness, it does not make a continuous contact which results in multiple-clicks instead of a single-click. Ultimately, it may cease to detect or effect any clicks to that button.

So, the (DIY) solution then, was to open up the micro-switch, take-out the small copper piece, re-shape it to be more springy, re-jig it back into place and close the micro-switch. It was simple enough in theory but without experience in handling tiny, springy metallic parts without losing it or squishing it requires the right tools, steady hands and tons of patience.

Opening up the mouse was pretty easy. I spent about 15 minutes trying to open the small micro-switch though. Once open, getting out the copper part and re-shaping it was easy enough. The hard part was re-seating this newly bent copper part back into the micro-switch. I spent nearly an hour doing this. Every time I almost had it seated, it would either spring out of its position or just fall into the crevices of the mouse's circuit board.


I was clearly missing a special tool or technique to perform this simple and delicate task.
Fortunately, an article over at [Overclockers.com] had a simple but crucial advice on just this operation. Once done, my mouse clicks just as it should. Although now the click sound is a bit more muffled than it was before, I quite like the quite muted clicks. Now I am back to clicking-and-dragging like it's nobody's business.

Friday, March 02, 2012

AMD UVD and the mysterious underclocking

I have known for a few months now that the first core in my MSI ATi Radeon 5970 card under-clocks itself to 400MHz core and 900MHz memory after resuming from a hybrid sleep. The issue disappears once I restart the computer, but that defeats the advantages of hibernating/resuming.

Normally, I wouldn't have noticed this under-clocking issue but I run one instance-each of a Bitcoin mining and the first instance of the two always runs at a reduced MHashes per second (~130MH/s for core 1 vs ~250MH/s of core 2). I have put away the task of diagnosing the cause of this strange malady afflicting only one of the two cores of my video card to some time in the future.

Well, that future is now and here's how I resolved the issue (well, sort-of):

At first, I thought that I could force the clocks via the Catalyst Control Center's AMD Overdrive section. But even after manually setting the clocks to 750MHz core and 1050MHz memory, the first core's clock speeds were stuck at 400MHz Core and 900MHz memory, no matter if there was a game running or not. The second core accepted the new clocks just fine.
Not to be deterred, I installed Radeon BIOS Editor (RBE) and tried to set the core clocks in the BIOS of the video card directly. It was when I was going through RBE's information rich interface that I noticed that there were multiple clock speed modes (which I already know) and among them was the infamous 400MHz/900MHz combination. This mode was exclusively being used by a PowerPlay (ATi's power saving technology) state called "UVD", which, of course, is ATi's GPU accelerated video decoding technology.

The problem then was obvious, given that no video (DXVA or otherwise) was being viewed; the video card's driver, for whatever reason, thought that it needed to put one of the cores in video decoding mode (UVD)when coming out of hibernation.

Seeing how performing a computer reboot clears the issue, it was as if the driver was getting confused when the computer is resuming from hibernation and needed to be reset for it to put the video card in the correct mode. That's the equivalent of slapping someone awake when they are groggy and confused. So now my task was to find an application that will reset the video card mode whenever I wanted to.

I found such a functionality in the application AMD GPU Clock Tool. Though the main utility of the application is that of changing the clock speed of AMD GPUs, apparently, it also has some hidden functionality. And one such functionality is that of resetting the video card mode, which is what I wanted. To accomplish this, I just need to call the application with the "restore" flag/option.

"C:\Program Files (x86)\AMD GPU Clock Tool\AMDGPUClockTool.exe" -restore

Now, my video card clocks are back to what it should be for each mode. I just need to remember to click on the AGCT's shortcut icon once I resume my computer from hybrid sleep.
Until AMD fixes this issue in their future driver release, I have to resort to this manual method of patching-up the issue.
Hope this post helps someone looking for an answer to this issue.


For reference, here are the clocks for a stock ATi Radeon card:
Idle (2d low) Clocks:
GPU: 157MHz
RAM: 300MHz

2d Medium Clocks:
GPU: 550MHz
RAM: 1000MHz

3d Clocks (High):
GPU: 725MHz
RAM: 1000MHz

UVD mode:
GPU: 400MHz
RAM: 900MHz


And finally, the RBE interface that helped me heaps:


Friday, December 23, 2011

White Samsung Galaxy S2

White Samsung Galaxy S2 by MyXP
White Samsung Galaxy S2, a photo by MyXP on Flickr.

Via Flickr:
My second mobile phone ever next to my first mobile phone ever (Motorola Rokr E6).
Adios, my long time amigo. I'll miss you and your little quirks.
Hello, SGS2.

Sunday, July 03, 2011

uTorrent stuck at 10kBps and with high cpu load

Struggled with a weird scenario today where uTorrent was consuming ~13%CPU and download speed appeared to be capped at 10 kBps. After eliminating the possibility of ISP throttling (Glasnost: Test if your ISP is shaping your traffic), a uTorrent bug (by updating to latest beta), Windows/driver bug (just by restarting Windows) and HDD corruption (rechecked HDD cables; ran CHKDSK /R), I was left with only one thing to try.

The torrent file itself. This was a massive torrent around 60GB in size (let's just say it's "Linux ISO images") but I have downloaded much larger files (a larger collection of said "images") so it did not make sense that it could be the culprit. Besides, the torrent had already downloaded a few gigabytes already. It's only when I restarted uTorrent and the program tried to Hash-check that it started exhibiting this strange behavior.
I tried deleting the torrent data and the torrent's PartFile (~uTorrentPartFile_*.dat) to no avail. Finally, I decided to remove the torrent and opened uTorrent. Success!

So the problem's gone now but I don't have the torrent. But it turned out to be OK because I found what I was looking for as separate torrents.

Epilogue:
Too many times, I encounter the same/similar situations but forget how I solved them. I end up performing the same diagnostic steps I performed during my previous encounter with the problem(with feelings of Deja Vu). This time however, with the help of this anecdotal blog post, I hope to avoid a similar fate the next time uTorrent exhibits these perplexing symptoms. Ciao.

Tuesday, June 28, 2011

What's It Made Of

I am currently preparing a requirements document for a new in-house web-based project. While looking at various similar websites I needed to know what technologies were being used to develop them.

My methods:
A server's Web Technology is anything from the OS, Web Server, App Server, CDN, etc to the Server's Scripting language, language Framework, CMS, Client-side technologies, etc.

Sometimes, all you need to find is which language the site is coded in. This can usually be decoded from the URL in the address bar (.php, .aspx, .py). But this method becomes harder when the site uses "Clean URLs" or "SEO-friendly" URL scheme which emit webpage addresses without filename extensions or even without filenames. Even here, sometimes, it's possible to look in the anchor tags and form tags to get the "actual" URL with the file extension.

If you need to know the CMS used, you will automatically also find out the language used for the site. For example, if the site uses Wordpress as the CMS, you can be assured that the site is in PHP. Knowing each CMS' naming conventions for variables, files, etc can help here. Actually finding the CMS used in the site can be as easy as looking at the webpage for the CMS's logo or checking the HEAD Meta tags to looking at the element naming conventions in the JS & CSS resource files (Wordpress names start with "wp-") or checking the comments in the HTML/CSS/JS code.

Finding the Framework used in a site can be tricky sometimes because frameworks are meant to be highly customizable and may not contain default code that can be used to identify them. Still, checking the HEAD Meta tags and code comments can be useful and is the first thing I always do.

Identifying the client technologies in use, is of course, trivial since you have the source code right there in your browser. Javascript frameworks like JQuery, MooTools, Yahoo YUI can all be identified easily by looking at the JS files.

Tools:
Some of the information listed above is anyway sent by most of the websites to your browser as HTTP Headers. There are extensions for all major browsers that allow you to see these headers. There are also web-based tools(Web-Sniffer) for this.
Of course, a website may opt not to send these information via the headers and we have to fallback to the old and tedious methods of getting these information.

Quite recently though, I have found an awesome tool that finds out all the information listed above, and more!
To someone like me who used to go through each site's code to get these information, builtwith is like a magical panacea. Another site that I like in similar vein is CMS Detector, which, in spite of its name, detects more than just the CMS used in a website.

In truth though, a website can ask sites like builtwith from displaying its information to the public. In which case, you are back to hacking through the spaghetti code jungle that is the website's code and come up with the answers the old fashioned way.

Monday, June 20, 2011

My first BTC!

My first BitCoin:

Mining this took almost a week. A BitCoin exchanges for about 17 USD as of this writing at Mt.Gox. Hopefully, it will clamber back to ~20USD soon.

Boring specifics:
Software: Phoenix (with Phoenix Rising UI)
Hardware: ATI 5970 GPU
Mining Pool: BTC Guild