[Android Head-Units] Hazard15301:
Credit for this goes to b-max over at 4pda (original thread here).

First off, I take no responsibility for any damage or problems that may occur while attempting this. I feel this is a pretty low-risk work-around, but nevertheless, you assume all risk after this point.

You need to be running a custom rom with root access, or have a method for whitelisting apps.

You need the following apps installed on your PX5 unit:

Tasker

USB Host Controller

You need to create a script that will virtually un-plug and plug-in the USB host controller.

#!/system/bin/sh
su sh -c 'echo "0"> /sys/bus/usb/devices/[COLOR="Red"]*-*[/COLOR]/authorized'
su sh -c 'echo "1"> /sys/bus/usb/devices/[COLOR="Red"]*-*[/COLOR]/authorized'
sleep 1
su sh -c 'svc wifi disable'
sleep 5
su sh -c 'svc wifi enable'

That's the script, but we need to find out the ID of our USB host controller (*-*). I don't have enough experience with this issue to know if all the PX5 host controllers share the same ID or not, so until we know this for fact, anybody that attempts this fix should find out for sure. That's where the USB Host Controller app comes in.

Open that app, and tap on the USB tab. You'll be looking at this screen:

[IMG="USB 1"]https://www.dropbox.com/s/v6d10m7sl4wty6w/Screenshot_20181119-094909.png?raw=1[/IMG]

You'll want to find the USB2.0 Hub entry, and make a note of the number to the left of it (1-1, 3-1, etc.) You want to plug that in for *-* in the script above. Odds are yours is 1-1, so we end up with:

#!/system/bin/sh
su sh -c 'echo "0"> /sys/bus/usb/devices/[COLOR="Red"]1-1[/COLOR]/authorized'
su sh -c 'echo "1"> /sys/bus/usb/devices/[COLOR="Red"]1-1[/COLOR]/authorized'
sleep 1
su sh -c 'svc wifi disable'
sleep 5
su sh -c 'svc wifi enable'

On your computer, create a new text file, and copy the above script into it. Save that file as "usbpower.sh". Make sure to leave off the ".txt" extension. Copy that script to your PX5's internal storage (/storage/emulated/0).

Next, we want to launch Tasker.

1.) Tap the big plus at the bottom to create a new profile.

2.) Tap Event

3.) Tap System

4.) Tap Intent Received

5.) Under Action, type the following:

android.intent.action.SCREEN_ON

6.) Under the two "Cat" entries below, set those to "Default". It should look like this exactly:

This ensures that the event will run anytime the screen turns on (ie, waking from sleep mode, rebooting, etc.)

7.)At the top left tap the back arrow. Another box will pop up, tap the plus inside this box to Add New Task. You do not have to name it (click the check mark here).

8.) Tap the plus icon at the bottom.

9.) Tap Code

10.) Tap Run Shell. Under Command, type:

sh /storage/emulated/0/usbpower.sh

11.) Tap the check box where it says "Use Root".

THIS STEP IS CRUCIAL!

12.) Hit the back arrow at the top left again. At this point, you can tap the play button at the bottom left to test run the script.

13.) This step is optional, but useful in my opinion.

1.) Tap "Alert"

2.) Tap "Flash"

3.) Under "Text", type "USB host reset in progress..." This will display a toast message when the script fires at boot, just to let you know that everything is running properly. Tap the back arrow in the top left once again.

14.) Tap the back arrow at the top left once again.

15.) Close out of Tasker, and open it again. It should give you a message about disabling battery optimization. If you've already done this previously, there won't be a popup. I'm not sure if this is mandatory, but these are the steps I followed.

The following must be done if you are running Hal9k's mod. I'm not sure how to implement it using stock or Malaysk's rom. I know Malaysk has some sort of whitelist feature, but I don't know if this is possible on stock.

1.) Go into "Settings"

2.) Go into "Car"

3.) Tap "Mod Settings"

4.) Tap "Manage Applications"

5.) Under "Whitelist of applications that do not close when sleep", find and add Tasker.

That's it! If done properly, the usb host controller should reset automatically when waking from sleep. You'll have to wait an extra 5 seconds for wifi connectivity, but it sure beats booting into recovery. Hope this helps someone.