I have issues with Realtek HD Audio Universal Service RAM surge - audio

the issue is the Realtek HD process likes to peak from time to time.
I have an external soundcard connected. I have not found any specific reason why would it surge this way. Could I limit this from happening? The surge kills my other processes usually and briefly makes the system stuck.
Task Manager Screenshot

Related

Bluezero / BlueZ slows after making connections with multiple peripheral bluetooth devices

We have a Python application that connects to 10 BLE devices at a time and performs a manufacturing test.
Here is the work flow of the test:
 Connects to the first of 10 devices.
 Reads and writes to a few characteristics one of which reboots the peripheral device
 Reconnects to device 1, enables notifications on 1 characteristic, and listens for ~170-200k of data
 Disconnects from device 1, turns device 1 off, and repeats step 1-3 on the next device
As we progress through the devices the data transfer for each device slows gradually, the first device is fast, the second device slightly slower etc, even though we are disconnecting from each device after performing the test.  We assume that there may be something related to our usage that is causing this slowdown, however after reviewing the relatively small amount of code in the project we haven't been able to explain anything in the Python code that could be causing the slowdown.
We've tried turning each device off as we test to ensure low interference, removing cached devices from the Central, and restarting the bluetooth service in between tests.  After testing these changes, the sudo service bluetooth restart is the only solution that will mitigate the delay growth during data transmission.
We are looking for any ideas on solutions to the described situation or debug techniques.
Thank you in advance!
Versions used:
Ubuntu 20.04, Bluezero 0.4.0, bluez 5.53" (edited)

A more efficient way of streaming video on the pi

I am a surfer/kitesurfer and i live in the UAE. I'm trying to build a basic weather station that can provide wind and webcam details for a spot that is in a remote location. I am using a pi4 1GB and i am almost ready to install the station on site. My skills are fairly basic but this is where i am at:
pi4 runs ddns so it's dynamic address is accessible remotely with port forwarding - done
weewx uploads wind and weather info from the sensor to windguru - this is on track and will be done by the end of the week when a final part arrives
motion eye provides the video stream of camera 1 and camera 2 - done and visible from outside the LAN
Run apache/mysql/wordpress to provide a basic interface for people to check the info from their browser - almost done.
Now, regarding point 3... i am noticing that this is crippling the pi. Running nmon i can see each camera is utilising 110% of the CPU per camera. That is with minimal video streaming settings and a 1 fps rate. With both cameras running the pi is almost inaccessible through vnc or ssh and it gets very hot - i need to keep restarting it as it freezes.
I don't need a live stream, i'd be happy with an image every 30 seconds. Even if i disable video streaming and use the still image capture, 'motion' is still costing the CPU 110% per camera just to monitor it. Is there a better piece of software that i can be using?
I tried to edit sudo nano /etc/motion/motion.conf hoping to reduce the fps that motion uses to initialize the device but it doesn't affect the CPU usage.
Important to note, my camera is connected via IP and motion is connected to the device via RTSP://
Would appreciate any suggestions.
Thanks,
Sean.
Try UV4L and RPi_Web_Cam_Interface as alternatives to Motion.
RPIWCI is nicely documented at this site
https://elinux.org/RPi-Cam-Web-Interface
The preview mjpeg stream from RPIWCI can be found at the URL http://YourPiIP:Port/cam_pic_new.php
You can set the quality and size using the 'camera control' bar at the bottom of the preview/control page found at yourPiIP:80/html/ (change the port to your forwarding port)
There is also the opportunity to use a timelapse function that might provide a different route to get a 1fps jpeg stream, I have not tried this.
I am currently streaming the preview at 1024x720 ~15fps compression quality 30% to several devices on my local network and the Pi4 is utilising only about 10% CPU.
Other comments.....
Have you tried setting the GPU memory split on the Pi to 1024
Also have you tried the command 'top' at the linux prompt to see what processes are using all the CPU, raspimjpeg uses between 2 and 3 % on my Pi4.
Hope this helps, Heath.

Linux - Limit USB Device Bandwidth

I am trying to connect multiple (10-20) USB Wi-Fi Dongles to a single USB port (using an external powered USB HUB), however I am not able to get more than 5-6 devices connected at the same time.
It seems that each dongle is allocating "500-800" Mbps from the total available 5000 Mbps (1x USB3 port), which does not make sense.
My question however would be if there is some way to have the USB port/hub behave as a "Best-Effort" and ignore the allocated bandwidths or simply be able to limit each device to a lower bandwidth such as 20-50 Mbps. I don't need them to perform at full speed.
I do not think it will be possible and the reasons are below.
Before going to the reason, lets discuss "Bus Instance".
As per the XHCI spec, "Each Bus Instance (BI) represents a “unit” bandwidth at the speed that the BI supports"
So each of your USB 3.0 port in the hub will have two Bus Instance. Super speed and High speed.
Bandwidth depends on the device attached. If its a USB 2.0 device, it will get at most 480 Mbps bandwidth and for SS device 5 Gbps at most. If multiple device is connected, then it will be completely dependent on the USB controller hardware to divide the bandwidth between the Bus instances.
So basically, I do not think we can do it via software. XHCI specification does not have any command to change bandwidth. We have only command to get bandwidth. Also we do not have any hub requests for bandwidth management of hub ports.

Bluetooth Low Energy - Connecting to same device

I'm writing a Bluetooth Low Energy library. For now, it will only run on Linux (and with Bluez 5.41+).
I'd like to have tests that can be run on any computer with BLE support and test the entire stack (application, host and controller), without requiring extra hardware (another BLE-capable device). Requiring extra hardware is a great way of making sure the tests won't be run more than once in a blue moon.
For that end, I'd like to use my computer to connect to itself (as both a peripheral and central) during the tests. It seems like this should be possible, since I can be connected at the same time as peripheral and central to other devices. But advertisements from my own computer never show up on (my own computer's) BLE scans.
Is it all possible to have the computer connect to itself in this way?
No, not if you only have one Bluetooth controller.
The reason is that radio peripherals can only transmit OR receive in a given time moment.

DPC latency caused by NIC

I have audio crackling and stuttering for a few days now. I don't know why it started doing that. It's really annoying because even dragging a window around makes the sound stutter and watching a 4K video is almost impossible.
I believe the problem comes from my NIC, Intel 82579V. I downloaded DPC Latendy Checker and when I start downloading at a few mbps (torrent) I have a DPC latency of around 8000 to 16000µs. Doesn't matter if it's 3mbps or 600mbps. When I disable the NIC or stop all network traffic I'm back to 1000µs.
I tried reinstalling the drivers by uninstalling and letting Windows reinstall.
Any idea how to fix this ?
It does it with onboard audio and through nVidia display port audio.
Specs : Intel i7 3770k #4.2GHz, Z77A-GD55, GTX 780.
Thanks.
There's a couple avenues you can take:
Contact the system/board manufacturer or PC supplier.
Post the issue on communities.intel.com Wired Ethernet blog.
https://communities.intel.com/community/wired
There might be others already seeing the same issue and complaining about it in the same ways listed above.

Resources