Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, December 21, 2007

NETDEV WATCHDOG: eth0: transmit timed out

Recently I encountered a problem with my desktop computer running Ubuntu 7.10 Gutsy Gibbon.

After some time network would die and the only way to bring it back was to restart the computer.
Nothing worked:
  • NetworkManager
  • sudo /etc/init.d/networking restart
  • reloading kernel modules
Looking into the /var/syslog I found this:
Dec 7 08:09:36 moonbiter kernel: [ 3751.383550] NETDEV WATCHDOG: eth0: transmit timed out
Dec 7 08:09:36 moonbiter kernel: [ 3751.383626] eth0: Transmit timed out, status 0003, PHY status 786d, resetting...
Dec 7 08:09:36 moonbiter kernel: [ 3751.383939] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
I have two ethernet cards: one builtin and one in a PCI slot (lspci comes in handy):
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 7c)
05:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

Googling around provided with a lot of contradicting solutions. None of them worked. Finally, on one of the forums I found an advice to check IRQs. Indeed this could have been the problem. I recently bought nVidia GeForce 7300 GT and to fit it in I had to move my Realtek ethernet adapter to another PCI slot.

Looking into /proc/interrupts I found:
CPU0
0: 46332 IO-APIC-edge timer
1: 155 IO-APIC-edge i8042
6: 5 IO-APIC-edge floppy
7: 0 IO-APIC-edge parport0
8: 0 IO-APIC-edge rtc
9: 0 IO-APIC-fasteoi acpi
12: 1617 IO-APIC-edge i8042
14: 15664 IO-APIC-edge ide0
15: 1242 IO-APIC-edge ide1
17: 717 IO-APIC-fasteoi eth1, HDA Intel
20: 0 IO-APIC-fasteoi uhci_hcd:usb1
21: 0 IO-APIC-fasteoi sata_via, uhci_hcd:usb3, ehci_hcd:usb5
22: 0 IO-APIC-fasteoi uhci_hcd:usb2
23: 13202 IO-APIC-fasteoi uhci_hcd:usb4, eth0
24: 13183 IO-APIC-fasteoi nvidia
NMI: 0
LOC: 46223
ERR: 0

And in /var/syslog
Dec 7 06:59:06 moonbiter kernel: [ 1637.162744] irq 23: nobody cared (try booting with the "irqpoll" option)
Dec 7 06:59:06 moonbiter kernel: [ 1637.162748]
Dec 7 06:59:06 moonbiter kernel: [ 1637.162749] Call Trace:
Dec 7 06:59:06 moonbiter kernel: [ 1637.162751] [__report_bad_irq+30/128] __report_bad_irq+0x1e/0x80
Dec 7 06:59:06 moonbiter kernel: [ 1637.162770] [note_interrupt+643/704] note_interrupt+0x283/0x2c0
Dec 7 06:59:06 moonbiter kernel: [ 1637.162777] [handle_fasteoi_irq+221/272] handle_fasteoi_irq+0xdd/0x110
Dec 7 06:59:06 moonbiter kernel: [ 1637.162897] [_end+129724926/2130332920] :nvidia:_nv003707rm+0x1f/0x27
Dec 7 06:59:06 moonbiter kernel: [ 1637.162904] [do_IRQ+123/256] do_IRQ+0x7b/0x100
Dec 7 06:59:06 moonbiter kernel: [ 1637.162909] [ret_from_intr+0/10] ret_from_intr+0x0/0xa
Dec 7 06:59:06 moonbiter kernel: [ 1637.162914] [pci_conf1_read+0/272] pci_conf1_read+0x0/0x110
Dec 7 06:59:06 moonbiter kernel: [ 1637.162921] [__do_softirq+84/224] __do_softirq+0x54/0xe0
Dec 7 06:59:06 moonbiter kernel: [ 1637.162929] [call_softirq+28/48] call_softirq+0x1c/0x30
Dec 7 06:59:06 moonbiter kernel: [ 1637.162933] [do_softirq+53/144] do_softirq+0x35/0x90
Dec 7 06:59:06 moonbiter kernel: [ 1637.162937] [do_IRQ+128/256] do_IRQ+0x80/0x100
Dec 7 06:59:06 moonbiter kernel: [ 1637.162942] [ret_from_intr+0/10] ret_from_intr+0x0/0xa
Dec 7 06:59:06 moonbiter kernel: [ 1637.162944] [_end+127707073/2130332920] :processor:acpi_processor_idle+0x25f/0x456
Dec 7 06:59:06 moonbiter kernel: [ 1637.162964] [_end+127707063/2130332920] :processor:acpi_processor_idle+0x255/0x456
Dec 7 06:59:06 moonbiter kernel: [ 1637.162971] [_end+127706466/2130332920] :processor:acpi_processor_idle+0x0/0x456
Dec 7 06:59:06 moonbiter kernel: [ 1637.162976] [cpu_idle+112/192] cpu_idle+0x70/0xc0
Dec 7 06:59:06 moonbiter kernel: [ 1637.162982] [start_kernel+645/784] start_kernel+0x285/0x310
Dec 7 06:59:06 moonbiter kernel: [ 1637.162987] [x86_64_start_kernel+286/352] _sinittext+0x11e/0x160
Dec 7 06:59:06 moonbiter kernel: [ 1637.162991]
Dec 7 06:59:06 moonbiter kernel: [ 1637.162992] handlers:
Dec 7 06:59:06 moonbiter kernel: [ 1637.162994] [_end+128326184/2130332920] (usb_hcd_irq+0x0/0x60 [usbcore])
Dec 7 06:59:06 moonbiter kernel: [ 1637.163010] [_end+128535048/2130332920] (rhine_interrupt+0x0/0xc70 [via_rhine])
Dec 7 06:59:06 moonbiter kernel: [ 1637.163017] Disabling IRQ #23

