USB activity causes network error

  • mariusl
  • mariusl's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
27 Oct 2025 18:16 #337301 by mariusl
USB activity causes network error was created by mariusl
Hi,
I have seen the following issue occur on three machines that Range from 2.9.3 to 2.9.6. 
The hardware is all cases are Lenovo i5 mini PC's running MX Linux 23.x Bookworm. The WiFi dongle is a USB type

What seems to happen is that when there is USB activity the network to the Mesa 7i96S will get a read error. It means that the network message could not be compete in one cycle. It typically happens when the USB stick is removed or inserted, especially if the machine is busy executing a program. It will also happen if the WiFi is active like when a file is uploaded to the nc_files directory from a laptop on the network.

Is there anyone else that has maybe seen this or know of a solution?
 

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
27 Oct 2025 19:23 #337310 by tommylight
Replied by tommylight on topic USB activity causes network error
How is the network for Mesa card set up, using network manager or by editing the /etc/network/interfaces file?

Please Log in or Create an account to join the conversation.

More
27 Oct 2025 19:46 - 27 Oct 2025 19:49 #337312 by PCW
Replied by PCW on topic USB activity causes network error
Also what USB dongle?

I have a rtl8192cu based USB WIFI dongle on this test machine
and it seem to have no effect on latency when plugged/unplugged

Have you done the usual optimizations?

DKMS driver for RealTek Ethernet chips

Turn off IRQ coalescing on Intel Ethernet chips

in grub file isolcpus = last processor

pin Ethernet IRQ to last processor


 It means that the network message could not be compete in one cycle.

Actually it's worse than that, with default settings, it means 5 read requests in a row timed out
so usually means multi-ms latency...
 
Last edit: 27 Oct 2025 19:49 by PCW.

Please Log in or Create an account to join the conversation.

  • mariusl
  • mariusl's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
31 Oct 2025 05:45 #337567 by mariusl
Replied by mariusl on topic USB activity causes network error
Tommy I usually make use of nmtui or the network manager

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

  • mariusl
  • mariusl's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
31 Oct 2025 05:55 #337568 by mariusl
Replied by mariusl on topic USB activity causes network error

Also what USB dongle?

I have a rtl8192cu based USB WIFI dongle on this test machine
and it seem to have no effect on latency when plugged/unplugged

Have you done the usual optimizations?

DKMS driver for RealTek Ethernet chips

Turn off IRQ coalescing on Intel Ethernet chips

in grub file isolcpus = last processor

pin Ethernet IRQ to last processor


 It means that the network message could not be compete in one cycle.

Actually it's worse than that, with default settings, it means 5 read requests in a row timed out
so usually means multi-ms latency...
 


I use the TP=Link TL-WN823N WiFi dongle.
The Ethernet chip is Intel on the PC.
I have not turned of IRQ coalescing (don't know how)
I did isolcpus but I am not sure that I did it correctly. It has 4 processors.
Pin Ethernet IRQ to last processor - I have not heard about that so no I have not done that either.

Seem like I have a lot of things that could contribute to the problem

I did do latency tests on the PC's and they all seemed to perform very well with no noticable peaks at all

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
31 Oct 2025 12:22 #337584 by tommylight
Replied by tommylight on topic USB activity causes network error

Tommy I usually make use of nmtui or the network manager

Is that the included Network Manager ?
If yes, then make sure the below is selected:



Attachments:

Please Log in or Create an account to join the conversation.

  • mariusl
  • mariusl's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
31 Oct 2025 13:03 #337586 by mariusl
Replied by mariusl on topic USB activity causes network error
It is the included one yes. So you say I must select the option of "Use this connection ..."

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
31 Oct 2025 13:10 #337587 by tommylight
Replied by tommylight on topic USB activity causes network error
Yes, but only for the network Mesa is attached to.
The following user(s) said Thank You: mariusl

Please Log in or Create an account to join the conversation.

More
31 Oct 2025 16:13 #337592 by PCW
Replied by PCW on topic USB activity causes network error
 You can check the irqmask ( and grub setup) with this script

File Attachment:

File Name: checkmask_...0-31.txt
File Size:1 KB


usage

first

chmod + checkmask,txt

then

./checkmask.txt  [ethernet_device_name]


You can pin  the Ethernet IRQ to the last processor with this script


 

File Attachment:

File Name: pinirq_2025-10-31.txt
File Size:1 KB


usage

first

chmod + pinirq,txt

then

sudo ./pinirq.txt  [ethernet_device_name]

To disable irq coalescing temporarily for testing:

sudo ethtool -C [ethernet_device_name]  rx-usecs 0

To permanently disable IRQ coalescing, you setup the RT ethernet interface in the interfaces file, something like:

auto eth0
iface eth0 inet static
address 10.10.10.1
hardware−irq−coalesce−rx−usecs 0





 
Attachments:
The following user(s) said Thank You: mariusl, rodw

Please Log in or Create an account to join the conversation.

  • mariusl
  • mariusl's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
01 Nov 2025 16:04 #337661 by mariusl
Replied by mariusl on topic USB activity causes network error
Thanks Peter I will try all of the above.

Regards
Marius


www.bluearccnc.com

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.214 seconds
Powered by Kunena Forum