॥ स्वक्ष ॥

To content | To menu | To search

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       5.60.48.36+bdcom-0ubuntu3       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/

=== START OF INFORMATION SECTION ===
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

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.

=== START OF READ SMART DATA SECTION ===
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
                    command.
                    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:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  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
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    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:
bzr
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:
python-configobj
The following packages will be upgraded:
bzr
[.....................]
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.


- page 1 of 4