krish – 起死回生 [Wake up from death & return to life.]

February 26, 2013

Ubuntu 12.04 with AMD HD6810 Radeon

Filed under: GNU/Linux — krish @ 7:16 pm
Tags: , , , , , , , ,

I had been using the fglrx drivers with my AMD HD-6810 radeon card since I changed the OS (from default shipping Windows 7 to Ubuntu 12.04) on my HP dm1z 3014AU (now that’s about 2 yrs next month)

AMD command control center (amdcccle?) was controlling the settings and I had done some changes, it was all okay but when I ran my 1080 videos from ‘GoPro Hero2 Motorsports Edition’ .. they’d tear and lag (so did my 720p vlogs sometimes)

My laptop’s color temperature was quite different from my LED monitors (which I use for my game artwork), or even my tablet.
So the game would look a bit different in color saturation’s on my laptop.
Strangely, Ubuntu’s sysinfo for the driver showed VESA, but xorg.conf showed AMD and amdcccle was also able to make on the fly changes.
It was evident that I had both the drivers, and some apps were not looking at the right place (especially while reporting).

Anyway, out of hunch I decided to drop the fglrx drivers and use the radeon only (which wasnt so stable for the card/ubuntu version back then)..

Did this:

$ sudo apt-get remove –purge fglrx fglRx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx
$ sudo apt-get install –reinstall xserver-xorg-video-ati xserver-xorg-video-radeon
$ sudo reboot

 

My Laptop Screen right now :)

My Laptop Screen right now :)

And after reboot, the color temp is quite cooler (although my laptop fan runs a bit more now),  my vlog 720p videos play without tear,  Audio of my ‘Altec Lansing’ speakers doesnt ‘tear’ on high volume (surprise!)  and  Ubuntu sysinfo shows “Gallium 0.4 on AMD PALM”  which according to this (https://help.ubuntu.com/community/RadeonDriver) is the correct modesetting for HD6810 card :)

Let’s hope it works across VMs now :)

Have fun trying if you have the same/similar card (Disclaimer: I’m not responsible though :P )

 

November 24, 2011

Linux swapping even if RAM is available..

Filed under: GNU/Linux — krish @ 3:27 pm
Tags: , , , , ,

I noticed this after a very long time, on my laptop today…thought I’d just blog up what to do about it :)

krish@shenron:~$ free
total used free shared buffers cached
Mem: 5717368 1556752 4160616 0 32116 295768
-/+ buffers/cache: 1228868 4488500
Swap: 4296696 156708 4139988

So, that’s pretty much more than 2/3 rds of RAM available, but the swap is being used already.

This setting is controlled by ‘vm.swappiness’
krish@shenron:~$ sysctl -A | grep "vm.swappiness"
vm.swappiness = 60

or you could find the value in
krish@shenron:~$ cat /proc/sys/vm/swappiness
60

The default value is 60.
A value of 0 means “never use swap till RAM is available“ .
A value of 100 would mean “swap as soon as possible”.

Using 0 is bit hard on the machine :D , let’s use a value of 10
krish@shenron:~$ sudo sysctl -w vm.swappiness=10
[sudo] password for krish:
vm.swappiness = 10
.
krish@shenron:~$ sudo sysctl -A | grep "vm.swappiness"
vm.swappiness = 10

This value is not persistent on reboot unless you write it to /etc/sysctl.conf ;)

November 13, 2011

Bluetooth on HP dm1

Filed under: GNU/Linux — krish @ 3:23 am
Tags: , , , , , , , , , , , ,

So the left speaker on my hp dm1 gave up today and was putting out more ‘noise’ than any music.
I’m gonna call their service center tomorrow and see if they can do anything about it without asking me to take backup of my huge data or trying to install Windows on this machine.

Meanwhile, one more device not functioning properly didn’t feel nice (the other device is bluetooth).
I never got to use bluetooth on my laptop.
Pre-installed windows7 was removed in a jiffy from this machine and it ran Ubuntu 10.04 LTS since then.

At first, my Wi-fi had issues with Ubuntu, which I fixed and blogged here – http://srikrishnadas.wordpress.com/2011/04/06/wi-fi-on-hp-dm1/
Now, speakers screwed up.. which I can’t fix.

So, its 3:00 am and I’m pretty much supposed to be in bed-rest (been like that since last 5 days.. with temperature, asthma issues).. anyway let’s get to fixing this!

