Skip to content

Cinnamon applet using 90% CPU #4990

Closed
Closed

Description

@mdavis-xyz

I've recently noticed that my computer has been quite slow recently. My System Monitor often shows CPU usage up near 90% when I'm doing nothing but writing emails and reading pdfs.
I initially thought this was a Cinnamon issue (comment thread in cinnamon repo), since the System Monitor attributes the high CPU usage to cinnamon. However now I'm pretty certain it's Owncloud. Specifically I think it's an issue with the panel applet, because that would explain why it's being counted towards Cinnamon's CPU usage and not owncloud.

Symptoms

  • My CPU is often running at 90% (as shown with top and the System Monitor GUI) when I'm not anything intensive (reading pdfs, browsing facebook, etc). Both tools attribute the high CPU usage to cinnamon.
    • I cannot watch videos or animated GIFs without visual stuttering
    • when I type, what I see on the screen is often several characters behind what I've pressed
    • Scrolling through pdfs is not smooth
    • switching between windows is laggy
    • etc

Why I blame OC

I realise that 'my computer is slow' is a really vague claim, which is hard to address.

I tried the following things to figure out the cause:

  • Removing cinnamon panel widgets
  • Resetting all Cinnamon settings to default
  • Using one monitor instead of two
  • Not using a VPN
  • Quitting background programs (dropbox, syncthing, bitmeter OS, KDE Connect, etc)

The only thing which made the lag go away was quitting the owncloud client.
I even did a clean install. It didn't lag when the system was clean. Then I installed owncloud and it got laggy again.

Other Info

  • I have 15 different folders synced through Owncloud, which might be an unusually high number.
  • This issue only started a few weeks ago
  • My laptop is fairly high end, so client hardware performance is not an issue.

Server configuration

Operating system: Debian 8.5 Jessie

Web server: Apache 2

Database: MySQL

PHP version: PHP 5.6.20-0+deb8u1

ownCloud version: 9.0

Storage backend: USB Hard drive

Client configuration

Client version: 2.2.1

Operating system: Mint 17.3, Cinnamon

OS language: English (AU)

Installation path of client: /usr/bin/owncloud

Logs

Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.

  1. Output of owncloud --logfile log.txt: here. It's a 12MB file. Is that normal? That seems large.
  2. Web server error log: I don't know where to find that
  3. ownCloud log (data/owncloud.log):
{"reqId":"tNyWXOgPjLh9TcY4h31E","remoteAddr":"10.1.1.2","app":"PHP","message":"Undefined offset: 0 at \/var\/www\/owncloud\/lib\/private\/appframework\/http\/request.php#700","level":3,"time":"2016-02-07T10:01:44+00:00"}
{"reqId":"tNyWXOgPjLh9TcY4h31E","remoteAddr":"10.1.1.2","app":"PHP","message":"fopen(\/var\/www\/owncloud\/config\/config.php): failed to open stream: No such file or directory at \/var\/www\/owncloud\/lib\/private\/config.php#191","level":3,"time":"2016-02-07T10:01:46+00:00"}
{"reqId":"bGtnGf30MR0XctpWoy0c","remoteAddr":"10.1.1.2","app":"PHP","message":"Undefined offset: 0 at \/var\/www\/owncloud\/lib\/private\/appframework\/http\/request.php#700","level":3,"time":"2016-02-07T10:04:02+00:00"}
{"reqId":"PgUCF3KMcARqC+gyrFi5","remoteAddr":"10.1.1.2","app":"PHP","message":"Undefined offset: 0 at \/var\/www\/owncloud\/lib\/private\/appframework\/http\/request.php#700","level":3,"time":"2016-02-07T10:06:21+00:00"}
{"reqId":"UXTOFkw7kQlJfxGObX0O","remoteAddr":"10.1.1.2","app":"PHP","message":"Undefined offset: 0 at \/var\/www\/owncloud\/lib\/private\/appframework\/http\/request.php#700","level":3,"time":"2016-02-07T10:07:04+00:00"}

