sc-controller icon indicating copy to clipboard operation
sc-controller copied to clipboard

Gui in version 0.4.6 generates several entries

Open afettouhi opened this issue 5 years ago • 15 comments

I initially set up sc-scontroller back when 0.4.1 came out. I saw today that 0.4.6 was out and that there was new profile formats in that version. So I decided to launch it (under Arch Linux with KDE Plasma5). The GUI launches fine but when I turn on my steam controller the GUI goes crazy and my desktop starts dragging horribly

sc-scontroller046

Do I need to delete some config files for sc-controller or is something else wrong?

afettouhi avatar Dec 19 '18 17:12 afettouhi

That looks cool, how did you get it?

Make sure there is nothing with scc in name running and try running scc-daemon debug from terminal. And check if it really detect all those pads. If not, running sc-controller -v -d in another terminal may display some error message from GUI part.

kozec avatar Dec 19 '18 19:12 kozec

It just started to populate like that when I turned on my steam controller after launching sc-controller. If start sc-controller with the steam controller turned on it launches the app like that.

afettouhi avatar Dec 19 '18 19:12 afettouhi

Running scc-daemon gives a stream output with these lines repeating

IOError: [Errno 16] Device or resource busy
D evdev         Failed to add evdev device: [Errno 16] Device or resource busy
E evdev         [Errno 16] Device or resource busy
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/scc/drivers/evdevdrv.py", line 411, in handle_new_device
    controller = EvdevController(self.daemon, dev, config_file, config)
  File "/usr/lib/python2.7/site-packages/scc/drivers/evdevdrv.py", line 73, in __init__
    self.device.grab()
  File "/usr/lib/python2.7/site-packages/evdev/device.py", line 298, in grab
    _input.ioctl_EVIOCGRAB(self.fd, 1)

afettouhi avatar Dec 19 '18 19:12 afettouhi

Running sc-controller -v -d gives this in an infinite loop

D DaemonCtrl    Daemon reported profile change for ev51ED950B: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev371B3B4F: /usr/share/scc/default_profiles/Desktop.sccprofile
D DaemonCtrl    Daemon reported profile change for ev401C0BD9: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev21876186: /usr/share/scc/default_profiles/Desktop.sccprofile
D DaemonCtrl    Daemon reported profile change for ev56805114: /usr/share/scc/default_profiles/Desktop.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3076FF56: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4771CFC: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev28312DAF: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5F361D39: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3FF194DE: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev48F6A44C: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2E000A0E: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev59073A98: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev389C50C5: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4F9B6053: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev296DCE17: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5E6AFE81: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev312A1CF: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev462D2C7A: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2F68C116: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev586FF18: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3E995FC6: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev499E6F54: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2805050F: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5F023599: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev39F49BDD: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4EF3AB4B: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev21B34924: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev56B479B2: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3673F057: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4174C0C1: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev27826E85: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev50855E13: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev311E344E: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev461904D8: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev20EFAA9E: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev57E89A0C: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev38A87865: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4FAF48F3: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev1D5EA394: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev6A599302: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for evCAF3D48: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev7BA80DD2: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev1A33678D: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev6D34571B: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for evBC2F95F: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev7CC5C9C9: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev13852BA6: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev64821B3: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev44592D5: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev7342A243: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev15B40C07: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev62B33C91: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev32856CC: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev742F665A: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev12D9C82: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev65DEF88A: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for evA9E1AE7: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev7D992A71: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4B040412: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3C033484: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5AF59AC2: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2DF2AA58: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4C69C00B: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3B6EF09D: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5D985ED9: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2A9F6E4F: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev45DF8C2: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev32D8BCB6: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev521F3553: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev251805C5: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev43EEAB81: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev34E99B17: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5572F14A: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2275C1DC: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev44836F9A: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev33845F1: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5CC4BD61: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2BC38DF7: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev7932669: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for evE355606: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev68C3F844: /usr/share/scc/default_profiles/Desktop.sccprofile
D DaemonCtrl    Daemon reported profile change for ev1FC4C8D6: None
D DaemonCtrl    Daemon reported profile change for ev3D4EB833: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4A4988A5: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2CBF26E1: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5BB81677: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3A237C2C: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4D244CBE: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2BD2E2F8: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5CD5D26E: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev33953001: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev44920097: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev8D7E12A: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev7FD0D1BC: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev19267FFA: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev6E214F7: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for evFBA2533: /usr/share/scc/default_profiles/Desktop.sccprofile
D DaemonCtrl    Daemon reported profile change for ev78BD15A5: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev1E4BBBE1: /usr/share/scc/default_profiles/Desktop.sccprofile
D DaemonCtrl    Daemon reported profile change for ev694C8B77: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev60C6918: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev710B598E: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev23FAB2E9: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev54FD827F: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev320B2C3B: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev450C1CAD: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev249776F: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev53904666: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3566E824: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4261D8B6: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2D213ADB: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5A260A4D: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3AE183A8: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4DE6B33E: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev2B101D7C: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev5C172DEE: /usr/share/scc/default_profiles/XBox Controller.sccprofile
D DaemonCtrl    Daemon reported profile change for ev3D8C47B1: /usr/share/scc/default_profiles/Desktop.sccprofile
D DaemonCtrl    Daemon reported profile change for ev4A8B7727: /usr/share/scc/default_profiles/XBox Controller.sccprofile

