Skip to content

scc-daemon drops existing USB devices when system suspends #57

@bell07

Description

@bell07

Same issue like #55 but tested with current sc-controller-0.4.9.7-bookworm-x86_64.AppImage
If I suspend and resume system, the sc-controller does not work anymore

player@game-deck ~/Downloads $ ./sc-controller-0.4.9.7-bookworm-x86_64.AppImage daemon debug
D SCCDaemon     Starting SCCDaemon...
D SCCDaemon     Initializing drivers...
W SCCDaemon     Skipping disabled driver 'ds4drv'
W SCCDaemon     Skipping disabled driver 'ds5drv'
W SCCDaemon     Skipping disabled driver 'fake'
W SCCDaemon     Skipping disabled driver 'remotepad'
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 0x7f6a23d25e10>
D Mapper        Mouse:    <scc.uinput.Mouse object at 0x7f6a23d271d0>
D Mapper        Gamepad:  <scc.uinput.UInput object at 0x7f6a23d3a090>
D SCCDaemon     Created control socket /home/player/.config/scc/daemon.socket
D SCCDaemon     Connected to XServer :0.0
Exception in thread Thread-2 (_threaded):
Traceback (most recent call last):
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
Exception in thread Thread-3 (_threaded):
Traceback (most recent call last):
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
    self.run()
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/threading.py", line 975, in run
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/site-packages/scc/sccdaemon.py", line 1443, in _threaded
    self._target(*self._args, **self._kwargs)
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/site-packages/scc/sccdaemon.py", line 1443, in _threaded
    self.p = subprocess.Popen(self.args, stdin=None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self.p = subprocess.Popen(self.args, stdin=None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/player/Downloads/usr/bin/python'
FileNotFoundError: [Errno 2] No such file or directory: '/home/player/Downloads/usr/bin/python'
D asyncio       Using selector: EpollSelector
D deck          Got SteamDeck with serial 3:3
D USB           USB device added: 28de:1205
D root          TODO: Hardcoded 1s sleep!
D SCCDaemon     Assigned default_mapper to <Deck deck3:3>
D SCCDaemon     Turning gyrosensor ON
D SCCDaemon     Controller added: <Deck deck3:3>
I CemuHook      Created CemuHookUDP Motion Provider
[..... system goes sleeping and wake up .... ]
Exception ignored on calling ctypes callback function: <bound method USBTransfer.__callbackWrapper of <class 'usb1.USBTransfer'>>
Traceback (most recent call last):
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3/dist-packages/usb1/__init__.py", line 328, in __callbackWrapper
    callback(self)
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3.11/site-packages/scc/drivers/usb.py", line 57, in callback_wrapper
    transfer.submit()
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3/dist-packages/usb1/__init__.py", line 748, in submit
    raiseUSBError(result)
  File "/tmp/.mount_sc-congtYQW1/usr/lib/python3/dist-packages/usb1/__init__.py", line 120, in raiseUSBError
    raise __STATUS_TO_EXCEPTION_DICT.get(value, __USBError)(value)
usb1.USBErrorIO: LIBUSB_ERROR_IO [-1]
D root          TODO: Hardcoded 1s sleep!

Reopen issues seems to be disabled. I do not get the "Repopen" button :-( Therefore I created new issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions