Hardware drivers in Linux

For discussing Linux compatible (or not) devices

Moderators: ChrisThornett, LXF moderators

Hardware drivers in Linux

Postby SiriusHardware » Tue Sep 25, 2012 9:51 pm

I don't want to annoy you all, but from my standpoint as a new Linux user, drivers are something which Windows does right, and Linux only does if you're very lucky.

A case in point:

I have a perfectly good Edimax EW-7711 PCI card which installs and works seamlessly in a Windows XP PC, because it came with ready made drivers for that OS.

I've just installed Debian 6 from one of the coverdiscs on LXF a few weeks ago, and I needed a Linux compatible wireless card to put in the machine. I dug out the box for the Edimax 7711 and there on the box is the word 'Linux'.

I put the card in the machine, powered it up, and - you'll no doubt laugh at this - put the CD in the machine, genuinely expecting the OS to notice the card and offer to look around on the CD for the driver. No such thing happened, of course.

If I understand the situation correctly I am expected to MAKE the drivers myself by compiling them - this process in turn apparently requires the presence (on the Linux system) of the Linux kernel source files. I don't think the LXF version of Debian includes them (probably no room on the disc) and so for the time being, I am stumped, since without an internet connection, I can't download the kernel source.

It really shouldn't be this hard...

I now have a 'full' Debian distro install disc on the way to me - as there is only one distro on the disc I am expecting / hoping that it will actually include the source files.
SiriusHardware
 
Posts: 73
Joined: Tue Sep 25, 2012 6:41 pm

Postby lok1950 » Tue Sep 25, 2012 10:39 pm

Most distros do not include the source code on the the install media so they can put more apps on instead ;) You just have to install the kernel source code packages from the distro's repo's as well as a development environment(Compiler ) have a look at the Debian Wiki and forums for specific instructions.

Enjoy the Choice :)
User avatar
lok1950
LXF regular
 
Posts: 1034
Joined: Tue May 31, 2005 5:31 am
Location: Ottawa

Postby nelz » Tue Sep 25, 2012 10:58 pm

Actually, windows supports far less hardware than Linux, which is why manufacturers have to supply drivers on a CD. Drivers for most common hardware, and a lot of uncommon hardware, are already included with the Linux kernel, you shouldn't need to compile them yourself.

I'd be surprised if you needed to with an Edimax card as they tend to stick to standard reference hardware. Which chipset does this particular card use (running lspci in a terminal will help with this), it may be a case of simply needing to install the correct driver or firmware from your package manager.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8504
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Ram » Tue Sep 25, 2012 11:12 pm

His problem is that he's using wireless so unless he can connect via wired he out of luck.

If you can connect via a wired connection you maybe offered the correct driver for your wireless card plus any update that you need.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby dhester » Wed Sep 26, 2012 1:01 am

I have the same edimax card, works great in Linux Various distros) I will look back at my notes and tell you how I installed it.

At present it is in a windows 7 machine, so I will out it in my mint 13 box and pass on my instructions.
dhester
 
Posts: 72
Joined: Thu Feb 19, 2009 6:19 pm

Postby wyliecoyoteuk » Wed Sep 26, 2012 6:41 am

I have never had to compile network drivers on Linux, although I have often had to download drivers for a network card on Windows.
In fact the drivers on the disk are provided by the manufacturer, not Windows.
Linux distros have no control over how the manufacturer distributes its software.
Most drivers in Linux are created or reverse-engineered by the contributors, although some are supplied by manufacturers.
Note that you did not have to install drivers for your motherboard chipset, sound card, disk controller etc, most of which you would need to install from a disc or the internet on Windows.
With wifi especially, there is usually firmware involved as well, which distros are often legally prohibited from distributing.
If you can connect with a wire, the distro will often download the driver and firmware for you without any input.
You may also need to shutdown and restart (not just reboot) before the firmware is loaded for the first time.

Edit: and I would hardly call having to insert a driver CD followed by a reboot "working seamlessly". ;)
Last edited by wyliecoyoteuk on Wed Sep 26, 2012 2:27 pm, edited 1 time in total.
The sig between the asterisks is so cool that only REALLY COOL people can even see it!

*************** ************
User avatar
wyliecoyoteuk
LXF regular
 
Posts: 3460
Joined: Sun Apr 10, 2005 10:41 pm
Location: Birmingham, UK

Postby einonm » Wed Sep 26, 2012 10:09 am

Hi,

Chances are that the driver is already on your system - we can check for that quite easily if you're open to running a terminal and typing a few easy lines into it.

Your distro kernel (debian 6, I presume), would have been built with the majority of drivers available included.

So, could you try posting the terminal output from these commands?

lspci
lsmod
ip link show
ifconfig
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
einonm
 
Posts: 29
Joined: Fri Apr 20, 2012 10:19 am
Location: Cardiff, UK

Postby SiriusHardware » Wed Sep 26, 2012 5:50 pm

wyliecoyoteuk wrote:I have never had to compile network drivers on Linux, although I have often had to download drivers for a network card on Windows.

Edit: and I would hardly call having to insert a driver CD followed by a reboot "working seamlessly". ;)


Yes, I understand (but thanks for reminding me) that the (Windows) hardware manufacturers normally produce the driver and the hardware as a matched set, so Windows doesn't have to know about every piece of hardware ever made. I don't think that's a bad thing. The end user does not care where the compatibility actually comes from, or who provides it, as long as it is there. It could be argued that the device manufacturer is usually the best party to entrust with provision of the drivers, since they know more about their hardware than anyone else.

If you consider having to reboot, remove a CD, put it away and never use it again troublesome, then I can handle troublesome. :-)

