LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-01-2015, 07:36 AM   #1
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Another eudev victim ?


After last modifications on eudev , i experienced that problem.


1 - start system withour plugged usb wireless device
2 - plug , and iwconfig says wlan0 O.K
3 - unplug & plug again Wow NOW is wlan1

some times jump for example

wlan4 plugged unplug ...wait some seconds plug again ---> wlan6 or wlan7


/etc/udev/rules.d/70-persistent-net.rules


has the device duplicate 1x plug/unplug

if device exists ..

why more and more entries ?




______________________________

ok , if change

/lib/udev/rule_generator.functions

for the same old file in udev package..then the issue solved.


i download the udev from 14.1 , uncomprees and get the file rule_generator.functions and overwrite the new provided for uedev,.


something broken in the new

Last edited by USUARIONUEVO; 12-01-2015 at 08:25 AM.
 
Old 12-01-2015, 08:55 AM   #2
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
What happens if you generate the rule with new .functions and then edit the rule to use only wlan0?

Code:
KERNEL=="wlan0"
 
Old 12-01-2015, 11:04 AM   #3
gmgf
Senior Member
 
Registered: Jun 2012
Location: Bergerac, France
Distribution: Slackware
Posts: 2,211

Rep: Reputation: 998Reputation: 998Reputation: 998Reputation: 998Reputation: 998Reputation: 998Reputation: 998Reputation: 998
Or removed /etc/udev/rules.d/70-persistent-net.rules, and reboot
 
Old 12-01-2015, 11:33 AM   #4
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Original Poster
Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
remove the file not solve nothing.

generate at boot ...

plug/unplug ... and same.

not nice , when have networkmanager profiles with the name of card "wlanX" ... because name change every time unplug/plug

with udev all working well ,for years,i start hating that uedev.

Last edited by USUARIONUEVO; 12-01-2015 at 11:35 AM.
 
Old 12-01-2015, 11:37 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
In Gentoo passing net.ifnames=0 to kernel (booloader command line) helps.
 
Old 12-01-2015, 12:34 PM   #6
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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.
 
Old 12-01-2015, 01:57 PM   #7
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Original Poster
Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Quote:
Originally Posted by ReaperX7 View Post
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.
 
Old 12-02-2015, 12:22 AM   #8
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
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.
 
Old 12-02-2015, 03:47 AM   #9
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware64-current
Posts: 249

Rep: Reputation: 24
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.

Last edited by yars; 12-02-2015 at 03:48 AM.
 
Old 12-02-2015, 03:55 AM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Easy fix, Yaroslav: just use a true 'hotplug':
Quote:
True 'hotplug' is a usual electrical outlet: just plug in and it will work, and no need any drivers.
I couldn't resist.

Last edited by Didier Spaier; 12-02-2015 at 06:52 AM. Reason: Typo fix.
 
1 members found this post helpful.
Old 12-02-2015, 06:49 AM   #11
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware64-current
Posts: 249

Rep: Reputation: 24
Talking

That is, nothing to do on the discussed subject? OK
 
Old 12-02-2015, 10:30 AM   #12
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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.

Last edited by ReaperX7; 12-02-2015 at 05:29 PM.
 
Old 12-03-2015, 02:12 PM   #13
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Original Poster
Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
I think no one understand.

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.
 
Old 12-03-2015, 04:28 PM   #14
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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.
 
Old 12-03-2015, 05:03 PM   #15
the3dfxdude
Member
 
Registered: May 2007
Posts: 730

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
Quote:
Originally Posted by ReaperX7 View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Anonymous victim HBGary goes to ground Jeebizz Linux - News 0 02-16-2011 02:28 PM
LXer: Recession's latest victim: U.S. innovation LXer Syndicated Linux News 0 12-15-2009 10:50 PM
Another FSTAB Victim DrEwMoNeY Slackware 19 03-20-2006 08:07 AM
Sorry, but I'm another external hdd victim Fuzzyo Linux - Hardware 9 01-22-2005 08:55 PM
Another Direct Rendering Victim mallouk Linux - Hardware 0 09-14-2003 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration