॥ स्वक्ष ॥

To content | To menu | To search


Entries feed

2011 April 4 [Monday]

b0rked Broadcom bcm43xx drivers

Dear Broadcom, Despite your late gesture of opensourcing the bcm43xx wireless drivers, I continue to have issues -- Last week a kernel upgrade from lucid not only broke the driver but managed to kill the nvidia drivers for good measure -- it was easier to take a data backup and do a clean re-installation of Lucid than waste a lot of time figuring out how your bcm43xx driver broke the nvidia drivers killing my graphics display totally. 

However, I was mistaken about it being a kernel upgrade (to 2.6.35) issue as the peace lasted for hardly 3 days -- since I am blessed with having to start my monday morning troubleshooting your broken hardware drivers (on 2.6.32-21 generic kernel version) instead of getting actual work done.
lucid@ubuntu:~$ dpkg --list |grep b43
ii  b43-fwcutter             1:012-1build1          Utility for extracting Broadcom 43xx firmwar

lucid@ubuntu:~$ dpkg --list |grep bcmwl
ii  bcmwl-modaliases       Modaliases for the Broadcom 802.11 Linux STA

So the "b43-fwcutter" utility package exists on my system (as I had installed and activated the drivers) but something between each reboot was blocking the drivers as the link would suddenly be hard blocked. This despite me taking the trouble to NOT upgrade from the 2.6.32-21 generic kernel version.

Then, I checked the B43 blacklisted file:

lucid@ubuntu:~$ cat /etc/modprobe.d/* | egrep '8180|acx|at76|ath|b43|bcm|CX|eth|ipw|irmware|isl|lbtf|orinoco|ndiswrapper|NPE|p54|prism|rtl|rt2|rt3|rt6|rt7|witch|wl'
# which ath5k cannot recover. To prevent this condition, stop
blacklist ath_pci
blacklist eth1394
# replaced by p54pci
blacklist prism54
# replaced by b43 and ssb.
blacklist bcm43xx
blacklist uart6850
blacklist twl4030_wdt

and sure enough, "bcm43xx" was indeed on the blacklist.....nice, girdle up for more yakshaving!

Next, I paid a visit to the "blacklist.conf" file and commented out the line "blacklist bcm43xx".

Rebooted for it to take effect. Nada, Zilch, still no wifi.

lucid@ubuntu:/lib/firmware/b43$ ls
a0g0bsinitvals5.fw  a0g1bsinitvals13.fw  a0g1initvals5.fw     b0g0bsinitvals9.fw  lp0bsinitvals13.fw  lp0initvals14.fw    n0initvals11.fw  ucode14.fw
a0g0bsinitvals9.fw  a0g1bsinitvals5.fw   a0g1initvals9.fw     b0g0initvals13.fw   lp0bsinitvals14.fw  lp0initvals15.fw    pcm5.fw          ucode15.fw
a0g0initvals5.fw    a0g1bsinitvals9.fw   b0g0bsinitvals13.fw  b0g0initvals5.fw    lp0bsinitvals15.fw  n0absinitvals11.fw  ucode11.fw       ucode5.fw
a0g0initvals9.fw    a0g1initvals13.fw    b0g0bsinitvals5.fw   b0g0initvals9.fw    lp0initvals13.fw    n0bsinitvals11.fw   ucode13.fw       ucode9.fw

lucid@ubuntu:~$ cd /lib/firmware/brcm
bash: cd: /lib/firmware/brcm: No such file or directory

Then, a sudo ln -s bcm43xx-0-610-809-0.fw bcm43xx-0.fw and sudo ln -s bcm43xx_hdr-0-610-809-0.fw bcm43xx_hdr-0.fw should have loaded and activated the drivers after a reboot. It did not, forcing me to switch to a wired connection on a laptop. WTF!

Broadcom, fiddling with "bcm43xx" is a sure-fire way to kill time. Thankyou very much for the Yak-shaving experience --it serves as a constant reminder to me, why I will never (unknowingly) buy another Broadcom driven product in future, ever! KTHXBAI.

UPDATE:: Its a "networking disabled on boot" bug in Ubuntu-Lucid and Maverick that has a fix (but not yet committed for Maverick):
[0] http://ubuntuforums.org/showthread.php?t=1594577
[1] https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/524454
[2] https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx#Installing%20b43%20drivers
[3] http://www.qc4blog.com/?p=857

I've tried everything mentioned in the above threads to no avail. Wifi is out cold!

2010 December 17 [Friday]

Smartmontools load_cycle_count

Dear Lazyweb,

If you have installed "smartmontools" on your laptop on Ubuntu-Lucid, has it been behaving erratically after the last update about a week ago?

me@ubuntu:~$ sudo smartctl -s on -a /dev/sda 

smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Model Family:     Seagate Momentus 5400.3
Device Model:     ST9160821AS
Serial Number:    5MA1LL40
Firmware Version: 3.BHD
User Capacity:    160,041,885,696 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Fri Dec 17 11:09:46 2010 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

SMART Enabled.

SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.

General SMART Values:
Offline data collection status:  (0x82)    Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (  21)    The self-test routine was aborted by
                    the host.
Total time to complete Offline
data collection:          ( 426) seconds.
Offline data collection
capabilities:              (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    No Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003)    Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01)    Error logging supported.
                    No General Purpose Logging support.
Short self-test routine
recommended polling time:      (   2) minutes.
Extended self-test routine
recommended polling time:      (  88) minutes.
SCT capabilities:            (0x0001)    SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
  1 Raw_Read_Error_Rate     0x000f   105   096   006    Pre-fail  Always       -       9940165
  3 Spin_Up_Time            0x0002   099   098   000    Old_age   Always       -       0
  4 Start_Stop_Count        0x0033   098   098   020    Pre-fail  Always       -       2683
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   072   060   030    Pre-fail  Always       -       17255855270
  9 Power_On_Hours          0x0032   096   096   000    Old_age   Always       -       3998
 10 Spin_Retry_Count        0x0013   100   100   034    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0033   098   098   020    Pre-fail  Always       -       2155
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   049   035   045    Old_age   Always   In_the_past 51 (15 36 54 47)
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       1159
193 Load_Cycle_Count        0x0032   001   001   000    Old_age   Always       -       227684
194 Temperature_Celsius     0x0022   051   065   000    Old_age   Always       -       51 (0 18 0 0)
195 Hardware_ECC_Recovered  0x001a   078   060   000    Old_age   Always       -       64509422
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       1
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       1
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0000   100   253   000    Old_age   Offline      -       0
202 TA_Increase_Count       0x0032   100   253   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Aborted by host               50%      2943         -
# 2  Extended offline    Aborted by host               70%      2699         -

SMART Selective self-test log data structure revision number 1
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

As you can see here, there is no LCC for desktop server hard-disks and its especially meant for laptop HDD, where I'm interested in limiting the Load_Cycle_Count (LCC) to increment only with each boot cycle. Yeah, it has inherent risks, but...

193 Load_Cycle_Count        0x0032   001   001   000    Old_age   Always       -       227825

However, since (the lucid update) last week, running 'smartctl' has not worked its magic since the count has incremented from 227684 to 227825 within an hour. I've been randomly checking it every other hour or so to find the LCC racing away.

Is this a sign that the HDD is dying? Is this a hardware issue or has the code-base changed to require a rebuild? What am I missing here?

2010 July 17 [Saturday]

SoftwareHardware fails

Ever been in a situation where you are trying to solve one problem but have more hoops to jump than necessary!?
This rant has been building up this past week and it all started with bzr: ERROR: Unknown branch format: 'Bazaar Branch Format 7 (needs bzr 1.6)\n'

Seems that bzr has to be upgraded on hardy {--And now this? --after I had purged and re-installed bzr because the earlier installation was giving weird errors and I didnt want to waste time going off on a tangent. argh, I was wrong about wasting time with bugs!

I was suggested a PPA but for that was not an optimal path for me. Besides, here I was trying to pull a MM revision from LP, but instead have to build bzr and then work on MM..... ~fun.

Alan (thanks :)) suggested I edit the sources.list and add "deb http://ppa.launchpad.net/bzr/ppa/ubuntu hardy main" and then do an apt-get update, then apt-get upgrade which would upgrade bzr to the version in the ppa without all the compiling and building hoop jumping.

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

What a killjoy !!

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
The following packages will be upgraded:
Setting up bzr (2.1.2-1~bazaar2~hardy1) ...
removing incorrectly installed bash example /etc/bash_completion.d/bzr

Finally.... I upgraded bzr which allowed me to pull the branch: $ sudo bzr branch lp:mailman/2.1. An hour later.......gee, where was I now? The download was still 'in progress' and was'nt all this supposed to be incidental to testing Mailman...!? That was the night before. The next morning after yet-another-regular-unscheduled-power-outage, it was LaunchPad going down for an hour or so --some twit was DDOSing their server. What an incredibly productive activity!

LP returns and the development machine decides to die with a "/dev/sda1 error : fsck died with exit status 4". Now I knew this was my lucky day!!

Dug out a liveCD and ran 'fsck -f /dev/sda1' manually, where:

-f = force fsck even if filesystem seems clean
-cc = run badblocks check with a non-destructive test
-k = write new list of badblocks to current list
-p = automatically repair errors if possible without requiring human input
-v = verbose output

It found 5 inodes containing multiply claimed blocks and repaired it but for a while everything was in slow-motion --  I panicked about it taking ages to check a mere 40 gb of inodes and blocks. Colourless did the math on why it will take ages "just consider the sustained transfer rate of the drive which will probably be in the low 10s of mb/s. lets say you are getting 20mb/s second transfer, that is still going to be 2000 seconds to scan the disk, or 33 minutes".

Ah, talk of collective agida!

Earlier today fsck.ext1: No such file or directory while trying to open /dev/hda1. The superblock could not be read or does not describe a correct ext2 filesystem -- the hdd would not be detected and system refused to boot, refused to detect partitions. I spoke too soon earlier. It was super lucky saturday, not lucky friday!! This time the LiveCD was an arm's length away after last night's use and I checked out "fsck", "e2fsck" ...zilch, No response.

There is a good utility called TestDisk, which is available as a package for both debian and ubuntu -- sudo apt-get install testdisk, and you can run it from liveCD if your disk ever fails. It goes without saying that TestDisk will be useful only if your disk is detected by BIOS and hence alive.

Now, the worst I could think was "bad sectors==dead disk" but before that I had to check for loose wiring and then see if the BIOS detected the drive. The disk was spinning as I could hear the 'whrr' sound. Unplugged and re-plugged the wires a few times ...Nada...Bios would not detect the hdd. Convinced that it was the worst "bad sectors==dead disk", I shut everything down. A few hours later I switch it it on and voila the disk was detected and grub was soon asking which OS I wanted to boot into. That means it was just a loose connection (HOPEFULLY :)).

A BIG 'thanks' to ALL the folks who helped out with suggestions and listened to my kvetch. Much appreciated :)  If I'd ever have to calculate "productive time" sans all the idiocy around then its scary to note the amount of time that is wasted scheduling my day around a power outage, hardware issues and software bugs, and then there is this mundane thing called 'life'. I wish I had 10-days of silence instead.

2009 December 5 [Saturday]

LAN on Ubuntu

Thanks to Broadcom not supporting libre software, wifi with bcm43xx drivers used to be an issue ...see http://bcm43xx.berlios.de/ and http://linuxwireless.org/en/users/Drivers/b43. Earlier, ubuntu 8.10 brought out networking issues on my laptop which worked flawlessly in one city (Bangalore) but suddenly even a wired connection failed. Kinda odd to have no Lan but no  jumping loops for wi-fi drivers because in recent versions of Ubuntu (8.10 onwards) the device driver hardware was detected automagically. After loading Ubuntu (a clean install once in 2 years is better than an upgrade), the user has the option to activate a non-free drivers for Broadcom wi-fi cards so device drivers dont have to be manually loaded now. I cant recall if its from the ugly set of plug-ins and hence less supported.   Anyway, the The ethernet cable would detect a direct connection in Vista but not in my Debian and Ubuntu installations. Time to wade through a list of "lan not working in Ubuntu" bugs for every other laptop model and there was another kernel bug filed but that was an issue I faced in ver 8.10 and before. A few minutes of experimenting and wading through help forums didnt help the LAN detection problem. Then I checked /etc/NetworkManager/nm-system-settings.conf



and changed the above value to "true" and then "sudo /etc/init.d/networking restart" solved the lan problem.

2008 October 19 [Sunday]

HDD health with Smartmontools

Noel wrote a nice article on smartmontools, a tool to detect and warn of impending disk failures, a must have if you like to maintain your system.

Adding the line "sudo hdparm -B 254 /dev/sda" in my /etc/rcS.d file to reduce the Load_Cycle_Count (ID#193) results in the Temperature overshooting the limit (it should not be more than 45ºC). This is apparently not good for the disk health. Activating laptop-mode means it fails to function in the battery mode....not nice either!!

According to Noel :

hdparm -B 254 /dev/sda causes that your disk can NOT spin down nor make any kind of power management. Remember always that every single KiloWatt-hour you spend in your computer (or any piece of it, like a hard disc) is a KiloWatt-hour that turns into heat and a KiloWatt-hour you must manage with the cooling system. I strongly suggest against that kind of aggresive performance setting except for dedicated servers in 24×7 attended rooms.

I suggest changing the hdparm value to 127 (or simply to delete that line) AND to better ventilate the disc.

It seems, folks at seagate forums have been complaining about it too...  So is there another solution available to protect laptop disks from frequent head (un)parking AND managing temperature at the same time or are they mutually not feasible in SMART?

Forgot to add about the Bengaluru LUG met yesterday (which was my first LUG meet in this city, the earlier meets being FSUG meets) with Sriram, Kingsly, Rajshekhar, Sandip Bhattacharya, Deepika and me in attendance. The tasty lunch kept up an interesting exchange on a lazy Saturday afternoon and I need to find a way to stay away from Cauvery on MGRoad.

2008 April 20 [Sunday]

HP-Compaq hardware quality takes a hike

The HP saga of woes continues ....... After insisting that an international warranty means it is one, the service centre amid chants of "best effort basis", "we dont support out-of-country purchase you know" , etc... replaced the faulty motherboard with another faulty one and when this was pointed out to be a display (bios?) problem, they insisted in giving the typical brush-off :- "It is a linux problem" ... hmpf !! According to the HP-enginners, "Linux" was the cause of all my hardware issues. Yeah, right! What that actually means is, "We know zilch about Linux AND dont want to solve the real hardware problem (read replace faulty parts within the warranty) so here is the modus operandi we employ:

1] Delay till the warranty period is close to the end period.

2] If not, delay and grumpily replace the MotherBoard with another faulty one (i discovered that no quality checks were done before replacing it.)

3] Somewhere down the line it will go kaput and voila... there is your business opportunity to take half the cost of the laptop from your customer. This is the best way to be in perpetual business.

IMHO, mumbai's dabbawallah's know what Quality is all about and deliver it with almost zero margin errors.

Well, by now I'd been arguing till I was blue in the face and was inside the secret cave (Its a restricted area where no outsiders are allowed, and only select HP employees have special cards to go in) and was not leaving unless they took a good look at the motherboard problem. Finally the technical head came down and his face brightened up on seeing Linux and i showed him the display problem. He accepted that it may be an incompatible chipset and sent it for observation. It was surprising to note that HP service centres dont even have a testing mount for this model - I was told the standard excuse - your laptop was an out-of-India purchase. So what? Why cant HP provide them with basic infrastructure like testing mounts for each MoBo and chipset model. Before replacing parts no quality testing is done. The bubble-wrapping around the MoBo is removed and hardware is screwed onto the machine. No quality testing or quality checks to see if the replaced hardware could be faulty or not.... that sucks bigtime ! Meanwhile another engineer told me the centre manager fired him for accepting (telling me) that there is a hardware problem with the Motherboard.
The typical reply one keeps hearing is "will only support Windows". Heck i didnt ask you to support Linux but dont blame a hardware issue on Linux. Just because the HP customer service centre is outsourced (...for almost all hardware sellers actually) and you need to generate revenue (understandable) dont be _only_ concerned about making money at the expense of the customer.

2008 April 1 [Tuesday]

dont buy HP-Compaq laptops

Nope, this is not an 01-April joke. I decided to blog about this based on first-hand negative experience with HP-Compaq laptops this past week. Their service centre in Bangalore is horrible as far as customer service is concerned. My laptop is under a 1-year warranty and they have diagnosed the problem (the mother-board is kaput and needs to be replaced, the screen has dead pixels), but yet, they are pussy-footing on the issue. I was told it would take 6 months for parts to arrive from Singapore.

Apparently no chip/component level repair done in India so if the motherboard has to be replaced they will follow procedure, which is :

* Send email to logistics manager and wait for a reply since they have no clue if said part is available in India. No clue when he will reply but its according to company procedure.
* After sending an email they _wait_ for the concerned person to reply which could take forever and meanwhile if your warranty gets over, be prepared to fork out a wad of cash.
* Incase, they receive a reply on the parts, which is subject to availability since that particular model (V6320) is not manufactured anymore, the motherboard needs to be shipped to India (from Singapore) and they have no clue _when and if_ that will happen. In the person's own words : "It can take 2 weeks but will take 6 months. We cant commit anything".

In conclusion, instead of fast-tracking the same before the warranty gets over they are pussy-footing and giving excuses so that they can ask me to pay a fat sum for the motherboard replacement when the warranty gets over 3 weeks hence. Else (according to the local HP-compaq manager) I am supposed to take it back to the country of purchase and get it repaired there despite possessing an international warranty.

Nice customer service there HP. Bleed your customer for all they are worth.

I've learnt my lesson. I'll vote with my money next time and wont buy HP-Compaq laptops and a big thank you for the lousy customer service!

2008 January 4 [Friday]

philosophical differences

So Intel has quit the OLPC project due to philosophical differences. Like many, I was wondering how long this (AMD,XO,Intel) marriage would last. I wonder why Intel ventured there in the first place, because AMD was there first (?) and Intel didnt want to lose $$$ (brand recall in marketing terms indirectly means $$$, which AMD would get via project associativity).

“I think that as an organization, Intel is about competition; they are not about learning,” said Mr. Bender, the group’s president for software and content.

Duh, unless you dont share an iota of the same philosophy, ideals or whatever of the OLPC project, it did not make much sense to try and ride two boats at the same time (read, Classmate PC). What a shame !!

2007 May 13 [Sunday]

unable to install Ubuntu-7.04 on HP-Compaq-V6320

Has anyone tried installing Ubuntu 7.04 on a Compaq V6320 ? The installation crashed with some fsck errors that disappeared too fast for me to see. Presently the installation CD is stuck in the drive and the machine does not respond.

The problem has been reported earlier on the forums : http://ubuntuforums.org/showthread.php?p=2520755

If anyone knows how to solve this please leave a comment.

** update **

Managed to pop out the CD with a manual eject. On my laptop the hole is just to the right of the eject button on my CD/DVD drive. Took a straight paper clip and gently pushed it in to open the door :-)

2005 October 15 [Saturday]

a hundred dollar laptop

I wish the one laptop per child project by nicholas negroponte had chosen "ubuntu" instead of red-hat on AMD chips but most importantly this project should come to india and brighten many kids lives :-) .... provided the government 'babus' in the hallowed ministry of education cared about their common citizens.

So why does it have to be via government participation only as there are so many street kids here who would be able to learn and benefit. Surely, a million laptops would be financially feasible if some large corporates sponsored such learning initiatives by forming a joint venture for a social cause. Many corporate giants and IT companies definitely have the cash to chip in but do they have the heart ? The profit-rich BSNL and MTNL can definitely donate some internet bandwidth to shools and collect some good karma, given that they squeeze and rip-off the regular paying customers.