Linux optimize

10 ways to dodge Linux hardware issues

If you've been grappling with Linux hardware problems, take heart: Jack Wallen has some strategies for resolving common issues -- or avoiding them in the first place.

Sometimes, you just have to accept the fact that a piece of hardware won't work on Linux. But if you approach things the right way -- and you have some good troubleshooting techniques -- you can often sidestep problems and get your hardware working.

Note: This article is also available as a PDF download.

1: Don't use very old or cutting-edge hardware

It should be obvious why very old hardware is to be avoided. First, it is going to be on its last legs. Second, the newer distributions are less and less likely to contain legacy support for a piece of hardware that hasn't been sold for five years. But cutting-edge hardware should also be avoided because its drivers will be iffy at best. Although it's tempting to want that latest-greatest piece of hardware, many times you will only wind up frustrated because your distribution of choice has yet to catch up with the manufacturers. This is becoming less an issue (as more companies hop on the Linux bandwagon), but it's still a concern. I tend to avoid anything released within the last six months of the most recent release of my distro of choice. This system doesn't always work -- but with the exception of the Wacom Bamboo Pen tablet, so far so good.

2: Verify support

Before you buy, check whether the product supports either Linux or Mac. If it supports Mac, chances are it supports Linux. This is especially true for printers. Of course, this is not always the case. But if the hardware states that it supports Linux, it's a sure thing. Before purchasing hardware, I like to find out what the company's reputation is with Linux. NVidia is always a good choice because it makes drivers for the Linux operating system to run its hardware. This is also true for Lexmark printers. (You will always see Tux on those boxes.)

3: Use proprietary drivers

I know this one burns the bulk of open source fans out there, but sometimes the proprietary drivers just work better. NVidia is a great example of this. Yes, there are the Nouveau drivers for NVidia cards, but those drivers are still suffering from a lack of maturity. Give them time and they will probably stand up to the NVidia proprietary drivers. But even though it might really burn you up to use a proprietary driver, if you need your hardware to work as well as it can, you might have to swallow your pride and use it.

4: Know your log files

There are tons of log files to comb through on a Linux box. But not all of them will help you out with hardware. The log files you need to know are all in /var/log:

  • Xorg.0.log -- For any X Windows issues
  • cups/error_log -- For printing issues
  • messages -- For any hotplugging issues and any issues that involve the kernel, such as non-authentication-based networking issues
  • syslog -- Sort of a catch-all log file; if you can't find it in the other log files, you might find it in syslog.

5: Don't use a cutting-edge distribution

It is tempting to live on the cutting edge with your distribution. The problem is the Fedoras and the OpenSuSEs tend to break support for hardware, even if for a short period. This can get frustrating when you do an update only to have it bring X Windows to a screeching halt. Instead, if you like your hardware support to be steady, go with a distribution that offers something like the Ubuntu LTS (Long Term Support). That way, you know the distribution will work with your hardware for the long haul.

6: Don't draw a conclusion from a Live CD

I have had this happen to me. You have your new machine and you slap in a Live CD only to find out that one piece of hardware doesn't work. Instead of scrapping that distro, go ahead and install it. In some cases, the full installation will offer much more hardware support than the Live version. This is especially true when proprietary drivers are needed. I recently booted up Ubuntu 10.04 on an Asus laptop that had no wireless support. I plugged that laptop into my wired network, installed the OS, and let the hardware detection discover that a proprietary driver was necessary for wireless to function. Once that was installed, wireless worked perfectly.

7: With wireless, try an open network

There have been instances where I assumed a wireless card wouldn't work, even though it was detected by the OS. No matter how many times I tried to connect to a network, it simply wouldn't work. If I see this happening, one of the first things I will do (if I have access) is temporarily drop the security on the wireless access point and see if the machine can then connect. If so, the issue could be encryption. For that, sometimes a different wireless manager will work. Try WICD and see whether it can help you connect to your re-encrypted access point.

8: Wipe out the xorg.conf file

