Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217635 - x11-terms/gnome-terminal-2.22.1 wait 1-2 seconds on workplace switching with compositor enabled (using nvidia-drivers)
Summary: x11-terms/gnome-terminal-2.22.1 wait 1-2 seconds on workplace switching with ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Tony Vroon (RETIRED)
URL: http://www.nvnews.net/vbulletin/showt...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-14 12:37 UTC by Maxim Britov
Modified: 2008-09-14 16:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,4.53 KB, text/plain)
2008-04-14 12:39 UTC, Maxim Britov
Details
sysprof (gnterm-profile.gz,7.76 KB, application/octet-stream)
2008-04-17 11:37 UTC, Maxim Britov
Details
Xorg.0.log (Xorg.0.log,25.83 KB, text/plain)
2008-04-17 14:49 UTC, Maxim Britov
Details
new full profile (gnterm-profile.gz,11.85 KB, application/octet-stream)
2008-04-18 06:38 UTC, Maxim Britov
Details
Callgrind profile (callgrind.out.4808.1.gz,59.75 KB, application/octet-stream)
2008-04-21 07:37 UTC, Maxim Britov
Details
Example of gnome-terminal with nv 2.1.8 and compositor enabled. (Screenshot.png,187.62 KB, image/png)
2008-05-12 05:41 UTC, Maxim Britov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Britov 2008-04-14 12:37:49 UTC
I found I have 1-2 seconds 100% CPU eating when I switch to workplace with gnome-terminal window. If gnome-terminal window minimized it switch fast.
Minimize/maximize affected too. Gnome-terminal may be on top or fully hidden (but not minimized).

Problem occurs with composite enabled only.

[ebuild   R   ] x11-terms/gnome-terminal-2.22.1  USE="-debug" 0 kB 
[ebuild   R   ] x11-wm/metacity-2.22.0  USE="-debug -xinerama" 0 kB 
[ebuild   R   ] x11-base/xorg-server-1.4.0.90-r3  USE="dri hal sdl xorg xprint (-3dfx) -debug -dmx -ipv6 -kdrive -minimal (-nptl)" INPUT_DEVICES="keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -evdev -fpit -hyperpen -jamstudio -joystick -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse -void -wacom" VIDEO_CARDS="fbdev nv nvidia radeon v4l (-amd) -apm -ark -chips -cirrus -cyrix -dummy -epson -fglrx -glint -i128 (-i740) -i810 (-impact) (-imstt) -mach64 -mga -neomagic (-newport) (-nsc) -r128 -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng (-vermilion) -vesa -vga -via -vmware -voodoo (-xgi)" 0 kB 
[ebuild     U ] x11-drivers/nvidia-drivers-169.12 [169.09-r1] USE="acpi gtk -custom-cflags (-multilib)" 0 kB 


Reproducible: Always
Comment 1 Maxim Britov 2008-04-14 12:39:10 UTC
Created attachment 149673 [details]
emerge --info
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-04-14 12:39:59 UTC
most probably crappy video driver because I can't reproduce on nvidia or intel hardware (free drivers only)
Comment 3 Mart Raudsepp gentoo-dev 2008-04-14 12:43:57 UTC
gnome-terminal is highly optimized itself. Your problem must be glyph drawing and such things. That is, your video driver and 2D acceleration stuff. Note that with radeon and EXA things are really really really bad on r200 cards right now, for example.
Comment 4 Maxim Britov 2008-04-14 12:55:35 UTC
I run top in gnome-terminal and I see after switching 80-90% load by X.
May I can do some for track problem?

