Skip to content

Instantly share code, notes, and snippets.

@cybik
Last active February 28, 2021 16:24
Show Gist options
  • Save cybik/ed08f275168a8c299856c5af539ccfe8 to your computer and use it in GitHub Desktop.
Save cybik/ed08f275168a8c299856c5af539ccfe8 to your computer and use it in GitHub Desktop.
Dumbest Service Ever

告示

The Duke still "reboots" itself without constant chatter with the system. This is a "known issue" in the xpad driver, but unfortunately the patch has not been issued nor upstreamed.

The hell is this

This is a really, REALLY stupid way of making it so my big chonker of a gamepad doesn't require me to open a terminal and force some IDs into the xpad driver.

Huh?

Yeah. The Duke won't "restart" itself whenever Steam is active, meaning VALVe's "Steam gamepad daemon" (my interpretation) has to be sending a keepalive packet through the xpad driver, keeping the Duke awake and stopping it from being a stupid reinitializing circuitboard.

You're lazy

Never said I wasn't, mate.

[Unit]
Description=xpad duke autoID
Wants=network.target
After=syslog.target network-online.target
[Service]
Type=simple
ExecStart=bash -c 'modprobe xpad; echo "2e24 1618" >> /sys/bus/usb/drivers/xpad/new_id'
Restart=no
KillMode=none
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment