Package Details: ds4drv 0.5.1-5

Git Clone URL: https://aur.archlinux.org/ds4drv.git (read-only, click to copy)
Package Base: ds4drv
Description: Sony DualShock 4 Userspace Driver
Upstream URL: https://github.com/chrippa/ds4drv
Licenses: MIT
Conflicts: ds4drv-git
Submitter: Ape
Maintainer: daizhirui
Last Packager: daizhirui
Votes: 12
Popularity: 0.146261
First Submitted: 2015-08-31 15:49 (UTC)
Last Updated: 2024-11-05 18:21 (UTC)

Latest Comments

1 2 3 Next › Last »

GG0R10 commented on 2025-02-19 03:22 (UTC) (edited on 2025-02-19 03:23 (UTC) by GG0R10)

I actually needed to modify some files to get this working:

/usr/lib/python3.13/site-packages/ds4drv/actions/input.py -> Replace "joystick.device.device.fn" to "joystick.device.device.path"

/etc/ds4drv.conf -> Comment the last binds of REL_WHEELUP and REL_WHEELDOWN because they are duplicated

/usr/lib/python3.13/site-packages/ds4drv/config.py -> replace all "SafeConfigParser" with just "ConfigParser"

Also I had to remove the controller from blueman and restart ds4drv to get it working. Hope this helps

Deaver commented on 2025-02-18 04:24 (UTC)

With the new version of Python-evdev line 84 in /usr/lib/python3.13/site-packages/ds4drv/actions/input.py needs to be changed from joystick.device.device.fn to joystick.device.device.path

douo commented on 2025-01-30 18:48 (UTC)

Fix python version > 3.12:

diff --git a/PKGBUILD b/PKGBUILD
index 56d4fc7..37f400e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,9 +31,10 @@ package() {
        mkdir -pm755 $pkgdir/etc/systemd/system
        cp systemd/ds4drv.service $pkgdir/etc/systemd/system/ds4drv.service
        cp ds4drv.conf $pkgdir/etc/ds4drv.conf
-       if [ $(python -c "import sys; print(sys.version_info.minor == 12)") = "True" ]; then
-               sed -i "s/SafeConfigParser/ConfigParser/g" $pkgdir/usr/lib/python3.12/site-packages/ds4drv/config.py
-       fi
+       if python -c "import sys; sys.exit(0 if sys.version_info.minor >= 12 else 1)"; then
+          python_version=$(python -c "import sys; print('{0}.{1}'.format(sys.version_info.major, sys.version_info.minor))")
+          sed -i "s/SafeConfigParser/ConfigParser/g" "$pkgdir/usr/lib/python${python_version}/site-packages/ds4drv/config.py"
+        fi
 }

 # vim: ft=sh syn=sh

Konzertheld commented on 2024-12-10 15:37 (UTC) (edited on 2024-12-10 15:38 (UTC) by Konzertheld)

I can't start d24drv at all. According to their GitHub issues, the config included in the package is faulty when this happens. https://github.com/chrippa/ds4drv/issues/204

Removing the offending lines from the config solves the problem.

Traceback (most recent call last):
  File "/usr/bin/ds4drv", line 33, in <module>
    sys.exit(load_entry_point('ds4drv==0.5.1', 'console_scripts', 'ds4drv')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ds4drv/__main__.py", line 132, in main
    options = load_options()
              ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ds4drv/config.py", line 199, in load_options
    config.load(path)
  File "/usr/lib/python3.12/site-packages/ds4drv/config.py", line 74, in load
    self.read([filename])
  File "/usr/lib/python3.12/configparser.py", line 684, in read
    self._read(fp, filename)
  File "/usr/lib/python3.12/configparser.py", line 1075, in _read
    raise DuplicateOptionError(sectname, optname,
configparser.DuplicateOptionError: While reading from '/etc/ds4drv.conf' [line 118]: option 'rel_wheelup' in section 'mapping:keyboard' already exists

daizhirui commented on 2024-11-05 18:23 (UTC)

@Deaver @mumblyomod Thanks for proposing a fix and verifying it.

mumblyomod commented on 2024-11-01 02:09 (UTC)

@Deaver thanks! Your fix worked for me too!

Deaver commented on 2024-10-07 02:10 (UTC)

@fell I was able to fix that error by changing the instances of SafeConfigParser to just ConfigParser in /usr/lib/python3.12/site-packages/ds4drv/config.py at lines 72 and 99

daizhirui commented on 2024-08-16 20:23 (UTC)

@Fell, could you try again? I cannot reproduce the error you got.

Fell commented on 2024-07-21 21:04 (UTC)

This package seems to be broken as of Python 3.12:

Traceback (most recent call last):
  File "/usr/bin/ds4drv", line 33, in <module>
    sys.exit(load_entry_point('ds4drv==0.5.1', 'console_scripts', 'ds4drv')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/ds4drv", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/lib/python3.12/site-packages/ds4drv/__main__.py", line 5, in <module>
    from .actions import ActionRegistry
  File "/usr/lib/python3.12/site-packages/ds4drv/actions/__init__.py", line 1, in <module>
    from ..action import ActionRegistry
  File "/usr/lib/python3.12/site-packages/ds4drv/action.py", line 1, in <module>
    from .config import add_controller_option
  File "/usr/lib/python3.12/site-packages/ds4drv/config.py", line 72, in <module>
    class Config(configparser.SafeConfigParser):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?