Hi nvidia
In L4T 4.3 jetpack 4.4 ,
i add a script command to enable usb bus power.
Then nx can be waked up from suspend via usb mouse/keyboard action.
set-usb-suspend.sh
ls /sys/bus/usb/devices/*/power/wakeup > ~/wakeup.log
while IFS= read -r line
do
echo "enabled" > "$line"
done < <(cat ~/wakeup.log)
add it to /etc/udev/rules.d/99-nv-l4t-usb-host-config.rules
But when i take this modify to 4.5.1 and 4.6 on NX ,
usb can’t wake ubuntu from suspend , thus /sys/bus/usb/devices/*/power/wakeup have been enabled already.
And it works as well while flash same modified L4T 4.6 package to TX2NX . (wakeup from usb dev)
Is there any difference of suspend operation after 4.5.1 on NX to make this affect?
The wakeup of HID devices is default off except keyboards supporting boot protocol.
Therefore, except for keyboards supporting boot protocol, HID devices cannot wake up the system by default.
hid-core.c
1152 /* Some keyboards don't work until their LEDs have been set.
1153 * Since BIOSes do set the LEDs, it must be safe for any device
1154 * that supports the keyboard boot protocol.
1155 * In addition, enable remote wakeup by default for all keyboard
1156 * devices supporting the boot protocol.
1157 */
1158 if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT &&
1159 interface->desc.bInterfaceProtocol ==
1160 USB_INTERFACE_PROTOCOL_KEYBOARD) {
1161 usbhid_set_leds(hid);
1162 device_set_wakeup_enable(&dev->dev, 1);// <-----------------------
1163 }
When version is L4T4.5.1/L4T6.1 , it can’t wake up via usb mouse , and optical usb mouse bottom light is ON during suspend status , so the power of usb should already be enabled.
Attached txt is the log from L4T 4.3 of NX , which wake operation is worked via usb mouse. nx4.3_suspend_wake.txt (39.2 KB)