Posts

Showing posts from October, 2014

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

Enum to String and vice versa - Enum.Parse alternative for C++

Image
Original Article Link: http://www.codeproject.com/Articles/42035/Enum-to-String-and-Vice-Versa-in-C Update: Link to Source . Introduction   While adding Serialization support to my project, I realized that I would require some way to convert a string to an enumerator and vice versa. So I did a Google search for the same, and found a lot of information; different ways in which people implemented this functionality. However, all the solutions I found suffered from one or more of the following: No support for enumerators with non-contiguous values No support (not even partial support) for enumerators with duplicate values No support for existing enumerations (without modifying their source code) Requires one or more extra files per enumeration Requires source-code to be pre-processed (by a custom binary) before compilation Difficult to use or maintain Highly susceptible to typos Is platform/compiler specific (not portable) So (the rip-off that I am), I borrowed th

The death of my Laptop

Sometimes things are going as usual and all of a sudden something fails. And as it happens usually the failure is unanticipated. And then starts thee scrambling phase where you start looking for alternatives. And ways to overcome this loss. And maybe if you are like me, you start to analyse the failure and try to understand where you failed. So to start with, my laptop died last week. It was working fine and as it happens with all electronics, it just stopped. It wouldn't start. So I sent it to a nearby repair guy, who told me that the power circuit is dead. He will try replacing the burnt IC's. Few days later I rang him up for updates and he said that the main board is dead. The replacement IC's also burned up. And so my laptop was gone to death, since I don't think there's any way to get a replacement board since the system was four year old. Anyway, coming back to the analysis, I assumed that the system will continue to work. So I never made any plans for fail