If you're using a new distribution (especially Ubuntu >= 9.04), the whole of X Windows has been changed. Instead of heavily relying on the xorg.conf to configure video, a new system is in place that doesn't require a preconfigured configuration file. If something happens to X, and the only way you can log in is with terminal, make a backup of that xorg.conf file and then delete the original. Once you have done that, restart X (or reboot the machine), and X should come back. If it doesn't, your video driver is most likely suffering from a bit of a breakdown.

9: Learn the commands

Lots of command-line tools are available to help troubleshoot issues. For instance, the xinput command helps troubleshoot problems with input devices. If you issue the command xinput list, you will get a list of all input devices seen by your kernel. Sometimes, a piece of hardware will have its own tools. Take, for example, the Wacom tablets. When you install the drivers for these pieces of hardware, you will often install troubleshooting tools like wacdump. If you use NVidia proprietary drivers, you can take advantage of the nvidia-config tool (which has an outstanding GUI). It can help you configure advanced features for your video hardware.

10: Try the hardware on a different machine

After much frustration and work, you sometimes need to be 100 percent sure that the issue isn't faulty hardware. This was the case in my struggle to get a Wacom Bamboo Pen to work with any Linux distribution. At one point, I had to give the hardware a try on my wife's Mac. It worked fine, so I knew for sure the issue was with Linux. Had the tablet not worked on the Mac, I would have known the hardware to be bad and given up. In this situation, however, the hardware was good and my struggle continued.

Hardware troubleshooting

Most of the time, you can alleviate hardware issues with an update or upgrade. But not every time. And of course, there are many more methods for troubleshooting hardware in Linux. What is your method for doing so?

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

105 comments
vaidyan.varghese
vaidyan.varghese

mozilla firefox the default browser for ubuntu is working well in my machine , but when I am trying with chrome the system gets hang.

balbino.caballero
balbino.caballero

Excellent article. but let's face it, it's not about marketing or trends, it's about doing things right. The same thing goes to hardware... We all know that Windows every time they post service packs or is updating some serious stuff or patching something that the previous service pack has already patched and open a new security flaw. And after all, the market is still using Windows, because it's still the defacto software for Business level applications and services. On the other hand, the market is looking with good eyes Linux, just look at google's example. The hardware providers (not all) has opened their doors to support Linux, and it's not their fault, they're just following what the market is saying is better. Linux is a very stable and good distribution too (I work with Linux in my personal equipments and a few servers at my job and Windows in my job too). It also has its problems, but no matter the distro, there is always a way to do things to support hardware and software. So I think the gap between hardware support no matter the OS will be broken only if hardware manufacturers give support to all OS's no matter distro, developer, etc.

AnsuGisalas
AnsuGisalas

dual-boot between the last known working distro, and the bleeding-edge distro? Then when the new is stable you migrate your stuff from the old to make room for the new bleeder?

echo9
echo9

cool! I have always suggested many of the same points which are described here. Thanks for refreshing my memory :)

MorrellF
MorrellF

How about Smoothwall Express. This is a fantastic free Gateway but it kills the platforms I have installed it into. They work for a few months then die. can someone help explain the problem and perhaps offer a solution?

jhoward
jhoward

As far as servers are concerned... Linux has been much easier on me than Windows over the years - take your pick Server 2000, 2003, 2008, XP, Vista, 7 - with network drivers and SATA drivers. Many of us have been down in the data center late night trying to find the original SATA driver on floppy - yes floppy - or motherboard driver CD so we can frantically hit the f6 button during bootup or boot into safe mode so we can access the CD without the computer going into a continuous boot cycle. As far as Desktops are concerned I really only ever have issues with the video cards which still work at a decent level - just not what they are capable of on windows. To be fair I do pay attention to Linux support when buying hardware the same as people pay attention to Windows 7 support on hardware now.

cjshelby
cjshelby

I had a situation a couple of years ago where I wanted to install Vector Linux on an old Toshiba laptop. This is a distribution that represents itself as great for older/slower PCs and hardware. I couldn't even get the OS to boot. Long story short, after visiting the forums and inquiring as to the problem, I was told the the newer kernel no longer supported some of the older IDE interfaces. I was like uhh, OK, what's wrong with this picture? Yes I know full well that I could have taken the time to recompile the kernel or replace it with an older one. But this seemed to me to be a basic consideration in a Distro touted for "older hardware". It would have made sense and been considerate if this issue had been dealt with in some way. Offering the older kernel, or at least warning those of us who might have the problem. I love Linux and have used it almost exclusively for the last 4 years. Sometimes though, it seems that the developers concentrate more on features like "eye candy" and forget or ignore the basics.

