Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
realtek usb ethernet and udev [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2541
Location: Near Toronto

PostPosted: Sat Aug 04, 2018 1:40 pm    Post subject: realtek usb ethernet and udev [SOLVED] Reply with quote

I have a realtek 8153 usb ethernet adapter which works fine
except if it autosuspends. Then it wreaks havoc.

I added a rule called 10-usb-realtek-ethernet-r8153.rules
to /etc/udev/rules.d which looks like this:

Code:

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTR{idProduct}=="8153", TEST=="power/control", ATTR{power/control}="on"


but (even after reboot or unplugging/replugging device) I find that

Code:
cat /sys/bus/usb/devices/usb2/2-1/power/control


is still "auto" instead of what I want which is "on"

Is there something wrong with my rule (I have double checked idVendor and idProduct
and they are correct)?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)


Last edited by albright on Sat Aug 04, 2018 4:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sat Aug 04, 2018 2:45 pm    Post subject: Reply with quote

never seen someone using / in the attribute name, did you have really check that "power/control" do exists?

you could query all attributes with
Code:
udevadm info -qall --attribute-walk /sys/class/net/name_of_the_device


and you can see if your rule is working properly with
Code:
udevadm test  /sys/class/net/name_of_the_device
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2541
Location: Near Toronto

PostPosted: Sat Aug 04, 2018 4:39 pm    Post subject: Reply with quote

thanks Krinn; yes "power/control" is not in ATTR (I found
the rule on the internet somewhere :roll: )

But the problem was stemming from TLP; my rule would
not counteract its udev control (I asked for a script to
run in my new udev rule but TLP overrode it).

I found out you can force TLP to disable autosuspend for
particular devices, so now everything works as it should
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum