staging.inyokaproject.org

Netzwerkadapter in Dockingstation nicht immer verfügbar

Status: Gelöst | Ubuntu-Version: Ubuntu 12.04 (Precise Pangolin)
Antworten |

b-a-x-t-e-r

Anmeldungsdatum:
31. Mai 2011

Beiträge: 16

Hallo Community,

der Titel des Themas ist leider etwas undeutlich, aber mein Problem lässt sich leider schlecht in einem Satz zusammenfassen. Also, folgendermaßen sieht's aus:

Ich nutze Ubuntu auf meinem Notebook, das ich teilweise in einer Dockingstation nutze. Die Dockingstation hat einen Netzwerkadapter integriert, den ich nutzen möchte, wenn das Notebook eingedockt ist - in allen anderen Fälle soll WiFi genutzt werden. Das funktioniert auch soweit alles ganz wunderbar, wenn ich das Notebook in der Dockingstation boote. Es werden drei Netzwerkadapter erkannt (eth0 im NB, eth1 im Dock und wlan0), sowohl eth1 und wlan0 verbinden sich und Ubuntu scheint automatisch die schnellere Verbindung (eth1) zu nutzen. Beim ausdocken wird korrekt auf WiFi gewechselt.

Wenn ich das Notebook ausgedockt boote, stehen nur eth0 und wlan0 zu Verfügung - soweit okay. Wenn ich das Notebook dann eindocke, wird aber nicht eth1 aktiviert, sondern weiterhin wlan0 genutzt - ifconfig zeigt nicht mal eth1 an, der Netzwerkadapter steht also offensichtlich einfach nicht zur Verfügung. Kann man da was machen?

Ich bin mir nicht sicher, ob's bei 11.10 anders war, da ich die Dockingstation erst zeitgleich mit der Installation von 12.04 wired angebunden habe. Falls es eine Rolle spielt: ich habe 12.04 vollständig neu aufgesetzt und kein Upgrade durchgeführt.

Und noch ein paar technische Details:

uname -a
3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
aus der 70-persistent-net.rules
eth0: PCI device 0x11ab:/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0 (sky2)
eth1: PCI device 0x11ab:/sys/devices/pci0000:00/0000:00:1c.3/0000:06:00.0 (sky2)
lspci -nnk | grep -i net -A2 (Auszug, eth1 fehlt)
02:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller [11ab:4354] (rev 12)
	Subsystem: Sony Corporation Device [104d:9033]
	Kernel driver in use: sky2

Ich bin für jeden Tipp dankbar!

b-a-x-t-e-r

elektronenblitz63

Avatar von elektronenblitz63

Anmeldungsdatum:
16. Januar 2007

Beiträge: 29307

Hallo,
PCI-Karten sind nicht hot-Plug fähig, Du musst den Rechner also schon in der Dockingstation booten wenn Du die entsprechende Karte verwenden willst.

b-a-x-t-e-r

(Themenstarter)

Anmeldungsdatum:
31. Mai 2011

Beiträge: 16

Hallo,

vielen Dank für deine Antwort elektronenblitz63. Ich bin allerdings gerade auf den folgenden Thread gestoßen, der mich noch hoffen lässt: http://forum.ubuntuusers.de/topic/sony-dockingstation-und-pci-hotplug/#post-2810505 - dort heißt es "Ein ausreichend neuer Kernel sollte genügen". Auch lese ich aus der (jetzt vollständigen) lspci-Ausgabe jeweils "PCI-E(xpress)" raus, damit müsste das doch möglich sein?

02:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller [11ab:4354] (rev 12)
	Subsystem: Sony Corporation Device [104d:9033]
	Kernel driver in use: sky2

06:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88E8055 PCI-E Gigabit Ethernet Controller [11ab:4363] (rev 14)
	Subsystem: Sony Corporation Device [104d:9034]
	Kernel driver in use: sky2

Danke und Grüße

elektronenblitz63

Avatar von elektronenblitz63

Anmeldungsdatum:
16. Januar 2007