So irq assigned to eth0 was disabled ...
Following advice from the forum I added "noapic" boot option to my /boot/grub/menu.lst
And now network is solid stable again :D.

Just to see how /proc/interrupts looks now:
CPU0
0: 145441 XT-PIC-XT timer
1: 1186 XT-PIC-XT i8042
2: 0 XT-PIC-XT cascade
4: 0 XT-PIC-XT uhci_hcd:usb3, ehci_hcd:usb5
5: 24510 XT-PIC-XT uhci_hcd:usb1, uhci_hcd:usb4, eth0
6: 5 XT-PIC-XT floppy
7: 47352 XT-PIC-XT parport0
8: 0 XT-PIC-XT rtc
9: 0 XT-PIC-XT acpi
10: 48019 XT-PIC-XT nvidia
11: 740 XT-PIC-XT sata_via, uhci_hcd:usb2, eth1, HDA Intel
12: 7125 XT-PIC-XT i8042
14: 51693 XT-PIC-XT ide0
15: 5002 XT-PIC-XT ide1
NMI: 0
LOC: 145342
ERR: 4

I'm not too happy with this solution but it works...

Thursday, June 14, 2007

Restoring grub in MBR

There is a lot of stuff about this.

But of course none worked for me :-D.
So I decided to post a solution that worked ;-).
  1. Boot with any live CD (I've done it with Knoppix 3.x and Ubuntu)
  2. Prepare directory for mounting:
    $ sudo mkdir /mnt/ubuntu
  3. Mount the root (/) partition of ubuntu e.g.:
    $ sudo mount /dev/hda5 /mnt/ubuntu
  4. Mount proc and dev filesystems on mounted partition:
    $ mount -o bind /dev /mnt/ubuntu/dev
    $ mount -o bind /proc /mnt/ubuntu/proc
  5. If /boot is on seperate partition mount it:
    $ sudo mount /dev/hda4 /mnt/ubuntu/boot
  6. Chroot the mounted partition:
    $ chroot /mnt/ubuntu
  7. Populate /etc/mtab:
    $ sudo cp /proc/mounts /etc/mtab
  8. $ sudo grub-install /dev/hda
  9. Exit the shell
  10. Reboot
Hope that it'll help someone ;-)

Tuesday, March 13, 2007

Unlock the Gnome keyring upon login - Xubuntu

As many people already noticed NetworManager uses gnome-keyring to store password for different wireless networks. This is already true for Dapper Drake.

In Edgy and Feisty more and more programs start to use gnome-keyring for the same purpose. To name a few: Evolution, Gajim.

This is quite annoying because one has to unlock the keyring database every time one logs in. On my desktop with freshly installed Feisty I use only Gajim from those three. Which makes storing my google talk password virtually useless.

Fortunately there is a solution: pam-keyring.
Here you'll find how to install it for Feisty.

Shortly how its done:
sudo apt-get install libpam-keyring
sudo echo "@include common-pamkeyring" >> /etc/pam.d/gdm
Unfortunately it didn't work on my Xubutu at first.
Apparently one has to disable "Launch Gnome services on startup" to make it work.

What seems to happen is that xfce4-session lunches new instance of gnome-keyring-deamon without checking if there is already a running one. This new instance of course does not have the keyring database unlocked by pam-keyring, hence we get the password popup.

I've filled a bug report we'll see what happens...

Thursday, November 23, 2006

Smooth upgrade from Dapper to Edgy on my desktop

Yesterday I've updated OS on my desktop computer.

It's quite old PIII celeron 800MHz with nvidia geforce MX2. OS installed was Ubuntu 6.06 Dapper Drake. Install was almost clean one, with minor tweeking (installed acrobat reader, SUN java, mplayer and few other packages).

I've followed several guides. For pre-upgrade instructions I went with this one: before-upgrading-to-edgy
For installation I went with instructions (command line ones) from here: upgrade-ubuntu-606-dapper-drake-to-ubuntu-10-edgy-eft but I used aptitude instead of apt-get.

Official instructions: EdgyUpgrades
Common problems with solutions: ubuntu-edgy-upgrade-common-problems-with-solutions

So basically it would go like this:
  1. Check if ubuntu-minimal and ubuntu-destktop packages are installed.
  2. Check which packages were installed by hand and if they are probable to cause problems (use common sense ;))
  3. Remove apps that were installed via "make install" and so on (once again use common sense ;))
  4. Edit sources list, and replace dapper with edgy: sudo vim /etc/apt/sources.list
  5. sudo aptitude update
  6. sudo aptitude dist-upgrade
    • Repeat this step until all problems are solved... I had to run it at least four times :)
  7. sudo aptitude -f install
  8. sudo dpkg –configure -a
  9. Reboot the computer
Everything went fine. After the reboot I had running Edgy Eft :D.
So now it's time to install Beryl and show off to my friends that wait for Vista ;).
And then do the same with my laptop. This one will be harder as this install is heavily customized...