harrylal
harrylal

I'm not overly fond of MS or Apple and I would really like to see Linux bloom, but this sounds more like 10 reasons not to use Linux. Once you get it going it's fine and pretty solid. The classic problem as most probably know is anyone can change it and there is no standard direction for development. Unfortunately, not everyone has the resources available to handle the IT requirements.

QueryEverything
QueryEverything

Most folks have it easy with Windows. It is either fully or partly installed by system manufacturer and the user just needs to know what button to prod with a stubby finger to power it up. The thing to do is compare like for like. Take a vanilla Windows CD and an unknown PC and try and install Windows so it is fully updated and works with no warnings or failures in the Device Manager. When the 3 to 5 days are finished, trash the disk and install a recent Linux distro. After your lunch and coffee send an email to your friends to say how good Linux is!! OK, so it may be overnight if the distro is a couple of months old and needs a lot of patching but it usually only needs 2 reboots and a couple of tweaks at most plus the update is fully automated in most modern distros. On all the mentions of video issues with Linux - take a look at the EDID data the monitor is passing back and/or check the native resolution if an LCD Panel. Don't get me wrong, I support both Windows and Linux systems and Linux is by far the easiest to diagnose with and the apps, even when all free, do exactly what I want.

rfolden
rfolden

2010: The year of the Linux Desktop!

kevaburg
kevaburg

I use Smoothwall Express on an old P3 that was sitting idly by waiting for attention. I never turn it off, rarely have to perform admin on it and it has been running for over 18 months now. Perhaps your hardware is simply not up to the job.

seanferd
seanferd

How? What dies? I suspect that these systems don't do well being on all the time, or they are overheating. You don't mention anything about the hardware, or how it dies, so I can only offer the random guess.

Brainstorms
Brainstorms

I dug out a 1997 Toshiba Satellite Pro 435CDS laptop -- which had been maxed out at 48 MB RAM to go with its 1300 MB hard drive and CDROM that won't burn or boot disks... And within a few days I got THREE different Linux distros installed and running in a triple-boot situation. For the record, they were Damn Small Linux, Feather Linux, and Puppy 2.17. Later, I wiped the disk and got Slitaz 2.0 (minimalized) to install & run. An older version of Tiny Core had NIC issues, but I plan to try 2.11 -- the ultimate in "cloud" Linux distros (?)

Greg Mix
Greg Mix

MS somehow gets credit for the work of the hardware manufactures and OEMs (and other software devs). The biggest part of market share is that people will write drivers and software for your OS. Market share != quality, but in the end is why most people have Windows.

Gis Bun
Gis Bun

I guess you didn't read the article then? Take any PC? OK. Take the latest system from Dell or HP. You think LInux [whatever distro] will install perfectly? Hah! Keep dreaming.

The 'G-Man.'
The 'G-Man.'

What enterprise uses unknown PC's? What user for that matter - if you don't know what is in your system then you failed at the first hurdle anyway.

Deefburger
Deefburger

I agree with Queryeverything. I can take a typical Dell or HP or even a ASUS or MSI machine and get a working and updated Linux in about an hour on broadband. Windoze I have to work at. I have to track down the drivers myself, download them from 5 different places, watch them closely for spyware and extra features during install and even then I still have two hours of Windoze Updates and APPLICATION installation still to do!!! Linux is only a problem if there is no code for the hardware, period. That doesn't happen very often anymore.

Fredl99
Fredl99

Frankly: The one who ever installed any OS and never ever had any issue with some piece of hardware/driver/software may stand up and speak now or lapse into silence. The one who seriously states that he never had any problems in Windows/MacOSX or others is simply lying. As well as an experienced person can track down a hardware problem within Windows, so does an experienced person within Linux.