Following advice in, of all places, the Raspberry Pi User Guide (possibly the best book I have about Linux at the moment) I searched the internet for Ralink's drivers but the details of the cards supported by Ralink's drivers in the Debian Repo .DEB conspicuously miss mine out. The CD which came with the Edimax 7711 actually does have a Linux folder on it, but it turns out to contain only the means to compile the drivers, etc from source. I'll go into the details of the card more in another reply in this thread.

You are right, though, Linux did manage to get on with more or less everything on my motherboard, although it reports a 'fatal error' when trying to access the GPU during boot - As it's running nicely with a 1024 * 768 desktop display which suits my CRT monitor, I'll deal with that later.
SiriusHardware
 
Posts: 73
Joined: Tue Sep 25, 2012 6:41 pm

Postby Ram » Wed Sep 26, 2012 5:59 pm

Are you able to use a wired connection to the internet with this machine ?

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby einonm » Wed Sep 26, 2012 6:10 pm

Hi,

Everyone appears to be assuming that there is no driver for the PCI card - but that hasn't been ascertained yet. Just because the card is not connecting to the internet, it doesn't necessarily mean there is no driver.

The card is not brand new, and ralink devices are some of the longest supported wireless devices in the kernel.

Could you run those commands I posted earlier to check?
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
einonm
 
Posts: 29
Joined: Fri Apr 20, 2012 10:19 am
Location: Cardiff, UK

Postby SiriusHardware » Wed Sep 26, 2012 6:19 pm

einonm wrote:Hi,

So, could you try posting the terminal output from these commands?

lspci
lsmod
ip link show
ifconfig


Certainly, although this will be a manual transcription ie, reading it off the Linux machine's screen and typing it in here, so some errors or typos may arise.

lspci: Came up with a lot of stuff, so forgive me, I'm not going to type it all in. I assume the entry you will be interested in is this one.

00:0d.0 Network controller: Ralink Device 3060

(There is only one wireless device in the machine).

lsmod: Again lots of entries - I can't see anything in the output from this which relates to the Ralink card. If you can give me a clue as to what sort of entries would be of interest I can pick those out.

ip link show:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:0d:61:2b:0d:e1 brd ff:ff:ff:ff:ff:ff
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether aa:07:95:cf:29:c2 brd ff:ff:ff:ff:ff:ff

ifconfig:

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:278 errors:0 dropped:0 overruns:0 frame:0
TX packets:278 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:25740 (25.1 KiB) TX bytes:25740 (25.1 KiB)
SiriusHardware
 
Posts: 73
Joined: Tue Sep 25, 2012 6:41 pm

Postby SiriusHardware » Wed Sep 26, 2012 6:37 pm

Ram wrote:Are you able to use a wired connection to the internet with this machine ?


Only with extreme difficulty. That was another aspect of Linux installation which didn't exactly cheer me. I installed Debian 6 from one of LXF's coverdisks and assumed, reasonably, that everything needed (to create a working Linux installation) would be on the disc. I installed and reinstalled it several times over several nights, and each time, it failed at the same point: Unable to install any of the bootloaders offered (ie, grub, etc).

The installation only ran as expected (including the installation of the bootloader) on the one occasion I was able to get a wired connection to it (I had to take it somewhere else). At the point where it had been failing, it suddenly worked: It appeared to have been wanting to get something it needed from the internet in order to complete the installation of the bootloader.

Anyway - no, it can be assumed that a wired connection is unavailable to me. The wireless connection I'm using here on the Windows PC is a legitimately shared resource, but I don't have physical access to the router it comes from.

The ideal solution, therefore, is for me to be able to get what I need to enable the Edimax from a general source using this windows machine, which, as you can see, does have a working wi-fi connection.

Unfortunately, that rules out using 'apt-get install firmware-ralink', even if that package supported my card: I'm not sure that it does.
SiriusHardware
 
Posts: 73
Joined: Tue Sep 25, 2012 6:41 pm

Postby einonm » Wed Sep 26, 2012 6:59 pm

SiriusHardware wrote:lspci: Came up with a lot of stuff, so forgive me, I'm not going to type it all in. I assume the entry you will be interested in is this one.

00:0d.0 Network controller: Ralink Device 3060


Brilliant. That's the one I was expecting.

SiriusHardware wrote:lsmod: Again lots of entries - I can't see anything in the output from this which relates to the Ralink card. If you can give me a clue as to what sort of entries would be of interest I can pick those out.


I'm expecting something like rt2x00pci, rt61, or at least mac80211. This driver has been around since the 2.4 kernel, I'd be surprised if it wasn't there. The only thing that may prevent it from starting is if there is no firmware for the device available, so can you also try:

dmesg | grep "rt2x00"

and

dmesg | grep "rt61"
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
einonm
 
Posts: 29
Joined: Fri Apr 20, 2012 10:19 am
Location: Cardiff, UK

Postby einonm » Wed Sep 26, 2012 7:08 pm

If you do not have the firmware package, you can download it from http://packages.debian.org/squeeze/all/firmware-ralink/download then move it to the Debian machine via USB stick.

Clicking on the file in the GUI file explorer should install it.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
einonm
 
Posts: 29
Joined: Fri Apr 20, 2012 10:19 am
Location: Cardiff, UK

Postby SiriusHardware » Wed Sep 26, 2012 7:16 pm

einonm wrote:
Brilliant. That's the one I was expecting.
can you also try:

dmesg | grep "rt2x00"

and

dmesg | grep "rt61"


Yes. Nothing came back on any of these, I'm afraid (ie, the computer absorbed the command without any response, which I assume means that no match was found).

I gather that case is a matter of life and death in Linux so I was careful to type your examples exactly as you gave them. I also tried mac80211 - no luck there either.
SiriusHardware
 
Posts: 73
Joined: Tue Sep 25, 2012 6:41 pm

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 2 guests