whereswaldon / kfreestyle2d

Unofficial Kinesis Freestyle 2 Userspace Linux Driver
MIT License
73 stars 21 forks source link

Ensure module insertion on boot in fedora and friends #8

Open whereswaldon opened 5 years ago

whereswaldon commented 5 years ago

Thanks to #7, the uinput group is created correctly at install time. So long as the uinput module is loaded when you boot your system, everything should be peachy. However, my F29 instance doesn't seem to load the module despite its presence in /etc/modules. I'm guessing that Fedora manages this a different way (dracut?), but it requires more research.

psafont commented 5 years ago

From https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-configuration/Working_with_Kernel_Modules/#sec-Persistent_Module_Loading:

You can specify additional modules to be loaded by the systemd-modules-load.service daemon by creating a program.conf file in the /etc/modules-load.d/ directory, where program is any descriptive name of your choice. The files in /etc/modules-load.d/ are text files that list the modules to be loaded, one per line.

samiconductor commented 5 years ago

@psafont that worked for me! Thanks!

/etc/modules-load.d$ cat uinput.conf 
uinput

It seems fedora 29 ignores /etc/modules.

whereswaldon commented 5 years ago

@psafont Thanks for the citation! I guess I just need to update the makefile to do both the /etc/modules and /etc/modules-load.d/uinput.conf changes (maybe to to choose based on distro, but that seems more fragile).

samiconductor commented 5 years ago

Maybe test if systemd is available else fallback to /etc/modules?