Beiträge: 29307

Das wird nicht gehen, da die Karte ja bereits durch das BIOS erkannt und eingebunden sein muss. PCI-rescan dürfte, wenn überhaupt, nur funktionieren wenn der Rechner also im Dock gebootet wurde, dann aus dem Dock entfernt und wieder neu angedockt wird.

Als einfache Lösung bietet sich ein USB-to-Ethernet Adapter an.

b-a-x-t-e-r

(Themenstarter)

Anmeldungsdatum:
31. Mai 2011

Beiträge: 16

Deine Aussage scheint nicht ganz richtig zu sein. Ich habe die Ansätze aus dem verlinkten Thread nun noch einmal getestet und siehe da, mit einem Rescan wird die Karte erkannt, auch wenn das Notebook außerhalb der Dockingstation gebootet wurde.

echo 1 > /sys/bus/pci/rescan

Mehr ist nicht notwendig, es wird sofort eine saubere Verbindung hergestellt.

Die Frage ist nun eher, warum das nicht automatisch passiert - nach dem was ich bisher gelesen habe, wäre das der Soll-Zustand.

elektronenblitz63

Avatar von elektronenblitz63

Anmeldungsdatum:
16. Januar 2007

Beiträge: 29307

b-a-x-t-e-r schrieb:

Deine Aussage scheint nicht ganz richtig zu sein. Ich habe die Ansätze aus dem verlinkten Thread nun noch einmal getestet und siehe da, mit einem Rescan wird die Karte erkannt, auch wenn das Notebook außerhalb der Dockingstation gebootet wurde.

Das hätte ich nicht gedacht, aber man lernt ja nie aus.

Registriert das Udev-System etwas wenn der Rechner angedockt wird?

udevadm monitor

b-a-x-t-e-r

(Themenstarter)

Anmeldungsdatum:
31. Mai 2011

Beiträge: 16

Udev tut 'ne ganze Menge beim Eindocken:

KERNEL[177.622531] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
UDEV  [177.625708] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
KERNEL[177.778271] add      /devices/LNXSYSTM:00/device:00/PNP0C15:00 (acpi)
KERNEL[177.778358] change   /devices/platform/dock.0 (platform)
UDEV  [177.780909] change   /devices/platform/dock.0 (platform)
UDEV  [177.783161] add      /devices/LNXSYSTM:00/device:00/PNP0C15:00 (acpi)
KERNEL[178.184595] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4 (usb)
KERNEL[178.186950] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0 (usb)
UDEV  [178.191067] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4 (usb)
UDEV  [178.193262] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0 (usb)
KERNEL[178.494559] change   /devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1 (power_supply)
UDEV  [178.499859] change   /devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1 (power_supply)
KERNEL[178.540168] change   /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
UDEV  [178.541186] change   /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
KERNEL[178.584329] remove   /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
KERNEL[178.584354] remove   /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[178.584366] remove   /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[178.584378] remove   /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
KERNEL[178.584390] remove   /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[178.584401] remove   /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[178.584413] remove   /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[178.584424] remove   /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [178.584690] remove   /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
UDEV  [178.585088] remove   /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [178.585107] remove   /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
UDEV  [178.585490] remove   /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
UDEV  [178.585506] remove   /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
UDEV  [178.585518] remove   /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
UDEV  [178.585531] remove   /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [178.585560] remove   /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[178.587963] add      /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
KERNEL[178.587988] add      /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[178.588018] add      /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[178.588030] add      /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [178.588436] add      /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
UDEV  [178.588518] add      /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
UDEV  [178.588621] add      /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
UDEV  [178.589157] add      /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
KERNEL[178.590041] add      /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[178.590061] add      /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[178.590073] add      /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[178.590084] add      /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [178.591383] add      /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
UDEV  [178.591403] add      /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
UDEV  [178.591416] add      /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
UDEV  [178.591429] add      /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
KERNEL[178.592841] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2 (usb)
KERNEL[178.594819] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0 (usb)
UDEV  [178.610255] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2 (usb)
KERNEL[178.657493] add      /module/hid (module)
UDEV  [178.657675] add      /module/hid (module)
KERNEL[178.657926] add      /bus/hid (bus)
UDEV  [178.657945] add      /bus/hid (bus)
KERNEL[178.657992] add      /class/hidraw (class)
UDEV  [178.658285] add      /class/hidraw (class)
KERNEL[178.660696] add      /module/usbhid (module)
UDEV  [178.660870] add      /module/usbhid (module)
KERNEL[178.661002] add      /bus/hid/drivers/generic-usb (drivers)
UDEV  [178.661152] add      /bus/hid/drivers/generic-usb (drivers)
KERNEL[178.661263] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/0003:046D:C043.0001 (hid)
KERNEL[178.664593] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10 (input)
KERNEL[178.664691] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10/mouse2 (input)
KERNEL[178.664753] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10/event10 (input)
KERNEL[178.664832] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/0003:046D:C043.0001/hidraw/hidraw0 (hidraw)
KERNEL[178.664884] add      /bus/usb/drivers/usbhid (drivers)
UDEV  [178.665050] add      /bus/usb/drivers/usbhid (drivers)
UDEV  [178.665278] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0 (usb)
UDEV  [178.667608] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/0003:046D:C043.0001 (hid)
UDEV  [178.668398] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/0003:046D:C043.0001/hidraw/hidraw0 (hidraw)
UDEV  [178.668746] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10 (input)
UDEV  [178.670390] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10/mouse2 (input)
UDEV  [178.671721] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10/event10 (input)
KERNEL[178.684354] remove   /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
KERNEL[178.684381] remove   /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[178.684394] remove   /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[178.684406] remove   /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
KERNEL[178.684418] remove   /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[178.684430] remove   /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[178.684442] remove   /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[178.684454] remove   /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [178.685411] remove   /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
UDEV  [178.685433] remove   /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
UDEV  [178.685447] remove   /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
UDEV  [178.685460] remove   /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [178.685472] remove   /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
UDEV  [178.685485] remove   /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
UDEV  [178.685498] remove   /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [178.685510] remove   /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[178.692637] add      /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
KERNEL[178.692661] add      /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[178.692674] add      /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[178.692685] add      /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [178.693663] add      /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [178.693784] add      /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
UDEV  [178.693910] add      /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
UDEV  [178.694029] add      /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[178.707913] add      /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[178.707938] add      /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[178.707951] add      /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[178.707962] add      /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [178.708373] add      /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
UDEV  [178.708499] add      /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [178.708621] add      /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
UDEV  [178.708740] add      /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[178.922590] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3 (usb)
KERNEL[178.923385] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0 (usb)
KERNEL[178.923409] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/0003:046A:0023.0002 (hid)
KERNEL[178.923426] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1 (usb)
KERNEL[178.923442] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/0003:046A:0023.0003 (hid)
UDEV  [178.935302] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3 (usb)
UDEV  [178.936592] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1 (usb)
UDEV  [178.937179] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0 (usb)
KERNEL[179.070892] add      /module/hid_cherry (module)
UDEV  [179.071193] add      /module/hid_cherry (module)
KERNEL[179.074763] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/input/input11 (input)
KERNEL[179.074861] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/input/input11/event11 (input)
KERNEL[179.074930] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/0003:046A:0023.0002/hidraw/hidraw1 (hidraw)
UDEV  [179.077366] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/input/input11 (input)
UDEV  [179.079055] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/input/input11/event11 (input)
KERNEL[179.080386] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/input/input12 (input)
UDEV  [179.080567] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/0003:046A:0023.0003 (hid)
KERNEL[179.081184] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/input/input12/event12 (input)
KERNEL[179.081294] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/0003:046A:0023.0003/hidraw/hidraw2 (hidraw)
KERNEL[179.081352] add      /bus/hid/drivers/cherry (drivers)
UDEV  [179.081843] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/0003:046A:0023.0003/hidraw/hidraw2 (hidraw)
UDEV  [179.082249] add      /bus/hid/drivers/cherry (drivers)
UDEV  [179.086153] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/0003:046A:0023.0002 (hid)
UDEV  [179.086862] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/0003:046A:0023.0002/hidraw/hidraw1 (hidraw)
UDEV  [179.087433] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/input/input12 (input)
UDEV  [179.088973] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/input/input12/event12 (input)

