WordPress site for Linux and other computernerds

Category: hardware

Fix your wifi card being blocked after booting (Linux 3.10.x)

 

The problem

 
After upgrading an old laptop (HP nc8430) to a kernel from the 3.10 series, everything seemed to work fine, except for my wifi card (Atheros AR5418 Wireless Network Adapter [AR5008E 802.11(a)bgn]). Contrary to the previous kernels, after booting, the wifi led was dead, and I obviously had no connection with my wifi station. At first sight, I tried the wifi radio button, but that didn’t help, the wifi led stayed dead. Wicd could not find an active adapter.

 

Analyse this

 
When I ran lsmod , it showed me that all the required modules (the ath9k driver for the wifi adapter, wifi networking, 802.11, …) were loaded. When I ran iwconfig, it even showed me a wlan0 device, albeit not connected of course. WTF is going on ?

 Ok, let’s see what rfkill says:

rfkill list

I got a surprise: everything was blocked. I also have no idea why, but rfkill now showed me two wifi options: hp_wmi and phy0. I am pretty sure the hp_wmi thingie was never there before. Both of them were blocked (hard and soft), so I unblocked them:

rfkill unblock all

Now when I ran wicd-client, it connected to my wifi station. The wifi led come on as well. Good, but now, how do we fix this permanently ?

 

Solution

 
It appears that the hp_wmi module (support for some HP keys) does not play well with the rfkill module (RFKill is a linux kernel subsystem that provides an interface through which radio transmitters in a computer can be queried, activated, and deactivated).
So, a simple fix is to prevent the hp_wmi module from loading. On a Slackware 14.0 system, this can be achieved by creating a hp_wmi.conf file, in /etc/modprobe.d/, containing the following:

##############################################################################
# Do not edit this file; instead, copy it to /etc/modprobe.d/ and edit that
##############################################################################

# Blacklist because interferes with wifi (wifi rf blocked at boot) 
blacklist hp_wmi

 
This solves my problem: the wifi card now works again straight after booting, just like it did before. If you’re facing the same problem, let me know if this fix also works for you.
  

Server upgrade

 
I managed to get my greedy hands on more powerfull computing gear, providing the means to upgrade this webserver. After nearly 4 years, the old hardware was still fine, but with the newer parts in place, the machine performs even better, and is somewhat more future proof.

 

Part Old server New server
CPU Intel Core2 Duo E6320 Intel Core2 Duo E7500
CPU speed 1.86 Ghz 2.93 Ghz
Memory 2.0 GB DDR2 4.0 GB DDR2
Chipset Intel DQ965 Intel Q45


 
In order to prevent a possible disk crash, the old 250 GB harddisk (already 4 years old) was cloned to a new one. The old disk was still OK, but it’s better to be safe than sorry.
 

USB2 vs USB3 external HD benchmark

 

Intro

 

In this post, I will benchmark an external USB disk, using HDTune and USBDeview. So, this is by no means a professional review, we are only comparing the obtained results. The disk I have used is a Seagate Momentus 7200.3 (120 GB, 7200 rpm), which I recovered from an older laptop. The Seagate is fitted in an el cheapo USB3 external disk enclosure, bought on Ebay for 15,00 Euros.

For the purpose of this test, the disk will simply be connected to an USB 2.0 port and benchmarked. Then it will be plugged in an USB 3.0 port, and benchmarked again. So, it is exactly the same disk, just a different port. The host computer is equipped with an Intel Core i5-2500 processor and 8 GB ram, and runs Win7 x64.

 

Test results

 

HDTune

 

  • USB 2.0 port
     

     
  • USB 3.0 port
     

 

USBDeview

 

  • USB 2.0 port
     

  •  

  • USB 3.0 port
     

 

 

Conclusion

 
Well, the results are not surprising: the Seagate achieves significantly better throughput when connected to an USB 3.0 port. The numbers simply double. This also demonstrates that USB 2.0 ports really are a bottleneck for external disks. Any regular laptop drive can read/write a lot more data than USB 2.0 can cope with.

So, if you are in the market for an external disk (or disk enclosure), do yourself a favor, and go for USB 3.0.  
 

HDD vs SSD on a Linux powered laptop

 

Intro

 
In this post, I will compare 3 laptop harddisks, under Linux, using hdparm. So, this is by no means a professional review, but since hdparm is shipped with every goddamn Linux distro out there, it makes it very easy to compare my results with yours.

The 3 (Sata) disks are:

  • Toshiba MK8046GSX : 80 GB, 8MB cache, 5400 rpm
  • Seagate Momentus 7200.3 : 120 GB, 16 MB cache, 7200 rpm
  • Samsung 840 series : 120 GB, 512 MB cache, SSD

So, the Toshiba and Seagate are “classic” mechanical harddisks, while the Samsung is a shiny new solid state disk.  The 3 disks are tested on a Dell Latitude E6500 laptop, equipped with a Core2 Duo P8600 processor and 4 GB ram. It runs Slackware 13.37 x64, with kernel 3.7.1.

 

Test results

 

  • Toshiba (5400 rpm):
    [root@E6500 ~]$ hdparm -Tt /dev/sda
    
     /dev/sda:
    
    Timing cached reads: 3806 MB in 2.00 seconds = 1903.02 MB/sec
    
    Timing buffered disk reads: 144 MB in 3.04 seconds = 47.40 MB/sec 

     

  • Seagate (7200 rpm):
    [root@E6500 ~]$ hdparm -Tt /dev/sda
    
    /dev/sda:
    
    Timing cached reads: 3822 MB in 2.00 seconds = 1911.02 MB/sec
    
    Timing buffered disk reads: 236 MB in 3.02 seconds = 78.25 MB/sec

     

  • Samsung 840 (SSD):
    [root@E6500 ~]$ hdparm -Tt /dev/sda
    
    /dev/sda:
    
    Timing cached reads: 3862 MB in 2.00 seconds = 1933.08 MB/sec
    
    Timing buffered disk reads: 808 MB in 3.00 seconds = 269.00 MB/sec

    The Samsung is cleary limited here by the Sata controller (Intel ICH9 Sata Raid controller), which is a Sata-300 controller.

 

Conclusion

 
Well, the results are hardly surprising: the old Toshiba is the slowest, the Seagate is significantly faster, but the Samsung simply wipes the floor with both of them. The Samsung plays in a whole different league, you can’t really compare them.
 
There is one thing to keep in mind when replacing your old hardisk with an SSD. The latest breed of SSD drives are capable of reaching sequential read/write speeds up to 500 MB/sec. That’s awesome, but it also means that your laptop will need a pretty recent Sata controller (to be specific, a SATA-600 controller) if you want to realise these high speeds.
 
Older laptops are equipped with SATA-300 or even SATA-150 controllers. This means that in reality, you will reach at most 270-280 MB/sec on a SATA-300 controller, which is still impressive, and up to 130-140 MB/sec on a SATA-150 controller, which still beats most, if not all mechanical laptop drives.
 
Consequently, on these older laptops, you don’t need the latest and fastest SSD drives available, because you will never get the most out of it. But don’t let this news spoil the fun, upgrading older laptops with SSD drives provides a very signifant performance boost, well worth the investment.