How to install a driver manually in Ubuntu?

BES

Distinguished
Dec 13, 2007
69
1
18,635
I am a newbie with this OS, could someone please explain to me how to get a driver installed and working?

The network card I have is a Realtek RTL8111E onboard, for some reason I don't think Ubuntu detected the card properly since it tries to connect..then goes offline ...

#1: I don't know how to "see" a hardware list to see whats working ...

#2: I don't know how to open a "terminal"

#3: I have the new linux driver from the Realtek website already...

#4: The Ubuntu Install is a standard 30gig ...I installed it using Wubi through Windows 7..

#5: If it helps, these are the specs of my system:

CPU - AMD FX-8150
Motherboard - GA-990FXA-UD5 (F7N Beta Bios)
RAM - 12Gigs DDR3 1600Mhz
Graphics - Crossfire HD6950's

#6: I also don't know how to install Catalyst 12.3 Linux drivers ... that's a file with ".run" at the end but it still does nothing when trying to open it..

 
That particular NIC can be a pain. Have a look at: http://unixblogger.wordpress.com/2011/10/18/the-pain-of-an-realtek-rtl8111rtl8168-ethernet-card/

As for your other install problem, you do need to open a terminal; have a look at: https://help.ubuntu.com/community/UsingTheTerminal (Google is pretty good at finding these things.) Then try changing to the directory containing the file (use the "cd" command) and typing:

sudo sh ./filename.run

(substitute the appropriate filename).

This sort of stuff is documented in the official Ubuntu documentation. Read it!
 

BES

Distinguished
Dec 13, 2007
69
1
18,635



Thanks for the help..ill check that stuff out ... I did a search but wasn't sure if I had the right info, so I wanted to ask here...

Linux is getting better, but it still seems to be a bit of work ...especially to get the drivers going, thanks again
 
Not really. the kernel contains drivers for just about anything (and if not in the kernel driver is usually available somewhere else), its just that the driver for RTL8111E included in ubuntu <12.04 is too old (actually it is written for a different chipset) and doesn't support your card (properly).

This is fixed in 12.04+
 

Mu33rto

Distinguished
Sep 6, 2011
227
0
18,710
Plus linux supports many more platforms that windows won't bother to support. And if the kernel doesn't recognize the hardware just recompile the kernel with the driver as a module or built in.
 

BES

Distinguished
Dec 13, 2007
69
1
18,635
Got it working ..well the network card driver.. was easier than I thought..

just hit... ctrl + alt + T ... for the terminal, then typed in sudo -s ..then my password.. then typed in : apt-get install build-essential <---that took a few tries since the connection was nuts... I removed the old driver... then just typed in instmod /home/"my user name"/Desktop/r8168-8.029.00/src/r8168.ko ....then I added it to run on startup..

I restarted the computer..then clicked on the connections area and clicked on "auto network" ...now its working perfect... im typing from it now..

So the link ijack provided was extremely helpful ... thanks


The video card driver worked also ... typed what you said
sh /home/"my user name"/Desktop/driver.run after I was already in sudo -s

I bookmarked all this info on my laptop!
 

BES

Distinguished
Dec 13, 2007
69
1
18,635
I jumped the gun a little bit since im still having a problem, after a few restarts the device shows up on the list but the "auto network" doesn't work now...

Also this:
8. Make it available for boot
To always use the new module, you have to make a new initrd boot file. Just do

mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`

in a terminal. Here we make the initrd file with the help of the “uname -r” command, which allows us to get the version of the actually running kernel.
At least, you have to add in the “/etc/modules” file a new entry, which is called “r8168″, to get the driver automatically loaded after boot. As an alternative you can do the last step again with only one command:

echo “r8168″ >> /etc/modules

I assumed would make it show up on the top GUI so I could at least click on something to get it running again, but it says "no connections available"

its showing up in the hardware list though:

07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard
Flags: bus master, fast devsel, latency 0, IRQ 11
I/O ports at 9e00
Memory at fd7ff000 (64-bit, prefetchable) [size=4K]
Memory at fd7f8000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 12-34-56-78-12-34-56-78
Kernel modules: r8169

But I just noticed its still using Kernel modules from r8169 ...thought I got rid of that ...
 

BES

Distinguished
Dec 13, 2007
69
1
18,635


Well for some reason the "blacklist" command seems to be missing, so I wasn't able to blacklist it .... I used modprobe -r the first time instead .... but that didn't work because its still there, and it wont remove because I check it after using that command ..with lspci -v ..
 

Mu33rto

Distinguished
Sep 6, 2011
227
0
18,710
blacklist its not a cmd its a file you have to edit with the modules you want to blacklist.

/etc/modprobe.d/blacklist then run update-modules it might be different in ubuntu.

you have to use "lsmod | grep r8169" or "lsmod" to find modules that are running
"lspci -v" only list the devices attached to PCI buses

You can also create a small script to remove running module and insert new module at startup.
#! /bin/bash
modprobe -r r8169
modprobe /home/"my user name"/Desktop/r8168-8.029.00/src/r8168.ko

blacklist will not work since you replace the old driver with the new one. So you would be blocking the new driver from loading if you blacklist it. The script will work but will require you to make it executable 1st and add it to startup.
 

BES

Distinguished
Dec 13, 2007
69
1
18,635



So far I got it working again, but the device info still says r8169, no speed problems so far ...getting my normal 3mb/s

I restarted the computer and it is still working, thanks.