Tutorial: GamepadBlock with Debian / Ubuntu


This is a post as part of a tutorial series about getting to start with the GamepadBlock. In this tutorial we will learn how to use the GamepadBlock with Debian or Debian-based distributions like Ubuntu.


If you have not already done it, we need to download the Raspbian image first. You get the image on the official Raspberry Pi downloads site. When you have downloaded the image you need to load it on your SD card. You can follow the Raspberry Pi Software guide for that, if you are unsure how to do that.

Setting the Controller Mode

The Controller Mode determines how the GamepadBlock polls the controllers that are attached to it. You find a detailed description for all modes on the Getting Started Page.

Attaching the GamepadBlock

Using the GamepadBlock with the Raspberry Pi is very easy: You connect the GamepadBlock to your computer with a micro USB cable just like any other USB device. You can use any free USB connector. Also, you can use multiple GamepadBlocks if you need want to have more players.

Installing USB HID Quirks for the GamepadBlock

Until the GamepadBlock patch for the Linux kernel is merged, the following description is important for you if you want to use the two-player functionality of the GamepadBlock on a Linux computer. When you connect the GamepadBlock to your Linux computer only one gamepad is listed under /dev/inputs/. For Linux-based computers we need to configure a so-called USB HID quirk for the GamepadBlock. We provide a Bash script that automates this at Github. You execute the script with the following command:

wget -O - https://raw.githubusercontent.com/petrockblog/GamepadBlockScripts/master/gamepadblockDebian.sh | sudo bash

That command will download the script and start it. The scripts checks if the file /etc/modprobe.d/usbhid.conf exists and creates it, if it does not already exist. Then it checks if the quirks have already been configured for the GamepadBlock. If these are not configured, the script adds the necessary command to the file and reloads the usbhid module.


As you can see, getting started with the GamepadBlock involves very few steps. We hope you enjoy your GamepadBlock and wish you good luck with your project!

Leave a Reply

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.