Ryochan7 / sc-controller

User-mode driver and GTK3 based GUI for Steam Controller
GNU General Public License v2.0
176 stars 23 forks source link

Profile loading from `scc-daemon` #102

Closed cmitu closed 10 months ago

cmitu commented 10 months ago

Hello @Ryochan7,

I'm trying to start scc-daemon in the background (no GUI whatsoever) with a certain profile. According to the scc-daemon help, I need to pass the profile name as an argument, followed by start/debug. However, even if I have the required profiles copied into $HOME/.config/scc/profiles, no loading of the profile even happens:

./scripts/scc-daemon 'XBox Controller' debug
D SCCDaemon     Starting SCCDaemon...
D SCCDaemon     Initializing drivers...
W SCCDaemon     Skipping disabled driver 'fake'
W SCCDaemon     Skipping disabled driver 'remotepad'
D USB           Registered USB driver for 054c:09cc
D USB           Registered USB driver for 054c:05c4
D USB           Registered USB driver for 054c:0ce6
D USB           Registered USB driver for 28de:1102
D USB           Registered USB driver for 28de:1142
D USB           Registered USB driver for 28de:1205
D Mapper        Creating virtual devices
D Mapper        Keyboard: <scc.uinput.Keyboard object at 0xb5891fd0>
D Mapper        Mouse:    <scc.uinput.Mouse object at 0xb58973d0>
D Mapper        Gamepad:  <scc.uinput.UInput object at 0xb5897ad0>
W SCCDaemon     Failed to load profile. Starting with no mappings.
W SCCDaemon     Reason: [Errno 2] No such file or directory: 'XBox Controller'
D SCCDaemon     Created control socket /home/pi/.config/scc/daemon.socket
W SCCDaemon     DISPLAY env variable not set. Some functionality will be unavailable
D asyncio       Using selector: EpollSelector

Is the profile selection functionality implemented (in scc-daemon) or the profile is supposed to be loaded into the daemon from the UI ?

I'm using Python 3.11.2, from Debian Bookworm, on a Raspberry Pi 4 (an ARM system).

cmitu commented 10 months ago

OK, after some experimentation, the profile argument expects the full path to the .sccprofile file. So instead of:

./scripts/scc-daemon 'XBox Controller' start

there should be something like:

./scripts/scc-daemon "/home/user/.config/scc/profiles/XBox Controller.sccprofile" start