List my hardware
krish@shenron:~$ sudo hciconfig -a
hci0: Type: USB
BD Address: 88:9F:FA:AC:50:3E ACL MTU: 310:10 SCO MTU: 64:8
DOWN

Yikes! Something is wrong here. I think I must have tried to do some hack earlier on and left it mid-way.

Let’s fix that first.
krish@shenron:~$ dpkg -l | grep bluez
ii bluez 4.60-0ubuntu8 Bluetooth tools and daemons
ii bluez-alsa 4.60-0ubuntu8 Bluetooth audio support
ii bluez-gstreamer 4.60-0ubuntu8 Bluetooth GStreamer support
ii bluez-cups 4.60-0ubuntu8 Bluetooth printer driver for CUPS

Why do I need cups support package? I do not. Kicked out.
krish@shenron:~$ sudo apt-get purge bluez-cups
And now re-install stuff that matters
sudo apt-get install --reinstall bluez

Okay now, list hardware again:

krish@shenron:~$ sudo hciconfig -a
hci0: Type: USB
BD Address: 88:9F:FA:AC:50:3E ACL MTU: 310:10 SCO MTU: 64:8
DOWN
RX bytes:45505 acl:143 sco:0 events:183 errors:0
TX bytes:3971 acl:84 sco:0 commands:54 errors:0
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x59 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT

Looks better!

Start the applet
krish@shenron:~$ bluetooth-applet&

Cool, it came up on my panel. Clicked on it. Clicked “Turn On Bluetooth”
Picked up my phone, search for devices and Nothing!
Sigh! Didn’t work…

Now, some googling, reading some bugs on launchpad, some forums, some debian lists and figured out that the bluetooth device is categorized as Cambridge Silicon Radio devices (CSR).

Sweet, but this looks like a dead end…

Too tired. :) Will work this out tomorrow morning

Back on the box. It’s post noon now :)

Okay! Read a bit about bluetooth sniffing, a little on ralink AND found that the radio link on bluetooth stays OFF!
So someone had tried setting a PS value with bccmd. So let’s try:

krish@shenron:~$ sudo bccmd psset -s 0x0000 0x028c 0x0001

Ok, now kill and restart the applet

krish@shenron:~$ ps aux | grep bluetooth | grep -v grep | awk '{print $2}' | xargs kill; bluetooth-applet&
[1] 3539

Checking bluetooth again…
Doesn’t work. Crap!

Hmm, may be I’m not loading some module properly.
Let’s reboot and try…

Alright, after reboot start applet again if its not running already
krish@shenron:~$ sudo bluetooth-applet&

Turned ON Bluetooth. Aha! the applet shows active! Nice..

Check processes
krish@shenron:~$ ps aux | grep bluetooth | grep -v grep
root 792 0.0 0.0 0 0 ? S 15:24 0:00 [bluetooth]
root 1438 0.0 0.0 27428 2096 ? S<s 15:24 0:00 /usr/sbin/bluetoothd --udev
krish 2187 0.0 0.1 166708 8256 pts/0 S+ 15:37 0:00 bluetooth-applet

After a bit of thinking, I realized my mistake.
Last time I had killed bluetoothd process along with the applet.

OKAY! Now time to test…
Make your way through the applet options to Send and Receive files (I am not writing a how to on it :D )

Added New Device.

Receiving:

Sending:

You might want to change your “Friendly Name” to something really friendly.
It shows CSR by default. Remember why CSR? :)

Friendly Name - Bluetooth Preferences

I’ve changed it to match the name of my laptop. ( That’s right, all my devices have names )

Now the question remains – Will this stay after reboot?
I am yet to find out.
If it doesn’t, I think I know what has to be done.

Not rebooting the machine now though.. :) .. Time for some work :D

Oh BTW, did I mention that your Bluetooth will now “Turn ON” / “Turn OFF” with the same Wi-Fi HotKey!  :X

September 4, 2011

Stop MySQL from auto starting in Ubuntu

Filed under: GNU/Linux — krish @ 12:44 am
Tags: , , , , , ,

That’s right.

If you’ve tried using update-rc.d and sysv-rc-conf and STILL see mysql process starting up!