CharlieSpencer
CharlieSpencer

with the side-by-side comparison, I consider your first point more relevant. When Joe Keyboard picks up his new toy at Big Box Electronica, Windows is already there. He may use a restoration CD that will have the drivers for his model, but he'll probably never install Windows from scratch. Linux will install faster, but it won't make any difference to him.

john3347
john3347

dslam24, are you attempting to suggest that Windows doesn't have hardware (as well as software) compatibity issues even larger than most current popular Linux based OSs? Try telling that to my Windows 7 machines that refuse to print to my HP Photosmart C7280 network printer. Several hours on (non)support chat line with HP has failed to repair the problem. While my installation of Linux Mint refuses to connect to my Wifi router, it recognizes and functions normally to the C7280 printer. (All my Windows XP machines also print normally to the subject printer) Windows, especially the most recent editions, display far more hardware incompatibilities than at least Linux Mint 9. edit: Linux Mint is not alone amoung Linux based OSs in not connecting to WiFi. I have used several Linux versions over the last 5 years or so and NEVER had one that would connect wirelessly - never one.

AnsuGisalas
AnsuGisalas

Just between different OSes. This is less work actually: Setup the new distro once, keep using the old one, check in on the new every once in a while to see when the kinks get worked out enough. Seamless. Trying to force an unready distro to work, now that's a lot of work.

MorrellF
MorrellF

The PCs I have had Smoothwall in are Windows. I have used Small Towers and small formfactor shuttles. The machines are required to opperate 24/7.

Neon Samurai
Neon Samurai

Take the latest system from Dell or HP with a freshly fully formatted hard drive. Hand it to a user with a Windows OEM disk. You think they'll have it put together in under two hours with no further questions? Windows, like all other OS platforms, isn't perfect and it tends to not play as well with older hardware in general. (that whole issue with vendors deciding to drop closed driver development before the actual hardware breaks down. Planned obsolescence, great if your the one selling the hardware.)

Gis Bun
Gis Bun

As mentioned before, install a Linux distro and it will work on ANY system? Including something just released yesterday? Give me a break. you'll be hunting for drivers. And if [and most likely true] the manufacturer hasn't released any Linux [or Mac] drivers, good luck. As for a "typical" dell or HP, their web site has drivers for every model [and even some Linux]. If the OS is newer that what was supported, 99% of the time the latest Windows will install just fine. Any missing or updated drivers will be available through Windows Update. I've done a few installations lately where neither manufacturer had Windows 7 drivers on the site [because most were already in Windows 7]. The HP A1730N and the Dell Vostro 400 are like that. No need to hunt down drivers for anything. Non-Windows users think Windows users need to track down drivers for everything. Not true, Windows Update will do the work. It is a repository for drivers. Last I checked Linux has nothing like it.

Neon Samurai
Neon Samurai

Probably the easiest to install since it's little more than flashing a firmware image. As for long term hardware support, I'd like to know why my wife's machine randomly ignores headphones being attached and removed. There's no physical button to enable the external speakers so if osX does not recognize the headphones being disconnected, the external speakers do not get re-enabled. Yup.. even Apple's gem crashes and causes hardware grief for users.

Brainstorms
Brainstorms