Another usually opened applications doesn't have this problem: claws-mail, liferea, firefox, rdesktop, tkabber.
Comment 5 Rémi Cardona (RETIRED) gentoo-dev 2008-04-14 12:56:13 UTC
(In reply to comment #0)
> [ebuild     U ] x11-drivers/nvidia-drivers-169.12 [169.09-r1] USE="acpi gtk
> -custom-cflags (-multilib)" 0 kB 

Please update your nvidia drivers. Thanks
Comment 6 Maxim Britov 2008-04-14 13:00:08 UTC
I may open gnome-terminal, then open maximized firefox3 over it.
Then I switch to another workplace and back. I didn't see anything new about 2 seconds. Only high load CPU on applet. After it I see ff3 window.
Comment 7 Maxim Britov 2008-04-14 13:01:54 UTC
(In reply to comment #5)
> (In reply to comment #0)
> > [ebuild     U ] x11-drivers/nvidia-drivers-169.12 [169.09-r1] USE="acpi gtk
> > -custom-cflags (-multilib)" 0 kB 
> 
> Please update your nvidia drivers. Thanks

I downgrade drivers after reading comment for -r1 release about some slowness.
I have this behavior here (at office) and at home (with 169.12).

Comment 8 Mart Raudsepp gentoo-dev 2008-04-16 16:54:48 UTC
For us to be able to decide if it truly is a gnome-terminal problem (which is highly unlikely), we need more information from you. That is, we need profiling results from you. To get that, I suggest you install dev-util/sysprof for that. To get meaningful traces from that you should compile gnome-terminal, vte, pango, xorg-server and such with debug symbols - I suggest reading http://www.gentoo.org/proj/en/qa/backtraces.xml for that - basically you need -g in CFLAGS  and splitdebug in FEATURES (at least during the re-emerging of the relevant packages), you also mustn't have -fomit-frame-pointer in your CFLAGS, as that makes sysprof not able to get the caller to create the traces.

Once you have that going, you can run sysprof, start profiling and then switch between a quickly drawing workspace (I use just the background picture with nautilus configured to not handle the desktop for the icons for the duration of profiling) and the slow gnome-terminal one. When you get over 5000 samples (the more the better), as shown on the top right of sysprof (Samples: <number>), you can hit profile and then save to a .sysprof file and attach here. Once done, you can reopen the bug as the information was provided. Thank you and good luck
Comment 9 Maxim Britov 2008-04-17 06:42:32 UTC
(In reply to comment #8)
> For us to be able to decide if it truly is a gnome-terminal problem (which is
> highly unlikely), ....

Yesterday I found at home It is vte problem. I ran /us/bin/vte and I was able to reproduce same behavior. I think I should profile vte. What you think?
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2008-04-17 07:04:01 UTC
dev-util/sysprof, dev-util/oprofile, ...

Pick your poison :)
Comment 11 Maxim Britov 2008-04-17 11:37:34 UTC
Created attachment 150030 [details]
sysprof

re-emerged xorg-server, vte, gnome-terminal, cairo, pango, libX11, libXcomposite, gtk+, metacity.

$ egrep "(FLAG|FEATU)" /etc/make.conf
CFLAGS="-O3 -march=k8 -pipe -g"
CXXFLAGS="${CFLAGS}"
FEATURES="parallel-fetch splitdebug"
Comment 12 Maxim Britov 2008-04-17 11:41:53 UTC
some info provided
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2008-04-17 13:27:48 UTC
Can you tell us which functions take a lot of time in your profile?

Thanks
Comment 14 Maxim Britov 2008-04-17 13:40:15 UTC
(In reply to comment #13)
> Can you tell us which functions take a lot of time in your profile?

Switching from free workspace into workspace with maximized gnome-terminal.

PS. I remember, I have it only in gnome 2.22 after enable composite in gconf.
Comment 15 Rémi Cardona (RETIRED) gentoo-dev 2008-04-17 13:50:54 UTC
I meant which "code" function... I understand your test case...
Comment 16 Maxim Britov 2008-04-17 14:07:38 UTC
(In reply to comment #15)
> I meant which "code" function... I understand your test case...

I'm sorry, may be i'm stupid for you :) Please describe all better for me :)
I attached profile log here. 92% in X (with <2% in kernel mode).

Comment 17 Rémi Cardona (RETIRED) gentoo-dev 2008-04-17 14:42:24 UTC
92% in X shows that it's not (entirely) a vte issue. Could you attach /var/log/Xorg.0.log ?

Thanks

(I wasn't implying you were dumb or otherwise. I thought my request was clear enough, my fault for not explaining a bit more :) )
Comment 18 Maxim Britov 2008-04-17 14:49:49 UTC
Created attachment 150070 [details]
Xorg.0.log
Comment 19 Mart Raudsepp gentoo-dev 2008-04-17 15:02:19 UTC
That profile doesn't have X symbols, where most of the time is spent. You either got something wrong with the X recompiling with debug symbols, or you simply haven't restarted Xorg after re-emerging of it. Please take care of that and re-profile.
Comment 20 Rémi Cardona (RETIRED) gentoo-dev 2008-04-17 15:04:18 UTC
You're using the proprietary nvidia drivers. While I use them too on my box, I have no idea what's going on on your system.

Reassigning. Thanks
Comment 21 Maxim Britov 2008-04-17 15:16:27 UTC
(In reply to comment #19)
> That profile doesn't have X symbols, where most of the time is spent. You
> either got something wrong with the X recompiling with debug symbols, or you
> simply haven't restarted Xorg after re-emerging of it. Please take care of that
> and re-profile.

I did reboot before profiling.
After I saw it haven't symbols I tried cp Xorg.debug X.debug, without success.
I tried ran Xorg from console and then run from another consoles metacity, then gnome-terminal, then sysprofile, but without success.
I'm not very experience in this area and I don't know what I can do yet.
But I can read and make something for you (yes, and for me :) )
Comment 22 Maxim Britov 2008-04-18 06:38:14 UTC
Created attachment 150138 [details]
new full profile

I understand my mistake yesterday, but too late. Today I provide new profile.
Xorg have read permission only for root and I couldn't get symbols from user.
I ran sysprof from root now. I found 86% spent by libpixman. Attached profile with re-emerged  x11-libs/pixman. Thanks.
Comment 23 Harris Landgarten 2008-04-18 14:57:56 UTC
I have similar symptoms. Whenever gnome-terminal is scrolling at maximum rate and visable, whether from local and remote process, I lose both keyboard and mouse responsiveness until the scrolling slows down. This began in the last few days after April 13. There were quite a few xorg updates as well as baselayout-2. It also may have something to do with the cairo-1.6.4

I am running on pretty fast hardware with an nvidia 8600 GTS and nvidia-drivers-169.12
Comment 24 Maxim Britov 2008-04-21 07:37:49 UTC
Created attachment 150484 [details]
Callgrind profile

There is callgrind profile for Xorg+metacity+gnome-terminal
Comment 25 Maxim Britov 2008-04-21 07:38:57 UTC
Open nv drivers unusable for me with vte/gnome-terminal window.
Comment 26 Doug Goldstein (RETIRED) gentoo-dev 2008-05-07 14:59:10 UTC
Chainsaw is taking over this package.
Comment 27 Tony Vroon (RETIRED) gentoo-dev 2008-05-07 22:53:35 UTC
To confirm, this is a performance regression in the 169 (and early 173 beta) driver. If an older driver supports your card it may be worth downgrading (or disabling the composite extension which at least partially mitigates the problem).
There is a 173.08 beta ebuild in the portage tree that you can use to experiment, but it is unlikely to resolve your issue. I will add newer beta drivers to the tree as they appear, please join me in the wait for newer upstream drivers. I have an 8400M myself, I've seen the behaviour that you described.
Comment 28 Maxim Britov 2008-05-12 05:40:31 UTC
I check nv 2.1.8 with x11-xorg opengl. It have same trouble, but it unusable with gnome-terminal at all. I will attach screenshot.
Comment 29 Maxim Britov 2008-05-12 05:41:57 UTC
Created attachment 152903 [details]
Example of gnome-terminal with nv 2.1.8 and compositor enabled.
Comment 30 Tony Vroon (RETIRED) gentoo-dev 2008-05-12 08:42:05 UTC
The 'nv' driver is not accelerated. It is expected to perform much, much worse then the nvidia driver. If you want a free driver with acceleration support, look into Project Nouveau.
(Note that project Nouveau is not currently in the portage tree, and as such I can not accept bugs about it)
Comment 31 Maxim Britov 2008-09-12 18:42:23 UTC
It seems this issue fixed for me after update to mesa 7.1 / xorg-server-1.5 today.
Comment 32 Tony Vroon (RETIRED) gentoo-dev 2008-09-14 16:03:12 UTC
That's good news. Please leave the bug closed though.