Activity

  1. ckamm commented on Jun 21, 2016

    @ckamm
    Contributor

    Thanks for the report! This may be related to #4985. Do you also see the "Enabled QDBusPlatformMenu workaround" string in your owncloud client logs? Which version of Qt are you using (try owncloud --version)?

  2. ckamm commented on Jun 21, 2016

    @ckamm
    Contributor

    @mlda065 Please also try running the owncloud client with XDG_CURRENT_DESKTOP set to xfce to check whether that's a workaround.

  3. mdavis-xyz commented on Jun 21, 2016

    @mdavis-xyz
    Author

    "Enabled QDBusPlatformMenu workaround" doesn't appear in my log.

    Qt 4.8.6

    In #4985

    when I click on icon and wait few seconds, menu will be closed on menu re-rendering, so it is not always easy to even open settings.

    I've noticed that too.

    Please also try running the owncloud client with XDG_CURRENT_DESKTOP set to xfce to check whether that's a workaround.

    Do you mean this?

    matthew@Kira2 ~ $ XDG_CURRENT_DESKTOP="xfce"
    matthew@Kira2 ~ $ owncloud --logfile OClog.txt
    

    Unfortunately it's still happening when I do that.

  4. ckamm commented on Jun 22, 2016

    @ckamm
    Contributor

    @mlda065 Interesting, then I don't know what's going on yet.

    Please try

    matthew@Kira2 ~ $ XDG_CURRENT_DESKTOP="xfce" owncloud --logfile OClog.txt
    
  5. guruz commented on Jun 22, 2016

    @guruz
    Contributor

    @mlda065 ... in one line.

  6. mdavis-xyz commented on Jun 23, 2016

    @mdavis-xyz
    Author

    Is there meant to be a semicolon in that single line version? I don't know much about terminal variables, but I don't think it's actually being changed

    matthew@Kira2 ~ $ XDG_CURRENT_DESKTOP="xfce" owncloud --logfile OClog.txt
    

    Then I quit owncloud, then in the same terminal:

    matthew@Kira2 ~ $ echo $XDG_CURRENT_DESKTOP
    X-Cinnamon
    matthew@Kira2 ~ $ XDG_CURRENT_DESKTOP="xfce" owncloud --logfile OClog.txt &
    [1] 4381
    matthew@Kira2 ~ $ echo $XDG_CURRENT_DESKTOP
    X-Cinnamon
    matthew@Kira2 ~ $ XDG_CURRENT_DESKTOP="xfce"; owncloud --logfile OClog.txt &
    [2] 4399
    [1]   Done                    XDG_CURRENT_DESKTOP="xfce" owncloud --logfile OClog.txt
    matthew@Kira2 ~ $ echo $XDG_CURRENT_DESKTOP
    xfce
    
  7. mdavis-xyz commented on Jun 23, 2016

    @mdavis-xyz
    Author

    Hmm.
    With the semicolon, I think it's better. Now it's only rising to 30% (still causes visual lag), every 20 seconds. (30% of one core)

    It peaks when OC polls for folder changes (every 20 seconds)
    Which, in the log is:

    06-23 14:03:56:252 0x2357460 Scheduling "https://www.mdavis.xyz/owncloud/remote.php/webdav/Documents/BBB" to check remote ETag 
    06-23 14:03:56:252 0x2357460 !!! OCC::RequestEtagJob created for "https://www.mdavis.xyz/owncloud" + "/Documents/BBB" "OCC::Folder" 
    

    In the log (with XDG_CURRENT_DESKTOP set, with semicolon) now I'm seeing lots of lines like this

    06-23 14:01:27:049 0x2357460 �[31mQVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const�[0m: Condition failed: action
    

    There are about 20 lines like that for every folder, preceded (for each folder) by:

    06-23 14:03:26:876 0x2357460 Scheduling "https://www.mdavis.xyz/owncloud/remote.php/webdav/Documents/jobs" to check remote ETag 
    06-23 14:03:26:877 0x2357460 !!! OCC::RequestEtagJob created for "https://www.mdavis.xyz/owncloud" + "/Documents/jobs" "OCC::Folder" 
    

    Is there a way to run the OC client as a background daemon without displaying the applet? I'm wondering whether that may be a temporary workaround until we solve the issue. (Currently I have to start OC to sync files, then quit it when I want to be productive.)

  8. ckamm commented on Jun 23, 2016

    @ckamm
    Contributor

    @mlda065 Thanks for testing. There currently is no option for disabling the tray menu and its updates.

    My current guess is that adjusting the tray menu (the "Recent Changes" submenu during a sync or the full thing in setupContextMenu) causes significant load in cinnamon. I don't know why yet.

    Maybe it's related to the older Qt version? It's not using the QDBusPlatformMenu integration plugin that was new in Qt 5.

  9. ckamm commented on Jun 23, 2016

    @ckamm
    Contributor

    @mlda065 I've added a "minimal tray" mode that can be enabled by setting the OWNCLOUD_MINIMAL_TRAY_MENU environment variable. I suspect the symptoms will go away when it is set. You need to either compile the 2.2 branch or wait for a new nightly to test it https://build.opensuse.org/package/show/isv:ownCloud:community:nightly/owncloud-client

    In the end, this is probably a bug in cinnamon. Yes, the client re-setups the tray menu several times per minute (to work around other tray menu bugs...) but doing so shouldn't cause excessive CPU use.

  10. self-assigned this
    on Jun 23, 2016
  11. added this to the 2.3.0 milestone on Jun 23, 2016
  12. mdavis-xyz commented on Jun 29, 2016

    @mdavis-xyz
    Author

    What should I set that variable to? 1?

  13. cweiske commented on Jun 29, 2016

    @cweiske

    Either export the variable, or set it without semicolon:

    $ XDG_CURRENT_DESKTOP="xfce" owncloud --logfile OClog.txt
    

    or

    $ export XDG_CURRENT_DESKTOP="xfce"
    $ owncloud --logfile OClog.txt
    

    Using a semicolon in there does not change anything internally.

  14. 5 remaining items

  15. ckamm commented on Jul 21, 2016

    @ckamm
    Contributor

    @bartoffw Thank you for the comment, I'm glad the problem resolved itself with an upgrade. Which version of Cinnamon are you using exactly now? @wvandelli is using 3.0.5 and gets the problem there.

    @wvandelli If it only happens in some configurations that makes it even more likely that the problem is outside of the ownCloud client. Did you get around to playing with the style a bit? I'm also surprised that the ownCloud icon in the tray menu looks so different in the two screenshots given that you say it should be the same software.

    In general I think #4990 (comment) still applies: it's probably an issue in Cinnamon or with the Qt-Cinnamon interaction. We could automatically enable the minimal-tray workaround if we figure out under which conditions this problem occurs and can detect it reliably but I'm not sure what to do beyond that.

  16. ckamm commented on Jul 21, 2016

    @ckamm
    Contributor

    Possible workaround: #5072

    Note that it does not fix the underlying issue, but should make it less apparent by updating the context menu less often.

  17. bartoffw commented on Jul 21, 2016

    @bartoffw

    @ckamm I'm using Cinnamon 3.0.7. Before the upgrade the CPU usage went to 100% for a few seconds exactly every 30 seconds. Now I don't see such behavior anymore.
    I have the "Use Monochrome Icons" checked in my ownCloud client if it makes any difference.

  18. wvandelli commented on Jul 21, 2016

    @wvandelli

    @ckamm I do not disagree with you. Unfortunately my bug with Cinnamon did not attract much attention so far. Anyway, to keep the status up to date, I moved to 3.0.7 too. The owncloud client icon in the tray try still flickers. However the desktop does not seem to freeze so badly anymore, but it still does (tested watching a useless youtube video).

    And, yes, I finally understood the nature of the different styles. The fancier, problematic style is activated by enabling support for "indicators" in the Cinnamon General settings.

    cinnamon_general_settings

    I will test #5072 at the first occasion.

  19. added
    ReadyToTest
    on Aug 15, 2016
  20. ckamm commented on Aug 15, 2016

    @ckamm
    Contributor

    Even though this is an upstream bug, the problem should be significantly reduced with the latest master (2.3.x) builds.

  21. guruz commented on Aug 24, 2016

    @guruz
    Contributor
  22. guruz commented on Aug 31, 2016

    @guruz
    Contributor

    Tomorrow's Linux nightlies should be based on 2.3
    Please try with those.

  23. ehartmann commented on Sep 15, 2016

    @ehartmann

    The 2.3-rc1 fixes the issue on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ReadyToTesttype:bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions