You are not logged in.

#1 2015-12-01 10:00:10

Alister.Hood
Member
From: Auckland, New Zealand
Registered: 2011-12-09
Posts: 18

GTK3 apps are incredibly slow after boot

Hi,
Unless I've broken something without realising it, it seems some upgrade in the last few months has resulted in gtk3 apps (gtk3-demo, abiword, gnumeric, etc) starting and running incredibly slowly after boot on my machine. 
(1) they take upwards of 30 seconds to start, during which time they are a blank black window, and they steal input focus (I can move the mouse on the screen, but I can't do anything, like activate another window). 
(2) it takes a long time for them to respond to any input during which time they "steal" input focus.
(3) but once I've got one open, if I open a few dialogues or open a menu (waiting ages of course), close it and repeat until the menu starts opening quickly, and then close the application, I can then run GTK3 apps OK.
When the slowness happens there is no obvious reason e.g. high CPU usage. 
When opening menus in (3) they "steal" input focus (I can move the mouse on the screen, but I can't do anything, like activate another window).

I'm struggling to shed any light on the problem by searching the forum and google or looking with dmesg and journalctl, or comparing processes running before and after (3).  I've also had a quick look through the last couple of months of the GTK mailing lists.

I tried downgrading GTK3 to a version I had when I think I didn't have this problem, but that doesn't fix it (except rather than a blank black window during startup, it is grey, and also after (3) programs actually start noticeably faster than with the latest GTK3).

I also tried removing /etc/gtk-3.0 and ~/gtk-3.0

Strace shows this before they freeze for a long time during startup:

futex(0x8794efc, FUTEX_WAIT_REQUEUE_PI_PRIVATE, 1, NULL, 0x89464e8) = 0
futex(0x89464e8, FUTEX_UNLOCK_PI_PRIVATE, 0) = 0
futex(0x8794efc, FUTEX_WAIT_REQUEUE_PI_PRIVATE, 3, NULL, 0x89464e8

I guess I should be learning how to follow this up?

Does anyone have any thoughts on how best to attack the problem?  I could try randomly downgrading things that seem like likely culprits (kernel? pulseaudio? cups? various gtk dependencies?), but surely there must be a better strategy...
I'm really looking for someone to point me in the direction of any tools or guides on debugging problems like this (it seems they are all too common with gtk3), but I can post logs or whatever if you think that's the thing to do.

One thing that does seem to be mentioned frequently is making sure my hostname is in /etc/hosts.  I started out with this:

127.0.0.1	localhost.localdomain	localhost archie
::1		localhost.localdomain	localhost

But have changed it to this, without any effect:

127.0.0.1	localhost.localdomain	localhost archie
::1		localhost.localdomain	localhost archie

I'm not really sure if that is how it should be looking though.

For the record I'm generally running gtk2 stuff day-to-day, starting with pcmanfm, openbox, and lxpanel.

Thanks for any pointers.

Last edited by Alister.Hood (2015-12-01 10:29:54)

Offline

#2 2015-12-01 16:41:26

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: GTK3 apps are incredibly slow after boot

I can't reproduce the slowness of the gtk3 applis on my machine.
gtk3-demo is normal for me: no delay to start and the clicks react instantaneously here.

But I don't use any special gtk3 theme, only the default one.

gtk3 uses the '~/.config/gtk-3.0/settings.ini' file:

[Settings]
#gtk-theme-name = Orion
gtk-font-name = DejaVu Sans 10
gtk-icon-theme-name = oxygen
gtk-fallback-icon-theme = gnome

Something is not right on your machine...

Offline

#3 2015-12-02 13:43:53

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: GTK3 apps are incredibly slow after boot

Alister.Hood wrote:

Does anyone have any thoughts on how best to attack the problem? I could try randomly downgrading things that seem like likely culprits (kernel? pulseaudio? cups? various gtk dependencies?)

My guess would be video drivers.

What video card are you using? What driver are you using? When was the last time you updated the video driver? Does it coincide with the time GTK3 applications started misbehaving? What window manager are you using? Is compositing enabled?

Offline

#4 2015-12-05 23:24:10

Alister.Hood
Member
From: Auckland, New Zealand
Registered: 2011-12-09
Posts: 18

Re: GTK3 apps are incredibly slow after boot

OK, it seems it is something to do with the latest versions of pulseaudio not liking my configuration.  The problem does not occur if I do any of the following:
- rename the pulseaudio executable
- use the stock alsa and pulseaudio configurations
- remove libcanberra-pulse
- add the following to ~/.config/gtk-3.0/settings.ini:

#gtk-enable-event-sounds=0
#gtk-enable-input-feedback-sounds=0

Even without doing the last one, I never get any system sounds - not sure if that indicates there is something wrong with canberra itself.

Offline

Board footer

Powered by FluxBB