😀
Notes
  • My Notes
  • Software Development
    • Getting Started
    • VSCodium
    • Go
  • System Administration
    • Networking cheatsheet
    • Infra security check tools
    • Using Ubuntu as a workstation
  • Application Infrastructure
    • Message Brokers
      • Kafka
      • NATS
    • Databases
      • MongoDB
      • MySQL
      • PostgreSQL
      • Redis
    • Kubernetes
      • Standard resources cheatsheet
      • Istio
      • Prometheus
    • Workflow Orchestrators
      • Airflow
  • Cloud Infrastructure
    • Terraform
      • AWS
        • Kubernetes IAM roles
  • Climbing
    • Overview of Climbing
    • Singapore
  • Crypto
    • Introduction to Crypto
    • Web3 terminology
  • Guides
    • Beginner's Guide to Personal Operational Security
Powered by GitBook
On this page
  1. System Administration

Using Ubuntu as a workstation

Enabling system wake-up from USB device

Run the following to get a list of your USB devices:

lsusb

The output should look like:

# ... more ...
Bus 004 Device 003: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
Bus 001 Device 002: ID 1d6b:0003 Linux Foundation 3.0 root hub
# ... more ...

In the above output, the hex numbers represent the vendor ID followed by the product ID, eg. 05e3 is the vendor ID (idVendor) for Genesys Logic and 0626 is the product ID (idProduct).

The files that store configurations for the above can be found at /sys/bus/usb/devices. To identify which directory in there contains the desired USB device (you will need to run these as root):

cd /sys/bus/usb/devices;
ls -1 \
  | grep -v '\:' \
  | xargs -I@ sh -c 'printf -- "@ == " && printf -- "$(cat @/idVendor):" && printf -- "$(cat @/idProduct)\n"'

The output should look like (intentionally matched with the lsusb output):

# ... more ...
4-1 == 05e3:0626
usb4 == 1d6b:0003
# ... more ...

Match the above output from lsusb with the most recent output and note the left value (eg. 4-1 refers to the Genesys Logic device)

Run the following to enable wake-up from the USB device:

echo enabled > /sys/bus/usb/devices/4-1/power/wakeup;

To enable persistence, put the above script in your /etc/rc.local as well.

PreviousInfra security check toolsNextMessage Brokers

Last updated 6 months ago