Do-it-for-them. When I want to introduce someone to Linux (possibly after demoing it on one of my machines), I turn DIY into DIFT: I install it and "trick it out" for them. That solves that apples-to-apples problem, they end up liking it (and using it when it's a dual-boot system), and I only occasionally get phone calls to help with something. A lot fewer calls than my Windows-using friends who see me as a helpful "Johnny-on-the-Spot" sysadmin. So I'm motivated to help... Because of the previously-mentioned install/support disparity, I see Linux gaining traction via the "friend helping a friend" method. Sorta like "paying it forward"...

SgtPappy
SgtPappy

a new electronics store? Will it be coming to a mall near me anytime soon? It sounds like a great place to be.

cjshelby
cjshelby

John, This usually has to do with the chipset refusing to play with the Linux kernel drivers. You didn't say but are you using the same wifi card(s) over and over again? I have a pc card that has worked on at least a half dozen laptops and as many distros. That one is based on the Realtek RT61 chipset, made by a company called Edimax (Newegg, $22). Both my kids have old laptops with mini-pci cards running Linux Mint. The Laptop I'm sending this note on has an Intel wireless-n 5Ghz card. It's connected at 5Ghz right now in Ubuntu 9.10. I would Google the cards and chipsets you are using and see if others have had success connecting in Linux. Good Luck!

RipVan
RipVan

John, good post. I actually took Linux seriously the first time I loaded a distro and wireless worked flawlessly. I play a lot with my laptop and load different distros periodically and occasionally have to throw it in my bag and hit the road without remembering what I have loaded on it. I take a few distros on disk with me, because something always works. Oddly enough, sometimes one of my cards works with some distros, but not others. So I keep two handy. But the last time I was out, I called the hotel (sometimes the problem is THEM). They asked for the MAC and I had to take the card out to read it. I plopped it back in and connected! Weird as it was, when I had connectivity problems the rest of that trip, I pulled out, put in, and connected every time. Give that a try! And for those who would laugh and add that to the list of the reasons they think Linux is inferior, you should see the Windows problems my friends call me to fix. They are average users, and they are at a loss to figure out how they were supposed to solve the Windows problems they had. It DOES cut both ways... (Edited for speeling.)

Brainstorms
Brainstorms

I favor the "ping-pong" approach, too: Keep two partitions for OSes, and an additional partition for '/home'. Assume you've been running distro A in the first partition, with the home partition mounted. An upgrade becomes available... Step 1: Wait 1-2 months. Be patient; you don't need latest & greatest, and 2 months of "gamma testing" will bring lots of fixes for things you won't have to suffer with or get discouraged over -- let the early adopters do that work for you. Step 2: Install the upgrade in the second partition -- and update it. Link in the home partition. Use it... If something is unsatisfactory, go back to the first for a month. Step 3: Once a month (or so), reboot to the newer distro, update it, and use it until you're unhappy again. I've not seen it take long before I permanently switch. Step 4: Use the older version as a "rescue" OS if/when you need, and it gets overwritten with the NEXT distro. It can also serve as a reference platform for drivers & customizations. This allows YOUR definition of acceptable performance tell you when to switch.

AnsuGisalas
AnsuGisalas

Boot into working OS. Get whatever files you need to get, put them where they need to be. Boot into newer version OS. Do what you need to do to make it all it can be (at the moment). Then look around, is everything working or not. If not, just boot back into working OS again. I think that's better than the alternative: Switch OS'es. Find out nothing works. Switch back. Wait. Switch again. Find out half of everything works. Switch back (again). Wait. Switch (again again). Find out that most hardware works, replace what doesn't. But I could be wrong.

The 'G-Man.'
The 'G-Man.'

But then... Setup the new distro once, keep using the old one, check in on the new every once in a while to see when the kinks get worked out enough. So...how do you know it is ready to begin with?

Neon Samurai
Neon Samurai

I'm actually to the point where I'm thinking a wifi USB dongle and disable the onboard radio in the bios. T60 with no Windows Update provided wifi driver and the one provided by the manufacturer disabling the card after about five minutes of connection. Dropped a liveCD on the machine and had rock solid wifi all day. osX does come closest but no OS "just works".

OxfordRob
OxfordRob

We've just had an issue with an HP notebook where Windows 7 can't find the NIC driver. Guess what we have to trawl around finding it as HP aren't sure what it is. Strangely enough Windows Update can't download it......... No brand new out of the box machine with a blank hard drive will ALWAYS work straight away, Linux will find some and windos others but you'll still need to do some digging.

Neon Samurai
Neon Samurai

I do like the search by model number option. In Lenovo's case though, the driver/update list you get back is pretty messy to go through. I was in last Friday for Thinkvantage System Update which was on the second page of download links and found using the browser's text search. It'd be nice if they just provide the current versions of relevant patches based on your model number search. The listing by category is wonky too. I'd think System Update would be a Utility or System Utility but it's under neither category.

CharlieSpencer
CharlieSpencer

"I also checked the Dell support site. It's not the worst driver download site I've seen. Strangely enough; Lenovo's driver download site is far worse." HP / Compaq used to suck. Their web site used to list systems by some obscure HP model number that doesn't cross-reference to any of the markings inside or outside the case. It was always a mystery to determine exactly what HP thought I had, and often required a phone call. It also included every driver for every make of component installed, but included no way to determine which components went into your particular system. Drivers for NICs from six different manufacturers, but which one is in my system?? We haven't purchased their systems in several years, so I've had no reason to use it in a while; maybe they've improved. I really prefer Dell's 'Enter the Service Tag' approach. That way I don't need to know the make or model, and the only drivers are listed are for the components that went into that individual system.

Neon Samurai
Neon Samurai

At first I thought you where going to say that having to go find drivers for a Linux based system was a problem but it's perfectly ok to require users to go find Windows drivers through the HW vendor support site. " As for a "typical" dell or HP, their web site has drivers for every model [and even some Linux]. If the OS is newer that what was supported, 99% of the time the latest Windows will install just fine. Any missing or updated drivers will be available through Windows Update. " I've a few models of Dell notebooks here. When I did a clean Windows install on one, it didn't have complete drivers available from Windows Update. Some of the drivers where there but I still ended up back with the factory restore disk to get full hardware functionality. I also checked the Dell support site. It's not the worst driver download site I've seen. Strangely enough; Lenovo's driver download site is far worse. If all hardware "just works" on Windows for you then I have at least two bluetooth USB dongles I can mail on over too you. They are useless on my Windows machine with or without the horrid BT drivers (BT120 is one of them). "Non-Windows users think Windows users need to track down drivers for everything." You might want to clarify what "non-Windows users" are. it sounds like your suggesting that not making Windows one's primary desktop negates them having any understanding or experience with it. Win7 is getting much better but back in the old WinXP world, you'll still have drivers you need to go hunt down from specific vendor websites rather than finding them in Windows Update. I've actually had cases with hardware where the Windows Update provided driver didn't work properly sending me back to vendor support sites for those drivers. (though, why a vendor would give a different driver to WU than what they host directly is beyond me). "Last I checked Linux has nothing like it." Wow.. just.. wow.. You claim non-Windows users know nothing and then support your claim by saying that? I'm just going to chalk that one up to you not actually knowing what your talking about outside of the Windows realm. No platform "just works" with all hardware.

mircea.corban
mircea.corban

It used to be a small metal switch inside the jack designed to do just that! Fail-safe and bug-free. Although the software is marvelous (be it open or close), we tend to rely too much on it...

Brainstorms
Brainstorms

That's just what I do... I start with 'fwknop' to gain access to their system at a high port number, then ssh -p hiport -Y -L 5900:localhost:5900 user@remoteIP to get in and set up for VNC. Then I use Remote Desktop to bring their desktop to me, and I fix something and/or show them how. If they have multiple machines behind their firewall-router, then each has a separate pair of port numbers that the firewall-router directs to a specific machine. I'm about to get everyone on DynDNS so that I don't have to say, "I need your IP number..."

Neon Samurai
Neon Samurai

You can firewall and user limited SSH to just your user account and visit remotely for quick fixes. Give them an icon to run vnc and you can even see there desktop for support and training provided it's started after they've logged in. Windows has RDP and remote assistance but ssh natively rather than as a third party addon would do wonders for those of us supporting users.

CharlieSpencer
CharlieSpencer

I was trying to come up with a generic collective term for Best Buy, Fry's, Radio Shack, etc. But feel free to steal the name when you open your own chain of under staffed, under trained, over priced geegaw stores.

Gis Bun
Gis Bun

Sounds almost like the computer version of an extremist in some religion [take your choice].

CharlieSpencer
CharlieSpencer

I've reached the point where I tell my users to contact the hotel desk before they call me. Usually they don't wind up calling me at all.

CharlieSpencer
CharlieSpencer

Most Windows discussion eventually include someone who posts a "You should run Linux instead!!!" comment. I have a history here of responding with "Ah, the obligatory Linux troll." I had to post a corresponding comment here or risk Neon Samurai calling me out as a hypocrite. :D