afettouhi avatar Dec 19 '18 20:12 afettouhi

It would probably help to add all lines from daemon, not just last few. Or at least how's it starting. But it looks like issue is caused by evdev driver, so if you are using steam controller, quick and dirty fix is to turn off everything, open ~/.config/scc/config.json and edit value under drivers -> evdevdrv to false

Then check what non-steam gamepads are enabled with ls -l ~/.config/scc/devices

kozec avatar Dec 19 '18 20:12 kozec

Here is the complete output

SomeFile.txt

afettouhi avatar Dec 19 '18 20:12 afettouhi

Assigned default_mapper to <Evdev Microsoft X-Box 360 pad>

Ok, this line is catastrophic and has to go away. Have you done anything specific to register Xbox controller with SCC? It shouldn't be possible normally.

There is similarly named file in that ~/.config/scc/devices directory, remove it.

kozec avatar Dec 19 '18 21:12 kozec

I did another test again. This time I deleted the whole ~/.config/scc directory. Then I made sure that scc-daemon and steam wasn't running. I then start the with sc-controller -v -d 2>&1 | tee SomeFile.txt from the terminal with the steam controller active. It launches fine without issue. I then plug in my 360 controller and try configure it. It gets recognised and I set it up but right before I click save the new profile the GUI starts going crazy as in the above picture I added and my desktop goes sluggish but I can still close the app. I've have attached the output below. SomeFile.txt

afettouhi avatar Dec 19 '18 21:12 afettouhi

No I just followed the prompt in the gui originally if I remember correctly.

afettouhi avatar Dec 19 '18 21:12 afettouhi

Thing is, SC Controller doesn't support 360 controller for this very reason. It emulates 360 controller that is supposed to be indistinguishable from real one because there are games that are checking specifically for it. So, if you configure SC Controller to grab 360 controller, it will grab itself, create another 360 controller, grab it, create another... You saw what it does.

I'll check why is it even allowing you to do this, but your problem is at step 1.

kozec avatar Dec 19 '18 21:12 kozec

Ah I have misunderstood that. But this issue didn't appear when I originally set up sc-controller and back then I setup my 360 controller as well and this didn't happen back then.

afettouhi avatar Dec 19 '18 21:12 afettouhi

Looking what I actually wrote in that registration screen code, it kinda makes sense. I only planned to filter-out xbox pads, instead it filters virtual devices :(

So entire thing depends on order in which evdev reports controllers, if real Microsoft X-Box 360 pad comes 1st, it should work, if it comes 2nd, hell break loose. So it's probably possible to get SCC to work with XBox pad by connecting very early after boot, but please, don't do that. I'll make it impossible in next release.

kozec avatar Dec 19 '18 21:12 kozec

OK, so to reiterate sc-controller doesn't support the xbox 360 controller because it emulates it? So the application is for every other type of controller then?

afettouhi avatar Dec 19 '18 21:12 afettouhi

Yes, that's correct.

kozec avatar Dec 20 '18 08:12 kozec

I have the same issue, and I also have Xbox controller. I don't think this tool should block xbox controller from using it. It's pretty useful for binding the controller to other functionality.

Maybe add an option to modify controller name created by sc-controller to avoid the infinite loop?

Edit: I edit key output.name in ~/.config/scc/config.json, and now it's working fine.

bradyhaley avatar Jul 25 '22 16:07 bradyhaley