Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
fuss:linux [2020/02/07 21:03] – [Allow Binding Privileged Ports] officefuss:linux [2020/05/08 21:53] – [Automatically Add all RNDIS Devices to a Bridge] office
Line 1102: Line 1102:
 will print the last wake-up type. will print the last wake-up type.
  
 +====== Issues with Stuck Cores ======
  
 +It may happen that logs fill up with messages indicating that some power management policy cannot be enforced on a given CPU core:
 +<code>
 +cpufreqd: cpufreqd_loop            : Cannot set policy, Rule unchanged ("none").
 +cpufreqd: cpufreqd_set_profile     : Couldn't set profile "Performance High" set for cpu4 (100-100-performance)
 +</code>
 +
 +It may be that the CPU core is simply stuck and may need replugging. The following two commands will take the CPU offline and the next one will start the CPU back up:
 +<code bash>
 +echo "0" > /sys/devices/system/cpu/cpu4/cpufreq/online
 +echo "1" > /sys/devices/system/cpu/cpu4/cpufreq/online
 +</code>
 +
 +In doing so, the power management issue seems to be resolved.
 +
 +====== Automatically Add all RNDIS Devices to a Bridge ======
 +
 +Edit or create the file at ''/etc/udev/rules.d/70-persistent-net.rules'' with the following contents:
 +<code>
 +SUBSYSTEM=="net", ACTION=="add", ATTRS{idProduct}=="a4a2", ATTRS{idVendor}=="0525", RUN+="/bin/sh -c '/sbin/ip link set dev %k up && /sbin/brctl addif br0 %k'"
 +</code>
 +where:
 +  * ''br0'' is the interface name of the bridge that the RNDIS devices will be added to.
 +
 +followed by the command:
 +<code bash>
 +udevadm control --reload
 +</code>
 +
 +to reload all udev rules.
 +
 +The reason this works is due to ''a4a2'' and ''0525'' respectively being the identifiers for the RNDIS driver and not for the device itself. For instance, by issuing:
 +<code bash>
 +udevadm info -a /sys/class/net/usb0
 +</code>
 +
 +will show at the top the RNDIS device without any identifiers whereas the parent ''RNDIS/Ethernet Gadget'' matches the identifiers.
 +
 +One usage case for this rule is to connect a bunch of RNDIS devices to an USB hub and have them join the network automatically as they are hotplugged; for instance, Raspberry Pis [[fuss/raspberry_pi#logging-in_via_ssh_over_usb|can be configured as USB gadgets]] and then connected to an USB hub.
  
  

fuss/linux.txt · Last modified: 2024/02/21 06:47 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.