HGAME(4)

๐Ÿ“ฆ
version 15.1 ยท 3 versions
, in freebsd 15.1

๐ŸŽฎ HGAME(4) โ€” Kernel Interfaces Manual ๐ŸŽฎ

okay so bestie, buckle up, we're talking about hgame today and honestly? she's iconic. this is the Kernel Interfaces Manual entry, and it's giving "your controller finally works on FreeBSD" energy ๐Ÿ’…


โœจ NAME โœจ

hgame โ€” the generic HID gamepad, joystick, and controller evdev driver ๐Ÿ•น๏ธ

like, the whole vibe: any generic game controller that speaks HID? she handles it, and she hands it straight to your apps through evdev. periodt.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

the lineup, no cap:

device hgame
device hid
device hidbus
device hidmap
device evdev

then, over in sysctl.conf(5):

dev.hgame.X.debug

and in loader.conf(5):

hw.hid.hgame.debug
hgame_load

that's the whole guest list ๐Ÿ’–


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so hgame is the driver that supports generic game controllers โ€” the kind that attach to the HID transport backend โ€” and she presents them to your applications over the evdev interface. literally the matchmaker of hardware and software ๐Ÿซถ

if the appropriate hardware gets detected, the driver will load itself automatically thanks to devmatch(8). she's self-sufficient like that, main character energy fr.

wanna load her manually at boot instead? two options, both slay:

and listen โ€” to actually give your user applications access to the game controllers, you gotta allow user access to the /dev/input/event* nodes. how? by including your user in the games group. don't skip this step bestie, otherwise your controller is just sitting there like ๐Ÿ’€

๐Ÿ”ฅ HARDWARE ๐Ÿ”ฅ

she supports HID gamepads, joysticks, and controllers, such as:

  • 8bitdo USB Wireless Adapter 2 โญ

(that's the one listed in the manual โ€” yes, exactly that one, no more no less ๐Ÿ™ˆ)


๐Ÿ’œ SYSCTL VARIABLES ๐Ÿ’œ

the following variable is available as both a sysctl(8) variable and a loader(8) tunable:

  • dev.hgame.X.debug โ€” the debug output level ๐Ÿ› where 0 means debugging is disabled, and larger values increase how verbose those debug messages get. default is 0.

its default value is set with the loader(8) tunable:

hw.hid.hgame.debug

so if you want her chatty from the jump, that's your girl โœจ


๐ŸŽ€ FILES ๐ŸŽ€

  • /dev/input/event* โ€” the input event device (evdev) node ๐Ÿ‘‘

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

iichid(4), ps4dshock(4), usbhid(4), xb360gp(4), devfs.rules(5)

the whole friend group, honestly ๐Ÿซถ go say hi.


โญ HISTORY โญ

the hgame driver first appeared in FreeBSD 13.0. a queen since day one ๐Ÿ‘‘โœจ


๐Ÿ’– AUTHORS ๐Ÿ’–

the hgame driver was written by Val Packett <val@packett.cool> ๐ŸŒธ

this manual page was written by Vladimir Kondratyev <wulf@FreeBSD.org> ๐Ÿฆ‹


ngl they ate with this one. thank you for coming to my TED talk ๐ŸŽค๐Ÿ’…

Debian ยท November 30, 2025 ยท HGAME(4) โ€” mwah, bye bestie, go plug in a controller ๐ŸŽฎ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from
  • freebsd 15.1: base 15.1
  • ๐Ÿ“œ the page's license: BSD-2-Clause
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms