01-14-2020 02:19 AM
After a long period of inactive use over Christmas a LinuxRT application is hanging. I have a working theory that the USB device we talk to (through RAW) has entered a sleep state and isn't waking.
To look into this theory I've been looking for the /power folder under the devices as described in https://www.kernel.org/doc/html/v4.13/driver-api/usb/power-management.html but it doesn't seem to exist.
I'm thinking the NI kernel may have the USB power management disabled which would explain the absence, is this correct?
01-14-2020 09:36 AM
Yes you are correct, power management is disabled in the kernel configuration for NI LinuxRT. This is done to improve the real-time characteristics (waking up from sleep states can induce significant latencies).
You can verify this by running something like this in a serial/ssh console:
admin@lepton:~# zcat /proc/config.gz | grep CONFIG_PM
# CONFIG_PM is not set
If you still have the target in a hung state it would be useful to look a the kernel log - it might give you clues on what's going on with the USB device. You can get the log by running the 'dmesg' command in a shell or by looking at the '/var/log/messages' log file (the log file will contain non-kernel messages too so you'll have to search around).
01-14-2020 10:12 AM
Awesome that's great to know.
We found the issue in the end to be a combination of small quirks in the LabVIEW app so we have it running again now.