This is a serious issue that developers yet don't know how to fix. See https://bugs.launchpad.net/midori/+bug/902594 So GTK+ 3 support in Midori seems to be broken. GTK+ 3 enabled too soon?
I know about the upstream bug but I haven't seen such problem on my own install; nor has anyone reported about it. This really feels like duplicating the already known upstream information to drive some alternative agenda.
The bug is probably less noticeable on fast computers. Maybe that's also the reason for no reports, or maybe few people use Midori. In QEMU and on netbook I observe 100% CPU usage when tab is loading in background. If you can't reproduce the bug, then you could try finding out what component of the system makes it disappear (especially if you are running a mostly unstable system), instead of seeing anti-gtk3 lobby everywhere. I have already mygrated to GTK+ 3 -- why would I want to revert this? If you want to observe the bug, download latest Liberté Linux .ova bundle on SourceForge, and see for yourself in VirtualBox, for instance.
^^ .ova bundle -- in snapshots.
Just for the record: I've been using midori with GTK+ 3 on ~x86 for quite a long time now, and I have never seen such a problem myself. In fact, I'm typing this in midori right now, and the program stays below 1% CPU usage even if I type quickly. ;-) So nope, this certainly doesn't seem to be a general problem.
(In reply to comment #4) > In fact, I'm typing this in midori right now, and the program stays below 1% CPU usage even if I type quickly. ;-) Are you trying to reproduce the bug in the right way? This bug has nothing to do with CPU usage of Midori per se. You need to open a tab with a site that takes some time to load, and then switch to a different tab. @ssuominen: This refers to you, too. This bug is easily reproducible in the latest Liberté Linux snapshot: http://sourceforge.net/projects/liberte/files/snapshots/liberte-snapshot-20120328.ova/download. To me it seems that you are not interested in fixing the bug, or finding out what triggers it, and are instead focused on enabling GTK+ 3 support in all packages, even those in which such support triggers critical bugs. You let Midori developers understand that newer WebKit fixes the issue, when in reality you never experienced it, including with older WebKit.
An even easier way to reproduce: 1. Ctrl-T 2. Ctrl-PgUp The above gives instant 100% CPU until the empty tab is closed. Toggling full screen with F11 disables CPU load as long as full screen is active.
Also: reloading the current page drops the CPU load. So if there is a page that constantly reloads something, the issue is probably more difficult to detect.
Upstream asked for some basics like specific package version information of webkit-gtk, gtk+, and midori and with what flags they were built with. From Gentoo POV, I can see `emerge --info` missing too.
Portage 2.1.10.49 (hardened/linux/x86, gcc-4.5.3, glibc-2.13-r4, 3.2.2-hardened-r1 i686) ================================================================= System Settings ================================================================= System uname: Linux-3.2.2-hardened-r1-i686-with-gentoo-2.0.3 Timestamp of tree: Fri, 30 Mar 2012 00:45:01 +0000 app-shells/bash: 4.2_p20 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.2.2 dev-util/cmake: 2.8.6-r4 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.9.6-r3, 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.5-r2 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 3.1 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo liberte ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="@FREE freedist unRAR lha @BINARY-REDISTRIBUTABLE Atmel SIL-freeware amd-ucode Conexant-firmware Hauppauge-Firmware" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -march=pentium3 -mtune=core2 -mfpmath=sse -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc/locale.gen" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-Os -march=pentium3 -mtune=core2 -mfpmath=sse -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-unmerge-warn --autounmask=n" FEATURES="assume-digests binpkg-logs collision-protect compress-build-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org http://mirrors.kernel.org/gentoo" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O,1,-z,combreloc" LINGUAS="*" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://disabled" USE="X X509 aac acl acpi action_modeswitch alsa archive aspell bluetooth bs2b bzip2 cairo caps cdda cjk cli consolekit crypt cue dbus dhcp djvu dri eap-tls edd exif expat flac gconf gmp gpm grammar groupwise gtk hardened hires-icons hwdb hybrid-auth iconv id3tag idn iproute2 irda jbig jpeg jpeg2k keymap lcms libkms libnotify lzma m17n-lib mad madwifi mktemp mmx modules mp3 multicall ncurses networkmanager nls nptl nptlonly ntfsprogs ogg opengl openmp ots pam pax_kernel pcmcia pcre pcsc-lite pic pkcs11 png policykit pppd pth readline scsi silc smartcard smime sna sndfile speex spell sse startup-notification staticsocket svg symlink sysfs thesaurus threads tiff truetype unicode urandom usb v4l vorbis wavpack webgl wimax wmf x86 x86emu xattr xft xinerama xmp xorg xv zlib" ALSA_CARDS="sb16" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-32 efi-64" INPUT_DEVICES="evdev synaptics vmmouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="*" LIRC_DEVICES="sir devinput bte mceusb hauppauge hauppauge_dvb" NGINX_MODULES_HTTP="access fastcgi gzip limit_req limit_zone map rewrite stub_status" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware virtualbox qxl" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= www-client/midori-0.4.3 was built with the following: USE="libnotify nls unique -doc -gnome"
x11-libs/pango-1.29.4 USE="X introspection -debug -doc -test" dev-libs/atk-2.2.0 USE="introspection nls -doc" x11-base/xorg-server-1.11.2-r2 USE="nptl udev xorg -dmx -doc -ipv6 -kdrive -minimal -static-libs -tslib -xnest -xvfb" x11-libs/gtk+-3.2.3 USE="introspection xinerama (-aqua) -colord -cups -debug -doc -examples (-packagekit) -test -vim-syntax" net-libs/webkit-gtk-1.6.1-r301 USE="gstreamer introspection spell webgl (-aqua) -coverage -debug -doc -jit -test"
Created attachment 307247 [details] emerge -pve @world
Typical "top" output in VMware ("vmwlegacy" Xorg driver), after opening Midori (static local .html page is set as homepage), Ctrl-T + Ctrl-PgUp: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3941 root 20 0 56292 13m 5012 R 66.6 5.4 3:17.21 X 9359 anon 20 0 127m 39m 21m S 13.3 15.8 0:04.37 midori Same can be observed in VirtualBox ("vboxvideo" driver), real hardware ("radeon"), etc. The behavior is exactly as described in upstream bug. Upgrading to webkit-gtk-1.6.3-r300 does not fix the problem.
The load is much lower if gtk-theme-name is disabled in gtk-3.0/settings.ini: 25% X + 10% midori. I am using light-themes-0.1.8.27.2, and don't have gnome-themes-standard installed, so disabling gtk-theme-name uses the default ugly GTK+ theme, not Adwaita. Could it be that Adwaita just handles infinite X events loop better? You can see if there are excessive X events by running midori via strace. After Ctrl-T + Ctrl-PgUp, there is an unending stream of clock_gettime/poll system calls.
After installing gnome-themes-standard, and using the default gtk-3.0 settings with Adwaita theme, CPU usage is 10% midori + 20% X (after Ctrl-T + Ctrl-PgUp). But after switching back to the new tab, CPU usage is 45% midori + 45% X.
Share the extra information in the upstream bug. Closing this one in favour of the upstream bug (as requested).
What does upstream say about gtk3 support in Midori in view of this bug? If gtk3 support is not stable, then midori ebuild should provide an option to compile against gtk2.
After today's update to gtk+-3.4.0, I don't see high CPU usage anymore. Version of webkit-gtk is 1.6.1-r301, midori is 0.4.4.