LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-04-2007, 01:37 PM   #1
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Rep: Reputation: 31
Why is Linux PCI support so fragile?


This has been, and continues to be, perhaps the worst and least reliable part of installing a linux system onto older OEM hardware: if you so much as LOOK at the cards wrong, there's no guarantee that the network card that worked PERFECTLY in the SAME KERNEL with the SAME CONFIGURATION will even be seen by the kernel the next time it boots.

What the hell? This just happened to me for the n-th time. I boot the system with a Debian CD, get the network card talking and update the system. I shut the damn thing down and plug the sound card back in, since I usually take it out just to get the thing updated because of this very problem. Now, even after playing with the BIOS for 20 minutes, the network card won't even come up in lspci!?

I'm a systems programmer. Granted, I know hardware internals are amazingly complex, but can SOMEONE just answer why my systems almost NEVER work the first time I try and plug two cards into the board? And why this has been a Linux problem forever and still shows no signs of being fixed? Am I forgetting a magic button somewhere?

-dave
 
Old 03-04-2007, 01:50 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I have been using Linux for about 4 years now, used about every major distribution there is, and have done probably in excess of 50 installs for personal use, friends, etc.

That said, I have absolutely no idea what you are talking about with this problem. I have never seen behavior like that on any hardware, on any kernel. Even the ISA boards/NICs I have used with Linux behaved relatively well.

I have seen my share of Linux instability in various tasks and situations, but never any problems with PCI cards just disappearing.
 
Old 03-04-2007, 01:59 PM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Moved: This thread is more suitable in Linux Hardware and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 03-04-2007, 02:05 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Personally I have never had such issues nor seen such behaviour. I have a few really old computers that had Windows 98 and Linux just works with them.
 
Old 03-04-2007, 02:16 PM   #5
stan.distortion
Member
 
Registered: Sep 2005
Location: ireland
Distribution: debian with bits of everything stuck on it
Posts: 114

Rep: Reputation: 15
I shut the damn thing down and plug the sound card back in, since I usually take it out just to get the thing updated because of this very problem.

Sounds more like this is your trouble, seems you have a soundcard from hell if its making the network card disappear and I would be surprised if they work together at all. You could try adding pci=usepirqmask to the relevant kernel in /boot/grub/menu.lst but that should show up in dmesg
Cheers,
Stan

Last edited by stan.distortion; 03-04-2007 at 02:17 PM.
 
Old 03-04-2007, 03:29 PM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
I'm not sure if you are having problems with your NIC or your soundcard, but in any case, if your mobo has an onboard LAN port and/or onboard sound and you are also installing a standalone NIC or soundcard, you should get into BIOS and disable the onboard one. Having both onboard audio and a standalone sound card can lead to conflicts, same deal with onboard LAN and a NIC
 
Old 03-04-2007, 03:44 PM   #7
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Original Poster
Rep: Reputation: 31
That's the response I usually get

Summarized like: 1) don't throw stones and 2) it's your hardware problem

Well, I'm not a liar. And this happens almost every time. I've installed linux many dozens of times at least, been using it since '96. But now, as I used to do back 10 years ago, when I sit down to try and salvage some old OEM machine made worthless by commercial software's planned obsolescence, I:

1) remove the sound card, because it never works and in fact causes problems like we're talking about here
2) boot and install Debian off the CD
3) get the network card working (which never works automatically, but I'll admit I'm using the old school distro)
4) plug the sound card back in, and head down the road of getting X to work, the mouse, etc.

After step 4, almost every time, I have to either play with the card locations, or am faced with the wall of either having the sound card work, or the ethernet card work. In this case, I was fortunately able to simply switch the card locations, and it magically worked. This is not the first time I've done this.

In fact, its one of the first linux "Huh?" questions I had. Back in the day, the first thing that was suggested to me on how to fix a not-working ethernet card was to try another PCI slot. I questioned why it would make any difference to the kernel what slot the thing is in? He shrugged. Short of a busted motherboard, why would this make any difference at all? Especially in a modern kernel? And if it has always been busted motherboards, then I'd better go start betting double-zero.