krish@shenron:~$ ls -ltr /etc/rc?.d | grep mysql
krish@shenron:~$ ps aux | grep mysql | grep -v grep
mysql     1172  0.0  1.1 177888 18996 ?        Ssl  Sep03   0:01 /usr/sbin/mysqld
krish@shenron:~$ WTF!!!

Here’s where it matters and how to stop mysql from auto starting:

krish@shenron:~$ grep -A3 "start on" /etc/init/mysql.conf
start on (net-device-up
          and local-filesystems
	  and runlevel [2345])
stop on runlevel [016]

Just comment out the 3 lines for “start on” to make it

krish@shenron:~$ grep -A3 "start on" /etc/init/mysql.conf
#start on (net-device-up
#          and local-filesystems
#          and runlevel [2345])
stop on runlevel [016]

Reboot and check:

krish@shenron:~$ sudo init 6

April 6, 2011

Wi-Fi on HP dm1

Filed under: GNU/Linux — krish @ 8:56 am
Tags: , , , , , , , ,

Alright guys, so I got the HP dm1(AMD Fusion) and cancelled the Lenovo Thinkpad x120e that was ordered in US, for many strong reasons that I’ll blog up later.

The HP dm1 comes with Ralink wi-fi card which most of the current Linux distros do not identify out of the box as of now / end up probing the wrong driver.

This is how to get your wi-fi up on the hp dm1
(as well as other new laptops with Ralink cards; just get the correct driver that matches your card )
Note: This was done on Ubuntu 10.04 – 64bit

1. Update your distro. 10.04 needed update to newer kernel 2.6.30 and headers for drivers to compile
krish@shenron:~$ sudo apt-get upgrade

2. Check the model of your ralink card (Mine shows 539x series which is a Wi-Fi, Bluetooth Combo)
krish@shenron:~$ sudo lspci | grep -i 'network'
02:00.0 Network controller: RaLink Device 539f

3. Go to ralink website http://www.ralinktech.com -> Sofware -> Linux and Download the driver that matches your card version.

4. Unzip the package
krish@shenron:~/Downloads$ unzip 2010_1217_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO.zip

5. Change configuration
krish@shenron:~/Downloads$ cd 2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/

krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux$ sed -i 's/HAS_ANTENNA_DIVERSITY_SUPPORT=n/HAS_ANTENNA_DIVERSITY_SUPPORT=y/' config.mk

krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux$ grep ANTENNA_DIVERSITY config.mk
HAS_ANTENNA_DIVERSITY_SUPPORT=y
ifeq ($(HAS_ANTENNA_DIVERSITY_SUPPORT),y)

6. Build
krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux$ cd ../../

krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO$ sudo make

7. Install if Step 6 was successful with no errors; else start fixing your config again :)
krish@shenron:~/Downloads/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO$ sudo make install

8. Make your correct card number to be probed ( Use your card model here, mine is rt5390sta )
krish@shenron:~$ sudo echo "rt5390sta" >> /etc/modules

9. Blacklist wrongly probed ralink drivers – Ubuntu 10.04 probed this bluetooth module
krish@shenron:~$ sudo echo "blacklist rt2800pci" >> /etc/modprobe.d/blacklist.conf

10. Reboot
krish@shenron:~$ sudo shutdown -r now "Yay!"

11. After the machine is up again, check for ra0 interface
krish@shenron:~$ sudo ifconfig ra0 | head -n2
[sudo] password for krish:
ra0 Link encap:Ethernet HWaddr 90:00:4e:1a:76:e6
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0

Wolah, you’re connected and free to move away from the computer table on to the couch for some lazy working style ;)

November 11, 2010

BSNL deserves a Standing Ovation

Filed under: GNU/Linux — krish @ 11:35 am
Tags: , , , , , , , , , , ,

Talk of the latest thing, BSNL’s 3G USB Modems come with deb package for Linux installation and it was just a one-click install and I was on 3G network.
We have all seen other providers of usb modems stumble, frown and sweat to even say that they could support it for Linux.

Looks like BSNL is really aware of the rapidly growing Linux users and has taken steps to ensure they aren’t missed out.

I was expecting to do at least an hour of hacking to get this to work …. thanks to BSNL and Teracom, it took just under a minute.

BSNL's 3G USB modem - deb package

They also had a section on their user manual for Ubuntu; with a small error :)

Section for Linux Users - Bsnl 3G USB modem Manual

You no longer need to run in circles around your Network Manager for setting up the BSNL’s Internet.. Welcome the Dock :)

Bsnl 3G Dock on Ubuntu Linux - Look ma! no Network Manager or Editing Conf Files :)

And finally the Reliability that counts!

Bsnl delivers promised Bandwidth!

While most of us know that interacting with BSNL’s Customer Service Center / Accounts is almost like interacting a with a redtaped Govt department, but how many of us have acknowledged the technological heights that BSNL has achieved?

Skipping any marketing terms here, for most end users – BSNL’s Broadband Internet service availability has been awesome ( yes, they take lot of time to give a new connection / shift a connection ) , but once you’re wired in… there is hardly a downtime due to technology.

They are also very reliable ( 2Mbps means atleast 1.9Mbps ), unlike other providers who fail to comply with 80% of promised bandwidth.

BSNL and Teracom, both deserve a Standing ovation from the Linux users :)

P.S: I happened to buy this card from probably the most well-mannered and customer pleasing employee of BSNL service desks at Customer Service Center – Lakdi-ka-Pool. I do not know the name, but will definitely update this blog the next time I visit the bsnl-csc.

Update: A.K Sinha, SDE-Mobile, Nagpur deserves a super claps here. My Data Card was not working after coming to Nagpur since 3 days. He solved it within 30 minutes. Super Awesome!

November 7, 2010

Nullmailer with Google Mail

Filed under: GNU/Linux — krish @ 10:19 pm

If anyone’s trying to use nullmailer to relay via gmail/Google enterprise email… STARTTLS isn’t supported yet!

Found out after spending more than an hour of trying to get it work.   – http://untroubled.org/nullmailer/TODO

September 16, 2010

Overclocking Phenom II X2 550

Filed under: GNU/Linux — krish @ 4:07 am
Tags: , , , , , ,

Alright, so we built our cloud testbed box with the sexy processor despite the whole world around us saying “Forget AMD, go for Intel”.

Here’s the configuration
Processor: AMD Phenom II X2 550 (darn, I did not find the black edition)
Motherboard: Gigabyte MA74GMT-S2
RAM: 4GB DDR3 (ripped off from a lenovo machine)
Harddisk: 500GB Seagate Barracudda 7200rpm

This was perfectly running stable @3.1Ghz until one day I noticed the OS boot time go drastically slow.
Lot of investigation on memory and cpu usage brought up that the CPU had defaulted to 800Mhz per core.
Over-clocking in the BIOS was just not helping (Tried till 3.8Ghz) ; the CPU would go back to 800Mhz once you exit the BIOS.

After experimenting virtually every setting in the BIOS for 3 days, including updating the BIOS to latest rev, I found that “AMD Cool and Quiet” setting had kicked in somehow !!!

Disabled “AMD Cool and Quiet” and set the CPU Clock to default speed and it finally is back running @3.1Ghz; Hurray!!!
I just hope I dont have to worry about the Temperature parameters :)

September 2, 2010

Ubuntu hangs on me :(

Filed under: GNU/Linux — krish @ 3:45 am
Tags: , , , , , , ,

Was an embarrassing situation when my laptop got hung amid a client call.
It was hung well over 20 minutes.. tried to kill VirtualBox in many ways. No Avail. It just took over the whole mem and cpu power…forced chromium to die.. as I watched helplessly over my console.

VirtualBox kills my CPU usage

Damn.. I miss Suse’s AppArmor, RedHat’s selinux and Mandriva’s MSec

Ubuntu needs something natively developed.

May 6, 2010

Moving to Lucid Lynx

Filed under: GNU/Linux — krish @ 12:48 pm

It’s official guys, Aspire (my lappie) is moving away from its long relationship with mandriva to lucid lynx.

The new ubuntu got installed yesterday and it is a feel of change..

Few changes to the apps and software that I use:

1. ext3 to ext4 ( oh yeah! )
2. Flock to Firefox
3. Evolution to Thunderbird
4. Pidgin to Empathy
5. Fb, twitter on browser tabs to desktop app Gwibber
6. Gimp to Inkscape ( vector graphics here I come )
7. KDE to GNOME ( /me hides ) :P

For those who know my loyalty towards Mandriva/KDE; there is nothing wrong with it…they still rock.
I’m just changing for a change :)

Next Page »

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: