Timeline only renders when resizing window


I’m having an issue with audacity. I am on Linux Mint 19.1 and while I can record audio and play it back, the timeline display does not update at all, and stays empty. See image: Click for Image.

As you can see, I have some audio selected, but it’s not displayed in the timeline. To update the timeline, I have to keep resizing the window to force a re-render.

The issue is not with the desktop environment I am using. I have tried this with Cinnamon and Gnome.

How do I fix this? Or is this an actual bug with audacity?

Does the problem go away if you revert to the version of Audacity in the Ubuntu repository?

Hi, I’m having the exact same problem with Ubuntu Studio 20.04LTS. Both with the repo version of Audacity (2.3.3-1build1) and the PPA version (2.4.1-0build1~ubuntu20.04).
I’m using Studio’s default window manager XFCE.

Are you using Wayland?

No, it’s all standard Ubuntu Studio, so I’m using Xorg.

Is that we an imported audio file?

Please give steps to reproduce the issue.

I hope it’s okay if I step in. When I create a new track and record something or generate sound with DTMF or anything, it looks like the OPs screenshot. The waveform is completely absent. I can trigger a repaint when I resize the window. The waveform and any selections are visible but they remain static and are not updated after any subsequent operation. If I open a file a waveform is displayed but it doesn’t match the current zoom. The behaviour (or lack of) is the same.
I recorded a screencast showing the problem.

I was thinking that this might be an Ubuntu Studio issue, so I installed Ubuntu Studio 20.04.

I ran into a couple of snags during the oh-so-slow installation, including the initial run of Software Updater hanging on snapd, but eventually I got it completed.

With a default, fully updated installation of Ubuntu Studio 20.04, and the default Audacity (2.3.3), I can’t reproduce the problem.

I think we need to try and find what you folk have in common. Perhaps the video card? What graphics hardware are you using?
Do any of you see graphics problems in any other software?

Hi, I’m on a notebook with an i7 L 640 with integrated Intel graphics. lshw reports driver=i915.
I’ve been upgrading to Studio 20.04LTS from Studio 19.10 without any hangs or other issues. Audacity worked perfectly on 19.10

Maybe this is of interest: I launched audacity from the console and it reports the following errors:
Failed to load module “appmenu-gtk-module”

14:33:49: Debug: ScreenToClient cannot work when toplevel window is not shown
14:33:49: Debug: ScreenToClient cannot work when toplevel window is not shown
… many repetitions …

After creating a waveform via rec button, these appear:
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on ‘_pixman_log_error’ to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on ‘_pixman_log_error’ to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on ‘_pixman_log_error’ to debug

The cause of the problem is known. The unknown part is why it causes display problems on some machines and not others.

Another symptom of the same root cause in Audacity 2.4.1 is (and this affects users that don’t have the display problem):

  1. Create an audio track
  2. “View menu > Track Size > Fit to Height”
  3. Crash.

The cause of the problem is that Audacity has been built with GTK3 and wxWidgets 3.0. Up to and including Audacity 2.4.1 should be built with GTK2.
Audacity 2.3.3 doesn’t play well the wx3.0/GTK3 combo. It’s not until 2.4.2 do we get somewhat decent GTK3 support using wx3.1.3.

The Audacity developers are currently looking at ways to prevent Audacity being built with incompatible versions of wxGTK.

Starting Audacity with

GTK_IM_MODULE= audacity

fixed the problems for me.


How did you work that out Chris? What’s the connection between window rendering and language input methods?

Unsetting GTK_IM_MODULE did already work for me with some other apps which had problems with rendering on screen.
E. g. for eclipse, I found this solution here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=517671 (comment 50 and following)
So I tried this on Audacity, and … problem is gone!

Did you have GTK_IM_MODULE=xim somewhere in your configuration files?
If so, did you put it there to solve some other problem?

Nope. But GTK_IM_MODULE gets set to “xim” in some standard configuration files (under /usr/share/im-config/data) in Xubuntu 20.04. This seems also to be the default setting, since in a normal terminal window:

$ echo $GTK_IM_MODULE 

I’ve just tested this in a clean, fully updated installation of Xubuntu 20.04 64-bit.
GTK_IM_MODULE is not set. :open_mouth:

So presumably, some other application or installation option is setting it, which would go some way towards explaining why some users of Ubuntu 20.04 are seeing this problem and others are not.

If you didn’t knowing set it, it would be useful if we could figure out what did.

I’m afraid that this is difficult to find out. My Xubuntu installation was 14.04 initially, and I upgraded every two years to the newest LTS version, that is, 16.04 → 18.04 → 20.04.
So, it could very well be that this GTK_IM_MODULE setting is a leftover from a previous Xubuntu version.

Thanks very much for your input on this Chris.
At least now we can ask users that are experiencing this kind of issue to check if GTK_IM_MODULE is set to xim, and if it is, then we have a workaround.


I have just posted a new topic here about this but found this thread after posting it.

I have two xubuntu 20.04 systems, one has the problem and the other doesn’t! :slight_smile:

Unsetting GTK_IM_MODULE fixes the issue for me OK.

I’ve looked for obvious differences between the two systems but at the moment I can’t see anything related to GTK_IM_MODULE. The script that sets it X11/Xsession.d/70im-config_launch is present on both systems. I’m quite happy to dig around further in the nether regions of /etc if anyone has any good ideas of what to look for.

Well it’s fairly clear what sets GTK_IM_MODULE, it’s the im_launch entry in the ‘Session and Startup’ settings in Ubuntu. However who or what decides that im_launch should be run at system startup I don’t know (yet). As I said I have two xubuntu 20.04 systems and one has it set and the other doesn’t.