audacity (with libwxgtk3.0-gtk3) doesn't draw with GTK_IM_MODULE=xim

Bug #1876212 reported by Akkana Peck
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
wxwidgets3.0 (Ubuntu)
Undecided
Unassigned

Bug Description

Audacity doesn't work here on either focal or eoan, because the main section of the window (where the waveform should show up and where you click to make selections) doesn't draw at all, as if it's never getting expose events.

I'm using the Openbox window manager, not the Gnome desktop. I'm seeing the same behavior mentioned for the i3 window manager on arch in https://forum.audacityteam.org/viewtopic.php?p=391004#p391004 and I've seen reports of it happening in other WMs as well. I'll attach a screenshot, but really the report in that audacity forum post covers it.

So why am I reporting it as an Ubuntu bug instead of upstream audacity? Because according to that report and a few others I've seen, and most of the build documentation for audacity (which mostly recommends using gtk2 rather than gtk3), this is a wx-gtk3 problem: compiling audacity with wx-gtk2 instead of wx-gtk3 fixes the problem. I have not been able to verify this, because although I've been able to build audacity from source against libwxgtk3.0-gtk3 (the problem still occurs), focal doesn't provide a wx-gtk2 option, and I haven't managed to get wxWidgets to build for either gtk2 or gtk3.

No one seems to understand what the core problem is that makes audacity fail to draw under wx-gtk3 in some window managers, just that it happens (which makes audacity completely unusable). But if wx-gtk2 was available, audacity built against that might well work for everyone.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: libwxgtk3.0-gtk3-0v5 3.0.4+dfsg-15build1
ProcVersionSignature: Ubuntu 5.4.0-28.32-generic 5.4.30
Uname: Linux 5.4.0-28-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu Apr 30 17:35:00 2020
InstallationDate: Installed on 2020-04-29 (1 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: wxwidgets3.0
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Akkana Peck (akkzilla) wrote :
Akkana Peck (akkzilla)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wxwidgets3.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
ajgreeny (ajg-charlbury) wrote :

I have the same problem in my clean install of Xubuntu 20.04, though the main middle section of my window is transparent until I resize the window when it appears.
It is, however, not possible to select any part of a loaded audio file in the tracks, so editing is not possible with any accuracy, nor is it possible to select a portion of a track as the selection is not shown in the track itself, only in the timeline above the tracks.

Revision history for this message
Scott Talbert (swt-techie) wrote :

For those who see this problem, do you have the GTK_IM_MODULE environment variable set?

Revision history for this message
Akkana Peck (akkzilla) wrote :

Yes! I had GTK_IM_MODULE=xim.

If I unset that, audacity works, both the one from apt and the self-built one.

Revision history for this message
Scott Talbert (swt-techie) wrote :

Glad to hear that it helps. GTK3 and xim apparently do not play well together.

Revision history for this message
ajgreeny (ajg-charlbury) wrote :

Audacity is showing the window accurately if I edit the ~/.local/share/applications/audacity.desktop file to use the line:-

Exec=bash -c "GTK_IM_MODULE=; audacity %F"

I have no idea if it's possible or wise to unset that option system wide in some way, but I assume this is just an audacity code problem and as this work-around is successful I am very happy.

Revision history for this message
ajgreeny (ajg-charlbury) wrote :

I think I now have found the culprit config file which caused xim to be set.

In my home I had a simple text file, .xinputrc, with content:-

# im-config(8) generated on Mon, 23 Feb 2015 17:01:56 +0000
run_im xim
# im-config signiture: df342b84e376183c717075cfe226893c -

Either commenting out the "run_im xim" line or sending the file to trash allows audacity to work using the simple command audacity instead of the compound command noted above in post #7
I do not have the uim-xim package installed so it seems strange that the line in .xinputrc should still cause the problem when xim is not even available; oris it from some other package?

Olly Betts (ojwb)
summary: - audacity (with libwxgtk3.0-gtk3) doesn't draw on non-gnome systems
+ audacity (with libwxgtk3.0-gtk3) doesn't draw with GTK_IM_MODULE=xim
Revision history for this message
Simon Tatham (sgtatham) wrote :

I've also had this problem with Audacity since updating from 18.04 to 20.04, and indeed, removing GTK_IM_MODULE=xim from the environment worked around it.

However, that's not a great workaround for me, because I put that in the environment on purpose. Without it, GTK2 applications don't honour the list of custom compose-key sequences I put in ~/.XCompose. (But GTK3 applications seem to manage without it, so perhaps this will become less of a problem as everything gradually migrates to GTK3.)

The interesting thing is that the same bug affects the plot window in gnuplot, at least using the default gnuplot terminal type 'wxt'. So I think it might not be a bug in Audacity itself, but a general bug in the GTK3 backend of wxWindows?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers