FS#77335 - [audacity] Add GDK_BACKEND=x11 to .desktop to prevent memory leaks

Attached to Project: Community Packages
Opened by Kuba Orlik (kuba-orlik) - Monday, 30 January 2023, 10:33 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To David Runge (dvzrv)
Christian Heusel (gromit)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When Audacity is recording under Wayland, it suffers severe memory leaks, as documented [here]( https://gitlab.alpinelinux.org/alpine/aports/-/issues/12634) and [here]( https://github.com/audacity/audacity/issues/4247). Adding `GDK_BACKEND=x11` to the Exec line in /usr/share/applications/audacity.desktop would solve this issue until upstream finishes rewriting the gui layer.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:05 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/audacity/issues/1
Comment by Kuba Orlik (kuba-orlik) - Monday, 30 January 2023, 10:34 GMT
I've reproduced the issue on Audacity 3.2.3
Comment by Toolybird (Toolybird) - Tuesday, 31 January 2023, 05:29 GMT
This is likely a dupe of  FS#67547 . Also, I'm not sure if forcing x11 on to all audacity users is optimal (related:  FS#76249 )
Comment by Kuba Orlik (kuba-orlik) - Tuesday, 31 January 2023, 08:49 GMT
My personal opinion is that forcing X11 is not ideal, but it's a good alternative to the current state which makes it freeze the entire system
Comment by Ignacio Taranto (itaranto) - Saturday, 22 April 2023, 19:00 GMT
While it's not ideal, using audacity with Wayland also breaks the progress bar which is a core functionality.

See: https://github.com/audacity/audacity/issues/459

`GDK_BACKEND=x11` should be added to `/usr/share/applicacions/audacity.desktop` or even better (maybe), add a wrapper script in `/usr/bin/audacity` that does `GDK_BACKEND=x11 audacity` so it also works trough the terminal.

Comment by David Runge (dvzrv) - Saturday, 29 April 2023, 11:41 GMT
@kuba-orlik: Thanks for the report.

Since this is clearly an upstream issue, also thanks for opening the ticket there.
Is this still an issue with 3.3.1?
Comment by Ignacio Taranto (itaranto) - Sunday, 30 April 2023, 18:04 GMT
I updated to 3.3.1, now it's seems to be completely broken under Wayland (Sway).

It can load projects and play them but it doesn't show the waveform graphs, I'm not sure this should be a separate issue or not.

Even running with Xwayland (`GDK_BACKEND=x11 audacity`) doesn't solve the issue for me, the only way to make it work properly is by running it in Xorg.
Comment by Ignacio Taranto (itaranto) - Sunday, 30 April 2023, 18:14 GMT
Well, I got it working with `GDK_BACKEND=x11 audacity`, all I had to do was to import some random audio file, and then it started loading projects again.

It still doesn't work in native Wayland tough.
Comment by David Runge (dvzrv) - Sunday, 30 April 2023, 21:28 GMT
It seems that upstream does not really support Wayland and I am trying to convince them to modify their XDG desktop integration so that users at least end up using XWayland.
Comment by Kuba Orlik (kuba-orlik) - Wednesday, 25 October 2023, 17:34 GMT
It seems it won't be solved upstream anytime soon, can we add this fix to force runing under x11, so people don't accidentally crash their systems while recording?