Bei einem PCI-Rescan passiert noch folgendes:

KERNEL[384.885137] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0 (pci)
KERNEL[384.886576] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1 (net)
UDEV  [384.886633] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0 (pci)
KERNEL[384.886673] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1/queues/rx-0 (queues)
KERNEL[384.886708] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1/queues/tx-0 (queues)
UDEV  [384.897557] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1 (net)
UDEV  [384.897932] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1/queues/tx-0 (queues)
UDEV  [384.898204] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1/queues/rx-0 (queues)

elektronenblitz63

Avatar von elektronenblitz63

Anmeldungsdatum:
16. Januar 2007

Beiträge: 29307

Ok, ich denke an eine Möglichkeit den Rescan bei einem Udev-Event automatisch auszulösen.

Mal ausprobieren.

Skript anlegen und ausführbar machen:

sudo touch /usr/sbin/pci_rescan.sh
sudo chmod +x /usr/sbin/pci_rescan.sh
gksu gedit /usr/sbin/pci_rescan.sh 

Inhalt:

#!/bin/bash
echo 1 | tee /sys/bus/pci/rescan
exit 0

Udev-Regel anlegen:

sudo touch /etc/udev/rules.d/10-docking_event.rules
gksu gedit /etc/udev/rules.d/10-docking_event.rules 

Inhalt:

# UDEV-Rule for Docking Events
# System rescant PCI-Bus

ACTION=="add", GOTO="bus_rescan"

LABEL="bus_rescan"
SUBSYSTEM=="pci", RUN+="/usr/sbin/pci_rescan.sh"
SUBSYSTEM=="usb", RUN+="/usr/sbin/pci_rescan.sh"
SUBSYSTEM=="net", RUN+="/usr/sbin/pci_rescan.sh"
    
GOTO="udev_end"

LABEL="udev_end"

Da ich jetzt nicht genau testen kann welches Event funktioniert (pci/usb/net) habe ich Einträge für alle drei angelegt. Musst Du selbst ausprobieren.

Udev-System neu starten:

sudo service udev reload
sudo service udev restart 

Andocken. Ob etwas passiert erkennt man am Zeitstempel der /sys/bus/pci/rescan und natürlich daran ob die Netzwerkkarte der Dockingstation direkt funktioniert.

b-a-x-t-e-r

(Themenstarter)

Anmeldungsdatum:
31. Mai 2011

Beiträge: 16

Perfekt, der Ansatz klappt - danke!

Ich habe allerdings nach etwas Recherche die 10-docking_event.rules noch etwas anders aufgebaut:

KERNEL=="dock.0", ATTR{docked}=="1", RUN+="/usr/sbin/pci_rescan.sh"

Das läuft ganz wunderbar, anbei noch die Udev-Reaktion.

