Ffado-mixer, libffado fails with python3.10

I am getting the following error when trying to open the ffado-mixer:

[username@hostname ~]$ sudo pacman -S libffado
resolving dependencies...
looking for conflicting packages...

Packages (1) libffado-2.4.4-4

Total Installed Size:  5.37 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) installing libffado                          [######################] 100%
Optional dependencies for libffado
    python-pyqt5: ffado-mixer [installed]
:: Running post-transaction hooks...
(1/4) Reloading device manager configuration...
(2/4) Arming ConditionNeedsUpdate...
(3/4) Updating icon theme caches...
(4/4) Updating the desktop file MIME type cache...
[username@hostname ~]$ ffado-mixer
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/ffado/panelmanager.py", line 460, in updatePanels
    self.addPanel(idx)
  File "/usr/lib/python3.10/site-packages/ffado/panelmanager.py", line 339, in addPanel
    mixerwidget.initValues()
  File "/usr/lib/python3.10/site-packages/ffado/mixer/rme.py", line 441, in initValues
    self.inputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/InputFaders", self, "Columns_are_inputs", 0x8000, self.hw.basepath+"/Mixer/InputMutes", self.hw.basepath+"/Mixer/InputInverts", True)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 1256, in __init__
    self.matrix = MatrixControlView(servername, basepath, self, sliderMaxValue, mutespath, invertspath, smallFont, self.short_names_bool, "In", "Out", self.transpose)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 381, in __init__
    ch = MixerChannel(i, self, self.getColName(i, self.shortname), smallFont)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 303, in __init__
    font.setPointSize(font.pointSize()/1.5)
TypeError: setPointSize(self, int): argument 1 has unexpected type 'float'
Aborted (core dumped)
[username@hostname ~]$ 

If I fix that issue by editing line 303 of matrixmixer.py to be:

font.setPointSize(int(font.pointSize()/1.5))

then I get the error:

[username@hostname ~]$ ffado-mixer
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/ffado/panelmanager.py", line 460, in updatePanels
    self.addPanel(idx)
  File "/usr/lib/python3.10/site-packages/ffado/panelmanager.py", line 339, in addPanel
    mixerwidget.initValues()
  File "/usr/lib/python3.10/site-packages/ffado/mixer/rme.py", line 441, in initValues
    self.inputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/InputFaders", self, "Columns_are_inputs", 0x8000, self.hw.basepath+"/Mixer/InputMutes", self.hw.basepath+"/Mixer/InputInverts", True)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 1256, in __init__
    self.matrix = MatrixControlView(servername, basepath, self, sliderMaxValue, mutespath, invertspath, smallFont, self.short_names_bool, "In", "Out", self.transpose)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 421, in __init__
    node = MixerNode(j, i, val, sliderMaxValue, mute_value, inv_value, self, self)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 130, in __init__
    self.setValue(value)
TypeError: setValue(self, int): argument 1 has unexpected type 'dbus.Double'
Aborted (core dumped)
[username@hostname ~]$ 

For which the fix is less obvious. I get a similar error (different line) if I then do:

[username@hostname ~]$ sudo pacman -R libffado
checking dependencies...
:: jack2 optionally requires libffado: for firewire support using FFADO

Packages (1) libffado-2.4.4-4

Total Removed Size:  5.37 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing libffado                            [######################] 100%
:: Running post-transaction hooks...
(1/4) Reloading device manager configuration...
(2/4) Arming ConditionNeedsUpdate...
(3/4) Updating icon theme caches...
(4/4) Updating the desktop file MIME type cache...
[username@hostname ~]$ yay -S libffado-svn
:: Checking for conflicts...
:: Checking for inner conflicts...
[Repo Make:6]  scons-4.3.0-3  libutf8proc-2.7.0-1  apr-1.7.0-3  apr-util-1.6.1-9  serf-1.3.9-5  subversion-1.14.1-5
[Aur:1]  libffado-svn-r2776-1

==> Remove make dependencies after install? [y/N] y
  1 libffado-svn                             (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: PKGBUILD up to date, Skipping (1/0): libffado-svn
  1 libffado-svn                             (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: (1/1) Parsing SRCINFO: libffado-svn
resolving dependencies...
looking for conflicting packages...

Packages (6) apr-1.7.0-3  apr-util-1.6.1-9  libutf8proc-2.7.0-1  scons-4.3.0-3
             serf-1.3.9-5  subversion-1.14.1-5

Total Installed Size:  60.16 MiB

:: Proceed with installation? [Y/n] 
(6/6) checking keys in keyring                     [######################] 100%
(6/6) checking package integrity                   [######################] 100%
(6/6) loading package files                        [######################] 100%
(6/6) checking for file conflicts                  [######################] 100%
(6/6) checking available disk space                [######################] 100%
:: Processing package changes...
(1/6) installing scons                             [######################] 100%
(2/6) installing libutf8proc                       [######################] 100%
(3/6) installing apr                               [######################] 100%
(4/6) installing apr-util                          [######################] 100%
Optional dependencies for apr-util
    gdbm: enable gdbm support [installed]
    libldap: enable ldap support [installed]
    unixodbc: enable odbc support
    mariadb-libs: enable mysql/mariadb support
    postgresql-libs: enable postgres support [installed]
    db: enable berkley db support [installed]
    sqlite: enable sqlite support [installed]
    nss: enable nss crypto support [installed]
    openssl: enable openssl crypto support [installed]
(5/6) installing serf                              [######################] 100%
(6/6) installing subversion                        [######################] 100%
Optional dependencies for subversion
    libgnome-keyring: for GNOME Keyring for auth credentials
    kwallet: for KWallet for auth credentials
    bash-completion: for svn bash completion
    python: for some hook scripts [installed]
    java-environment: for Java support
    ruby: for some hook scripts
:: Running post-transaction hooks...
(1/4) Reloading system manager configuration...
(2/4) Creating temporary files...
(3/4) Arming ConditionNeedsUpdate...
(4/4) Warn about old perl modules
==> Making package: libffado-svn r2776-1 (Fri 18 Feb 2022 08:51:46 PM EST)
==> Retrieving sources...
  -> Updating libffado svn repo...
Updating '.':
At revision 2821.
==> Validating source files with sha512sums...
    libffado ... Skipped
 -> scons not satisfied, flushing install queue
==> Making package: libffado-svn r2776-1 (Fri 18 Feb 2022 08:51:52 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating libffado svn repo...
Updating '.':
At revision 2821.
==> Validating source files with sha512sums...
    libffado ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of libffado svn repo...
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: libffado-svn r2821-1
==> Sources are ready.
==> Making package: libffado-svn r2821-1 (Fri 18 Feb 2022 08:51:59 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Sources are ready.
 -> libffado-svn-r2821-1 already made -- skipping build
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) libffado-svn-r2821-1

Total Installed Size:  5.51 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) installing libffado-svn                      [######################] 100%
Optional dependencies for libffado-svn
    alsa-lib: for test-scs [installed]
    python-pyqt5: for ffado-mixer [installed]
:: Running post-transaction hooks...
(1/4) Reloading device manager configuration...
(2/4) Arming ConditionNeedsUpdate...
(3/4) Updating icon theme caches...
(4/4) Updating the desktop file MIME type cache...
checking dependencies...
:: git optionally requires subversion: git svn

Packages (6) apr-1.7.0-3  apr-util-1.6.1-9  libutf8proc-2.7.0-1  scons-4.3.0-3
             serf-1.3.9-5  subversion-1.14.1-5

Total Removed Size:  60.16 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/6) removing subversion                          [######################] 100%
(2/6) removing serf                                [######################] 100%
(3/6) removing apr-util                            [######################] 100%
(4/6) removing apr                                 [######################] 100%
(5/6) removing libutf8proc                         [######################] 100%
(6/6) removing scons                               [######################] 100%
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...
[username@hostname ~]$ ffado-mixer
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/ffado/panelmanager.py", line 460, in updatePanels
    self.addPanel(idx)
  File "/usr/lib/python3.7/site-packages/ffado/panelmanager.py", line 339, in addPanel
    mixerwidget.initValues()
  File "/usr/lib/python3.7/site-packages/ffado/mixer/rme.py", line 441, in initValues
    self.inputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/InputFaders", self, "Columns_are_inputs", 0x8000, self.hw.basepath+"/Mixer/InputMutes", self.hw.basepath+"/Mixer/InputInverts", True)
  File "/usr/lib/python3.7/site-packages/ffado/widgets/matrixmixer.py", line 1256, in __init__
    self.matrix = MatrixControlView(servername, basepath, self, sliderMaxValue, mutespath, invertspath, smallFont, self.short_names_bool, "In", "Out", self.transpose)
  File "/usr/lib/python3.7/site-packages/ffado/widgets/matrixmixer.py", line 421, in __init__
    node = MixerNode(j, i, val, sliderMaxValue, mute_value, inv_value, self, self)
  File "/usr/lib/python3.7/site-packages/ffado/widgets/matrixmixer.py", line 166, in __init__
    self.mute_action.setChecked(muted)
TypeError: setChecked(self, bool): argument 1 has unexpected type 'dbus.Double'
Aborted (core dumped)
[username@hostname ~]$ 

As things stand I now have no way of controlling my firewire soundcards and am thus pretty desperate. Any suggestions?

libffado was recently upgraded to 2.4.5 which is in manjaro unstable. You can try that package by switching branches or waiting till the package hits testing or stable.

Links

[arch-general] ffado-mixer error after latest "pacman -Syu"

upgpkg: libffado 2.4.5-1: Upgrade to 2.4.5. · archlinux/svntogit-community@d812cd8 · GitHub

2 Likes

Hi!
I’m getting a very similar same error on libffado 2.4.5-1:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/ffado/panelmanager.py", line 460, in updatePanels
    self.addPanel(idx)
  File "/usr/lib/python3.10/site-packages/ffado/panelmanager.py", line 339, in addPanel
    mixerwidget.initValues()
  File "/usr/lib/python3.10/site-packages/ffado/mixer/rme.py", line 441, in initValues
    self.inputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/InputFaders", self, "Columns_are_inputs", 0x8000, self.hw.basepath+"/Mixer/InputMutes", self.hw.basepath+"/Mixer/InputInverts", True)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 1256, in __init__
    self.matrix = MatrixControlView(servername, basepath, self, sliderMaxValue, mutespath, invertspath, smallFont, self.short_names_bool, "In", "Out", self.transpose)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 421, in __init__
    node = MixerNode(j, i, val, sliderMaxValue, mute_value, inv_value, self, self)
  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 166, in __init__
    self.mute_action.setChecked(muted)
TypeError: setChecked(self, bool): argument 1 has unexpected type 'dbus.Double'

Everything is up-to-date on manjaro stable branch, I’m running a RME FF800.
The interface plays audio through headphones even without ffado so the kernel clearly is talking to it just fine.
When I launch ffado, the red “HOST” error light is disabled, the window opens and immediately crashes.
Running ffado-mixer with sudo it won’t connect to the FFADO DBus service.
Can anyone please help me?

also, I switched to pipewire by installing pipewire-manjaro and pipewire-jack, but that works fine

Hi again,
I did it! Apparently the issue is with python 3.10 requiring certain variables being of a certain type.
These were the other errors I encountered while fixing it:

  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 166, in __init__
    self.mute_action.setChecked(muted)
TypeError: setChecked(self, bool): argument 1 has unexpected type 'dbus.Double'

  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 424, in __init__
    font.setPointSize(font.pointSize()/1.5)
TypeError: setPointSize(self, int): argument 1 has unexpected type 'float'

  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 303, in __init__
    font.setPointSize(float(int(font.pointSize()/1.5 + 0.5)))
TypeError: setPointSize(self, int): argument 1 has unexpected type 'float'

  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 424, in __init__
    font.setPointSize(float(font.pointSize()/1.5))
TypeError: setPointSize(self, int): argument 1 has unexpected type 'float'

  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 424, in __init__
    font.setPointSize(font.pointSize()/1.5)
TypeError: setPointSize(self, int): argument 1 has unexpected type 'float'

  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 213, in mouseMoveEvent
    self.setValue( self.tmpvalue - math.copysign(pow(abs(change), 2), change) )
TypeError: setValue(self, int): argument 1 has unexpected type 'float'

  File "/usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py", line 221, in mouseReleaseEvent
    self.setValue( self.tmpvalue - math.copysign(pow(abs(change), 2), change) )
TypeError: setValue(self, int): argument 1 has unexpected type 'float'

  File "/usr/lib/python3.10/site-packages/ffado/panelmanager.py", line 481, in refreshPanels
    for guid in guids_with_tabs:
RuntimeError: dictionary keys changed during iteration

Until the package gets an official fix, I fixed /usr/lib/python3.10/site-packages/ffado/widgets/matrixmixer.py and uploaded it tohttps://dropmb.com/k9HH7
Feel free to run it through VirusTotal first but it should fix the ffado-mixer crashes.
You’ll need sudo to replace the file.

revision 2 of my fixed matrixmixer.py
some changes were not strictly necessary:Dropmb Free File Hosting | matrixmixer.py_rev2_2022-04-28.tar.gz
the ffado-dev mailing list is already working on a proper fix, until then you can use this.
just remove the _rev2 suffix and replace in /usr/lib/python3.10/site-packages/ffado/widgets/
again, you can VirusTotal it before installing

Thank you very much for the efforts!

It works flawless on EndeavourOS too :slight_smile:
I hope they will fix it soon on the Upstream.

Works for me too, on manjaro. Thanks very much for the fix!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.