Last edited by dombrowsky; 03-04-2007 at 09:41 PM.
 
Old 03-04-2007, 04:02 PM   #8
stan.distortion
Member
 
Registered: Sep 2005
Location: ireland
Distribution: debian with bits of everything stuck on it
Posts: 114

Rep: Reputation: 15
Huh? This problem is always with the same type of machine? If it is on a variety of different hardware then your having some bad luck, I have never heard of anything like this before. Can you post the output of dmesg?
As for getting it working by changing slots, it has very little to do with the kernel and is almost completely due to the bus controller and bios setting up irq's
Cheers,
Stan
 
Old 03-04-2007, 04:14 PM   #9
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Quote:
Originally Posted by dombrowsky
That's the response I usually get

Summarized like: 1) don't throw stones and 2) it's your hardware problem

Well, I'm not a liar.
No one has accused you of that -- instead, people are trying to offer some assistance. Have you tried disabling the onboard audio/LAN in BIOS as suggested earlier? As I mentioned, if you've got onboard plus a PCI card, they can create conflicts with one another.
 
Old 03-04-2007, 05:03 PM   #10
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
The closest I come to your problem is with Knoppix (which, surprise, I am more likely to use on various computers and, surprise again, it's Debian based).
Shortly after my first run in with Knoppix boot problems (a previous version had worked fine) I happened across a post about using the Knoppix cheat-codes.
Sometimes my network card will not be detected and the sound will go into a weird loop. The "noapic" cheat-code works in this case. I have also had to use the "nodma" code on one PC.
Maybe try passing the "noapic" message to the kernel rather than monkeying with the sound cards. Perhaps check out other messages that can be passed to the kernel. Does anyone have a good reference?
 
Old 03-04-2007, 05:05 PM   #11
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by J.W.
No one has accused you of that -- instead, people are trying to offer some assistance. Have you tried disabling the onboard audio/LAN in BIOS as suggested earlier? As I mentioned, if you've got onboard plus a PCI card, they can create conflicts with one another.
The board doesn't have onboard audio. The machine is an old HP Pavilion 4540, Intel Celeron, not sure of the board. But it really isn't relevant to the issue. I wouldn't be complaining if this happened to me once on one machine. It happens almost every time I setup an economy-priced old machine, and I have to play physical with card locations, each time praying I don't fry the the whole board.

Here's the output of dmesg, but again I still don't think this is machine specific:
http://wiki.linuxquestions.org/wiki/...ort_so_fragile

Quote:
Originally Posted by stan.distortion
As for getting it working by changing slots, it has very little to do with the kernel and is almost completely due to the bus controller and bios setting up irq's
Here's where my knowledge runs out. Sometimes I hear that IRQ's are all software, others say hardware. In the BIOS, I see no place to set IRQ's for any specific PCI slot. I can set the IRQ for the serial ports, or the floppy disk controller, but that's it. I always thought that it was the OS that sets the IRQ's for things like sound and ethernet cards.

I admit that I might be missing something basic about setting up the BIOS that always leads me to this problem. But I usually try every combination of PnP, IRQ settings, enabling/disabling devices, and nothing fixes the problem. The only thing I can do is move the physical card.
 
Old 03-04-2007, 05:24 PM   #12
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
PnP OS setting in BIOS. When turned on - OS is expected to finalize h/w initialization, assign IRQ's and I/O. When turned off - BIOS tries to take care of it. Which does not mean everything is OK. Some BIOS'es are broken, non-standard. Then usually a "Windows Motherboard Driver Disk" is included to make it work under Windows. Often there are h/w restrictions, like two side by side PCI slots cannot have different IRQ's. And so on! In particular older hardware may be tricky to get working.
 
Old 03-04-2007, 05:28 PM   #13
stan.distortion
Member
 
Registered: Sep 2005
Location: ireland
Distribution: debian with bits of everything stuck on it
Posts: 114

Rep: Reputation: 15
for a kernel command reference:
http://www.kernel.org/pub/linux/kern...n_pdf/ch09.pdf
or "how to let the magic smoke out of your hardware if abused guide"
as suggested, try passing different commands to the kernel. a lot of laptop's have similar problems, though rarely to this extent. you can pass commands to the kernel in the grub menu at boot, I would suggest trying pci=usepirqmask first or the equivalent with knoppix's boot functions
cheers,
stan
 
Old 03-04-2007, 05:37 PM   #14
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Not all expansion boards will work the same in each system. The reason is because how the motherboard manufactures uses certain addresses. The second reason is the IRQ. If a expansion card is not capable of sharing its IRQ, it will either will not work or it will not work well. Third reason is the design of the power supply being used may make an expansion card malfunction. As you can see there are many reasons why one expansion card may work in one system and the other will not work at all. Engineers have to count for almost everything. Really there is no such thing of a perfect expansion board. Expansion boards can only be improved to provide better compatibility with hardware.

The are some expansion boards that needs some help from the OS in order for it to work. Usually it is an IRQ and memory address problem. If the BIOS has an option to set IRQ for the expansion boards, I suggest changing this option, so the BIOS sets the IRQ instead the OS.

If the network card is wireless, I strongly recommend using an external wireless NIC or use a wired to wireless bridge (aka access point).

I am sorry to say try other ethernet and sound cards. One or a few combinations should eventually work.

It is not just a Linux problem. Other OS also has the same problems. IMHO, using Linux provides a more realistic test of how compatible the hardware really is.

I heard of this problem and I know exactly what you are going through. I always question myself of certain expansion board that I am buying. When I bought a PCI combo card that contains 1 Gb NIC, USB 2.0, and IEEE-1394 (aka Firewire or i.Link), I was worry about the PCI to PCI bridge chip that it contains. PCI to PCI bridge chips are known to create problems. Luckly it worked or it have not yet make my computer malfunction. Also there are other expansion cards that uses PCI to PCI bridge chips like Hauppauge PVR-500. This card is not compatible with a lot motherboards, so people buying this expansion board are taking chances. This card is supported in Linux by the ivtv project. If the motherobard is not compatible with the PCI to PCI bridge that Hauppauge PVR-500 uses, it will not work.
 
Old 03-04-2007, 06:54 PM   #15
dombrowsky
Member
 
Registered: Dec 2005
Location: New York
Distribution: Debian/GNU
Posts: 235

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Electro
Not all expansion boards will work the same in each system. The reason is because how the motherboard manufactures uses certain addresses. The second reason is the IRQ. If a expansion card is not capable of sharing its IRQ, it will either will not work or it will not work well. Third reason is the design of the power supply being used may make an expansion card malfunction.
Judging from the very informative responses, I'm guessing that the following are true:

1) PnP should always be disabled (or set to "Other OS" in the dumb wintel boards). I've always done this, but was wondering if it was still true.

2) Attempt to assign IRQ's in the BIOS. Make sure that no IRQs are shared (unless you know specifically that the driver and card can share an IRQ).

3) Pray

I'm still curious why swapping physical locations of the card would make it magically work. Perhaps the machine will only work if the sound card (which is as old as the machine) only works in the originally installed slot?

I'm also wondering if this is just a anomaly of >5 year old wintel boards, or a shortcoming of Linux hardware support? I say nothing bad about kernel developers, but will this forever be a problem so long as board and card manufacturers continue to try and keep their products secret? And if so, is there any way to detect the error in the kernel?

Last edited by dombrowsky; 03-04-2007 at 08:41 PM.
 
  


Reply

Tags
kernel, linux, pci



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux support PCI Express? TigerLinux Linux - Hardware 2 09-22-2005 08:40 AM
Wireless PCI cards with Linux RFMon support mhbengal Linux - Wireless Networking 1 01-05-2005 02:09 PM
802.11g PCI Card support under Linux Shockmaster Linux - Hardware 1 06-08-2004 08:38 PM
WLAN PCI cards that have good linux support? troykent Linux - Wireless Networking 2 05-03-2004 07:54 AM
linux more fragile to abnormal shutdown? nutshell Linux - General 23 03-10-2002 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration