WordPress site for Linux and other computernerds

Category: linux (Page 2 of 2)

MKVToolNix 8.3.0 for Slackware x64

 

Yet again a newer version of the MKVToolnix package for Slackware (Sbo build). This one was build on a 14.1 system. Note that this is also the last version that uses the wxWidgets library for the mkvmerge GUI tool (mmg). Newer versions apparently will rely on Qt5. However, Qt5 is not part of a standard Slackware 14.1 system.

 
For Slackware 14.1 x64:

 

Enjoy 🙂
 

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.
  

Tell Samba to shut up about CUPS

 

The problem

 
Lately, I stumbled upon a minor but annoying issue with Samba on one of my file servers. There are no printers installed on this server, and probably never will be. However, smbd complains to no end in the client logfiles about not being able to connect to a CUPS server:
 

[david@Samba ~]$ head /var/log/samba.dfpc5
...
[2013/07/23 07:49:24.869727,  0] printing/print_cups.c:109(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2013/07/23 07:49:24.869790,  0] printing/print_cups.c:468(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
...

 
All of the client logfiles were spammed continously by Samba with these lines. While this did not seem to harm the performance of the server, I wanted to ged rid of them. After all, I never configured this Samba server to use CUPS, so why the hell is it trying to find one ?
 

The cause

 
This file server runs Slackware Linux, and the Samba package provided by Slackware, is compiled with – – enable-cups (like it is on most distros). Consequently, unless you tell it otherwise, Samba uses CUPS as the default printing system and tries to connect to a local CUPS server. And if fails to do so, it starts spamming your log files . . .

 

The solution

 

There are several solutions to this problem:

  • reconfigure your Samba installation not to use CUPS
  • recompile the Samba package without CUPS support
  • run CUPS anyway on that server so Samba can connect to it

 
I prefer the 1st solution. Just edit your smb.conf file, and look for the line that says “printing = cups”. Pay attention to the ; character at the front, which actually commnents out this line. You must remove the ; character.

 

;   printing = cups

 printing = bsd

 
Save the file and restart the Samba service. Those pesky CUPS lines in your logfiles should be history.
 

Remote Desktop tricks for Linux users

 

If you like to make RDP connections to Windows machines from your Linux box, it is often convenient if you can set a few things right from the start. As such, I wrote a little shell script around rdesktop, in order to make life somewhat easier for me.
 
This script does the following:

  • invoke rdesktop
  • set the keyboard layout to Belgian AZERTY
  • set the screen resolution to something that fits the screen of my laptop
  • map a local directory so it is available on the remote Windows box

 

And here is the script:

#!/bin/bash
#-----------------------------------------
# simple wrapper for rdesktop
# set keyb layout on server to azerty BE
# set window size to 1370x840
#-----------------------------------------

 if [ $# != "0" ] ;
 then

   rdesktop -k nl-be  -r 'disk:homedrv=/home/david/' -g 1370x840  $1

 else
   echo "$0: No arguments were supplied. Please supply a valid target 
             hostname or IP address."
   exit 1
 fi

 exit 0

 

The script must be invoked with one arument, the hostname or IP adress of the machine you want to connect to. I guess the script is simple enough to understand what it does. Adapt it to your particular needs, and I hope you like it.

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.
 

Newer posts »