KERNEL[176.219443] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
UDEV  [176.222033] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
KERNEL[176.381578] add      /devices/LNXSYSTM:00/device:00/PNP0C15:00 (acpi)
KERNEL[176.381807] change   /devices/platform/dock.0 (platform)
UDEV  [176.384595] add      /devices/LNXSYSTM:00/device:00/PNP0C15:00 (acpi)
KERNEL[176.416423] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0 (pci)
UDEV  [176.416938] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0 (pci)
KERNEL[176.416969] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1 (net)
KERNEL[176.417953] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1/queues/rx-0 (queues)
KERNEL[176.418093] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1/queues/tx-0 (queues)
UDEV  [176.424127] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1 (net)
UDEV  [176.431470] change   /devices/platform/dock.0 (platform)
UDEV  [176.437323] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1/queues/tx-0 (queues)
UDEV  [176.441313] add      /devices/pci0000:00/0000:00:1c.3/0000:06:00.0/net/eth1/queues/rx-0 (queues)
KERNEL[176.756900] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4 (usb)
KERNEL[176.757082] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0 (usb)
UDEV  [176.763118] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4 (usb)
UDEV  [176.763815] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0 (usb)
KERNEL[177.091133] change   /devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1 (power_supply)
UDEV  [177.096530] change   /devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1 (power_supply)
KERNEL[177.143335] change   /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
UDEV  [177.144327] change   /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
KERNEL[177.160286] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2 (usb)
KERNEL[177.160751] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0 (usb)
UDEV  [177.174880] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2 (usb)
KERNEL[177.180249] remove   /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
KERNEL[177.180275] remove   /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[177.180287] remove   /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[177.180300] remove   /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
KERNEL[177.180312] remove   /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[177.180324] remove   /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[177.180335] remove   /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[177.180347] remove   /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [177.188617] remove   /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
UDEV  [177.189369] remove   /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
UDEV  [177.189457] remove   /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [177.191122] remove   /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [177.191146] remove   /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
UDEV  [177.191159] remove   /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
UDEV  [177.191173] remove   /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
UDEV  [177.191485] remove   /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[177.192162] add      /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
KERNEL[177.192183] add      /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[177.192195] add      /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[177.192207] add      /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [177.193300] add      /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
UDEV  [177.193324] add      /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
UDEV  [177.193618] add      /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
UDEV  [177.193636] add      /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
KERNEL[177.196293] add      /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[177.196319] add      /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[177.196332] add      /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[177.196345] add      /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [177.196862] add      /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
UDEV  [177.196881] add      /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [177.196895] add      /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
UDEV  [177.196907] add      /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[177.235129] add      /module/hid (module)
UDEV  [177.235156] add      /module/hid (module)
KERNEL[177.235169] add      /bus/hid (bus)
KERNEL[177.235182] add      /class/hidraw (class)
UDEV  [177.235307] add      /class/hidraw (class)
UDEV  [177.235324] add      /bus/hid (bus)
KERNEL[177.256034] add      /module/usbhid (module)
UDEV  [177.256060] add      /module/usbhid (module)
KERNEL[177.256074] add      /bus/hid/drivers/generic-usb (drivers)
KERNEL[177.256091] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/0003:046D:C043.0001 (hid)
UDEV  [177.256105] add      /bus/hid/drivers/generic-usb (drivers)
KERNEL[177.259794] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10 (input)
KERNEL[177.259882] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10/mouse2 (input)
KERNEL[177.259942] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10/event10 (input)
KERNEL[177.260026] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/0003:046D:C043.0001/hidraw/hidraw0 (hidraw)
KERNEL[177.260096] add      /bus/usb/drivers/usbhid (drivers)
UDEV  [177.260281] add      /bus/usb/drivers/usbhid (drivers)
UDEV  [177.260627] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0 (usb)
UDEV  [177.261017] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/0003:046D:C043.0001 (hid)
UDEV  [177.261444] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/0003:046D:C043.0001/hidraw/hidraw0 (hidraw)
UDEV  [177.263835] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10 (input)
UDEV  [177.265424] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10/mouse2 (input)
UDEV  [177.266412] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/input/input10/event10 (input)
KERNEL[177.280125] remove   /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
KERNEL[177.280151] remove   /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[177.280164] remove   /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[177.280176] remove   /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
KERNEL[177.280187] remove   /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[177.280199] remove   /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[177.280211] remove   /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[177.280222] remove   /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [177.280705] remove   /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [177.280724] remove   /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
UDEV  [177.280785] remove   /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
UDEV  [177.280837] remove   /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
UDEV  [177.280917] remove   /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
UDEV  [177.281001] remove   /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
UDEV  [177.281068] remove   /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [177.281135] remove   /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[177.283541] add      /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
KERNEL[177.283564] add      /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
KERNEL[177.283577] add      /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[177.283588] add      /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [177.283844] add      /devices/system/cpu/cpu0/cpuidle/state0 (cpu)
UDEV  [177.283921] add      /devices/system/cpu/cpu0/cpuidle/state1 (cpu)
UDEV  [177.284094] add      /devices/system/cpu/cpu0/cpuidle/state3 (cpu)
UDEV  [177.284160] add      /devices/system/cpu/cpu0/cpuidle/state2 (cpu)
KERNEL[177.284923] add      /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
KERNEL[177.284943] add      /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
KERNEL[177.284956] add      /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[177.284968] add      /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [177.285288] add      /devices/system/cpu/cpu1/cpuidle/state0 (cpu)
UDEV  [177.285306] add      /devices/system/cpu/cpu1/cpuidle/state1 (cpu)
UDEV  [177.285355] add      /devices/system/cpu/cpu1/cpuidle/state3 (cpu)
UDEV  [177.285453] add      /devices/system/cpu/cpu1/cpuidle/state2 (cpu)
KERNEL[177.477626] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3 (usb)
KERNEL[177.478741] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0 (usb)
KERNEL[177.478802] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/0003:046A:0023.0002 (hid)
KERNEL[177.478847] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1 (usb)
KERNEL[177.478916] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/0003:046A:0023.0003 (hid)
UDEV  [177.510889] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3 (usb)
UDEV  [177.513847] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1 (usb)
UDEV  [177.514476] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0 (usb)
KERNEL[177.548331] add      /module/hid_cherry (module)
UDEV  [177.548514] add      /module/hid_cherry (module)
KERNEL[177.552277] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/input/input11 (input)
KERNEL[177.552328] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/input/input11/event11 (input)
KERNEL[177.552371] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/0003:046A:0023.0002/hidraw/hidraw1 (hidraw)
UDEV  [177.554702] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/input/input11 (input)
UDEV  [177.556379] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/input/input11/event11 (input)
KERNEL[177.557501] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/input/input12 (input)
KERNEL[177.557705] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/input/input12/event12 (input)
KERNEL[177.557736] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/0003:046A:0023.0003/hidraw/hidraw2 (hidraw)
KERNEL[177.557792] add      /bus/hid/drivers/cherry (drivers)
UDEV  [177.558186] add      /bus/hid/drivers/cherry (drivers)
UDEV  [177.561054] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/input/input12 (input)
UDEV  [177.561386] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/0003:046A:0023.0002 (hid)
UDEV  [177.562557] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/input/input12/event12 (input)
UDEV  [177.563020] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.0/0003:046A:0023.0002/hidraw/hidraw1 (hidraw)
UDEV  [177.565642] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/0003:046A:0023.0003 (hid)
UDEV  [177.567540] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.3/2-4.3:1.1/0003:046A:0023.0003/hidraw/hidraw2 (hidraw)

elektronenblitz63

Avatar von elektronenblitz63

Anmeldungsdatum:
16. Januar 2007

Beiträge: 29307

Prima ☺

Ohne entsprechende Hardware ist das natürlich schwierig zu erkennen, auf KERNEL=="dock.0" bin ich nicht gekommen. Danke, dass Du da selbst noch aktiv geworden bist.

Die Regel sieht jetzt also komplett so aus?

# UDEV-Rule for Docking Events
# System rescant PCI-Bus

ACTION=="add", GOTO="bus_rescan"

LABEL="bus_rescan"
KERNEL=="dock.0", ATTR{docked}=="1", RUN+="/usr/sbin/pci_rescan.sh"
    
GOTO="udev_end"

LABEL="udev_end"

Ist für andere ja u.U. auch noch interessant, und ich selbst merke mir das natürlich auch.

b-a-x-t-e-r

(Themenstarter)

Anmeldungsdatum:
31. Mai 2011

Beiträge: 16

Die Regel besteht tatsächlich nur noch aus der einen Zeile:

KERNEL=="dock.0", ATTR{docked}=="1", RUN+="/usr/sbin/pci_rescan.sh"

Mehr scheint nicht notwendig zu sein.

Antworten |