SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Usually when you add a device to a running system it classifies the hardware as "added" so it may assign it a new device number even if it was unplugged and readded because it's in the database. Basically you have to set up the rules to prevent this.
Usually when you add a device to a running system it classifies the hardware as "added" so it may assign it a new device number even if it was unplugged and readded because it's in the database. Basically you have to set up the rules to prevent this.
Eudev and systemd-udev both do this.
But NOT WORKING in slackware current.
when device is in persistent-net.rules , no need add every time plug/unplug.
It should work, but the eudev generated rule is different than udev generated rule.
Just generate a new rule with new .functions and then edit the rule details, you can find all you need in /sys/class/net when you plug the device.
If you limit the naming scheme to "wlan0" in your rule, then it will not be renamed, that's what I did when it tried to rename my interface.
Seems there is a problem with not only pluggable network devices, but also with my usb radio mouse. After boot, I have:
Code:
# dmesg | grep input
[ 4.455709] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[ 4.478336] input: Speakup as /devices/virtual/input/input5
[ 7.506092] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input6
[ 7.608898] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input7
[ 7.623998] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input8
[ 7.639452] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input9
[ 8.243550] snd_hda_codec_conexant hdaudioC0D0: inputs:
[ 8.433599] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[ 8.433731] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[ 8.433831] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
[ 8.451006] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input15
[ 8.869048] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio2/input/input11
[ 9.469152] input: Acer WMI hotkeys as /devices/virtual/input/input18
[ 9.471407] input: Acer BMA150 accelerometer as /devices/virtual/input/input19
[ 9.846231] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:046D:C52F.0001/input/input20
[ 9.848833] hid-generic 0003:046D:C52F.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1d.0-1.4/input0
[ 9.852315] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.1/0003:046D:C52F.0002/input/input21
[ 9.905618] hid-generic 0003:046D:C52F.0002: input,hiddev0,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1d.0-1.4/input1
[ 10.176397] input: 1.3M HD WebCam as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input22
Then I unplug the receiver, wait few secongs, plug it back, and I have:
Code:
[ 4.455709] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[ 4.478336] input: Speakup as /devices/virtual/input/input5
[ 7.506092] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input6
[ 7.608898] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input7
[ 7.623998] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input8
[ 7.639452] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input9
[ 8.243550] snd_hda_codec_conexant hdaudioC0D0: inputs:
[ 8.433599] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[ 8.433731] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[ 8.433831] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
[ 8.451006] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input15
[ 8.869048] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio2/input/input11
[ 9.469152] input: Acer WMI hotkeys as /devices/virtual/input/input18
[ 9.471407] input: Acer BMA150 accelerometer as /devices/virtual/input/input19
[ 9.846231] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:046D:C52F.0001/input/input20
[ 9.848833] hid-generic 0003:046D:C52F.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1d.0-1.4/input0
[ 9.852315] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.1/0003:046D:C52F.0002/input/input21
[ 9.905618] hid-generic 0003:046D:C52F.0002: input,hiddev0,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1d.0-1.4/input1
[ 10.176397] input: 1.3M HD WebCam as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input22
[ 746.505689] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:046D:C52F.0003/input/input23
[ 746.506163] hid-generic 0003:046D:C52F.0003: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1d.0-1.4/input0
[ 746.508697] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.1/0003:046D:C52F.0004/input/input24
[ 746.608538] hid-generic 0003:046D:C52F.0004: input,hiddev0,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1d.0-1.4/input1
So it appears every time (+1 new input) when I unplug and then plug the receiver back.
As long as the database exists it will mislabel each time you hotplug the device in and out of the system because of how udevd scans devices and generates a node. I would first look at dumping and then regenerating the database to see if it corrects itself.
Edit:
Have you looked into a rule regarding duplicate devices?
Example from LFS's book for /etc/udev/rules.d/83-duplicate_devs.rules:
Code:
# Persistent symlinks for webcam and tuner
KERNEL=="video*", ATTRS{idProduct}=="1910", ATTRS{idVendor}=="0d81", \
SYMLINK+="webcam"
KERNEL=="video*", ATTRS{device}=="0x036f", ATTRS{vendor}=="0x109e", \
SYMLINK+="tvtuner"
They describe how to use udevadm to looks for specific device's in the system:
Code:
udevadm info -a -p /sys/class/path/to
When I ran:
Code:
cat /etc/udev/rules.d/70-persistent-net.rules
This was my readout:
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# net device asix
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:9c:65:22:c8", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="eth0"
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="d8:cb:8a:73:96:68", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
Now granted, I could remove the ASIX and reassign the realtek NIC to eth0, but this should give you a prime example.
With pci devices NO PROBLEMS DUDES, BECAUSE ARE PLUGGES WHEN SYSTEM START ..can rmmod/modprobe and no nick changes because interfaces EXISTS , at system start.
I say , PERSISTENT , net rules..ARE NOT PERSISTENT... changing all times plug/unplug adding entrys for the same device ..
same device if plug when system are working..THE first time gets
wlan0
after replug
wlan1
same..ever , one more number FOR SAME DEVICE ...AFETR PLUG/PLUG
why no test to get stable slackware 14.1 and plug/unplug ...and see how interfaces names NEVER CHANGE ?
Thats no problem for me ... im using THE OLD RULES GENERATOR FILE TAKEN TO THE UDEV PACKAGE WORKS REALLY WELL.
uedev NO WORKS WELL...AND THATS ALL.
I report this because is a little problem i think ... all can add devices using a one existing entry on persistent net rules... without permissions...ok , all well. :=)
when open the persistent-net.rules i see a million of entrys , for same device..then ... all works well ? ,,,NO
This is my actual 70-persistent?-net.rules
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x1969:0xe091 (alx)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="d0:50:99:1e:d2:7a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# USB device 0x148f:0x3070 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:d1:11:0b:dd:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
# USB device 0x148f:0x3070 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:d1:11:0b:dd:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"
# USB device 0x148f:0x3070 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:d1:11:0b:dd:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan2"
# USB device 0x148f:0x3070 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:d1:11:0b:dd:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan3"
# USB device 0x148f:0x3070 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:d1:11:0b:dd:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan4"
# USB device 0x148f:0x3070 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:d1:11:0b:dd:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan5"
# USB device 0x148f:0x3070 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:d1:11:0b:dd:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan6"
# USB device 0x148f:0x3070 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:d1:11:0b:dd:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan7"
Last edited by USUARIONUEVO; 12-03-2015 at 02:33 PM.
That's how eudev and systemd-udev both behave when you unplug and reattach hardware devices. This IS the correct behavior. It works upon rebooting the system ONLY, not when you unplug and reattach hardware.
Try this:
Edit the 70-persistent-net.rules and remove unwanted entries, leave the hardware attached, and reboot the system. Your device should now be on the correct node.
Be glad that eudev has rules to tame eudev because it could have placed the device at any number of oddball nodes like enp0s1 which is the default behavior.
It works upon rebooting the system ONLY, not when you unplug and reattach hardware.
Perhaps this is the issue. Some people that are mobile alot plug/unplug their external usb devices on demand, and could be even suspending their machine mostly. Not having persistent naming in these scenarios is unfriendly, as I never restart (or hibernate), but also never leave everything plugged in always. Also if this worked before where devices weren't continually added with their device number incremented on a live plugging, I would also appreciate that did so again now too. I will check into this, but I'd hope someone has already thought about this before.
Last edited by the3dfxdude; 12-03-2015 at 05:13 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.