Posts

My adventures with RedMi 1S

I got the RedMi 1S in first week of Nov'14. It's more than two months and I have come to love this device. Its a nice phone. It lets me do almost everything that I want done. The battery lasts one and a half day and its nice not to be hunting the charger every evening. The only issue I had was the RAM issue was making life a bit stuttery. So I went ahead and put the Mokee custom ROM on the phone. Performance wise the kitkat AOSP based ROM was totally knockout, light and also somewhat buggy. Some bugs I could tolerate but the audio playback bug made me flash the phone with Adria ROM. As the devs claim it's better than stock with better performance and more fluid. But after going through a fortnight with it, I haven't seen any difference with it. Its just like official ROM, although pre-rooted. And so I am sticking it since it seems to offer the best things that I can have hardware wise. So waiting for some decent stable custom ROM....

Sending a window to different display

Preparation (you do this only once) In your desktop install SSH server sudo apt-get install openssh-server From your laptop: ssh -X username@desktop_pc_ip In the terminal you get whatever you run will be on your desktop but displayed on your laptop. If you want to do the same while seated on your desktop (and send windows on your laptop) then go on. On your terminal you run echo $DISPLAY This will show you something like: localhost:10.0 From your desktop: Open a terminal and run DISPLAY=:10.0 firefox This should send a firefox window on your laptop but running on your desktop. Make sure the number you put (e.g. 10.0 ) is the same as in the echo result

Couple of quick 'diff' examples

For files list only: diff -qr Source1 Source2  > ~/diff_files Actual contents diff; Can be opened with Kompare: diff -Naur Source1 Source2 > ~/diff_contents

Adventures in Threading

Link to source So after stumbling for a while I managed to crack Qt's moveToThread(). Source at above link. Its has working code for big file copy in thread. We have only left one small problem, and that is if the function we are calling on thread start has any arguments to pass, then we won't be able to directly connect it to thread's started() signal. So in this case we should subclass thread and pass the arguments to the custom thread object and then inside it emit an appropriate signal to call the main class's function. It seems like such a complex way to do such a simple task like "run this function on a separate thread!" :D

Xiaomi Redmi 1S

So I was itching to get a new cell phone. My three year old Samsung was just not cutting it. And the temporary zte was too slow. So I needed a powerful and at the same time cheap phone. So after considering a no of smart phones I finally decided that what I'm trying to achieve is difficult and only a Chinese vendor can get me such a handset. Going for Micromax/Karbon/Xolo etc Indian vendors was out of the question because of service woes and poor hardware quality. E.g. I remember the Karbon S1 phone I bought for my sister. Back in 2013 it cost me INR 7.5k. Came with JellyBean and 1GB ram. But the phone had slightly faulty touchscreen. But I didn't want to face Karbonns poor service so I showed my sister how to work around to that. Thankfully the phone has not died and its been a year. Anyway, finally I decided to take a chance with Xiaomi. The price was right and the hardware quality of xiaomi's handsets has been great. So I registered for the flipkart sale and dutifull...

AMD Radeon official driver experience

For the Radeon 8330 GPU inside Lenovo g405 powered by AMD A4-5000 APU, I tried out the official driver on Ubuntu 14.04. The situation is somewhat obscure. The official driver listed on AMD support page doesn't support Ubuntu 14.04. So I had to drop it. There is one beta driver that supports Ubuntu 14.04 though. So I downloaded it and thought to try it. Took me some efforts to install it though, it just would not install in GUI Mode, problem shown as missing language packs. Anyway I went ahead with text mode install. After rebooting though, no desktop. Only background with mouse cursor. So I reverted to open source driver. Later I had another idea, so I went ahead and tried out the official driver available in jocky ( proprietary drivers) tool. And after installing that one, I did get a desktop, but the brightness handles were gone. After searching for a while and not finding anything anywhere, I again reverted to open source driver. Thankfully that one works okay with my brightness...

Script for maintaining brightness on Lenovo G405

I observed that the this AMD A4 powered laptop has two backlight classes names idepad and radeon-bl0. Pressing the brightness keys changes brightness values in idepad class while values in radeon-bl0 needs to be changed. So I wrote a script which will keep the two files in sync and help me get the brightness working. syncBrightness.sh #!/bin/bash # Script to sync brightness from sys/classes/idepad to /sys/classes/radeon-bl0 # Task: run in a loop executed every second,  modify radeon  brightness acccording to ideapad brightness # ideapad brightness from 1 to 16 in steps of 1; # Radeon brightness 1 to 255 in steps of 1; while [ 1 -eq 1 ] do IBRIGHTNESS=`cat /sys/class/backlight/ideapad/brightness` if [ $IBRIGHTNESS -le 1 ] then IBRIGHTNESS=1 fi echo "Ideapad Brightness: $IBRIGHTNESS" let RBRIGHTNESS=$IBRIGHTNESS*16-1 echo "Radeon Brightness to be set: $RBRIGHTNESS" echo $RBRIGHTNESS>/sys/class/backlight/radeon_bl0/brightness sleep 1 done