Menu

#1627 High CPU usage on idle on Linux Mint

KeePass_2.x
closed
nobody
5
2017-05-07
2017-05-02
JN
No

I run KeePass on Linux, via Mono - and using also 'keepass2-plugin-tray-icon'.

The problem: when KeePass is minimised to tray, and not running any of its 'trigger' actions (so far as I can tell) it uses some 4% of my CPU, every second or so. This seems wrong and (slightly) bad and may indicate some underlying, more serious problem.

Screenshot

I've reduced the NICE value of the Cli process (slightly) but that doesn't reduce the CPU usage of the process (though I imagine it would were the machine under severe CPU load).

My system: Linux Mint 18.1 x64 Cinnamon. 8GB RAM. SSD. Core2Duo processor.

Discussion

  • JN

    JN - 2017-05-02

    The screenshot didn't work. I attach it to this comment.

     
  • Paul

    Paul - 2017-05-06

    Try it without the plug-in.

    cheers, Paul

     
  • JN

    JN - 2017-05-06

    I overlooked that rather obvious testing possibility. Apologies. When I did remove the plugin, I found that the CPU usage for cli when KeePass was idle was 1-3 (and more often 1 and 2 than 3)%, (By 'idle' I mean: minimised to a functioning tray icon - for that's what happens when I minimize or close KeePass without the plugin installed). So that's less CPU usage than before - the plug is adding some - but it's still slightly on the high side, no?

     
  • Paul

    Paul - 2017-05-06

    The use is more likely to be mono than KeePass, but I think 2% is OK - it would be nice if it were lower.

    cheers, Paul

     
  • JN

    JN - 2017-05-06

    Well, 2% could be 4% - on idle - on a single-core CPU . . But, yes, not that bad. Unless you have any tips for reducing Mono CPU usage (and I am using the current beta of mono, because otherwise the aforementioned plugin does not work), I'll close this ticket (once, erm, I work out how to close it).

     
  • JN

    JN - 2017-05-07

    With the help of a third-party (whose name I'll post here if he's happy for me to disclose it), I've found the problem and found the solution. The problem is that the version of KeePass that I have (or rather had . . ) writes to the clipboard multiple times a second. The solution is this patched version of KeePass: http://packages.ubuntu.com/zesty/keepass2

    That version, I think, is for Ubuntu Zesty / Ubuntu 17.04. It seems to me that the fix should be backported to versions of KeePass that run on earlier versions of Ubuntu.

     
  • Dominik Reichl

    Dominik Reichl - 2017-05-07
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 2017-05-07

    Interesting, thanks for the analysis.

    Apparently the maintainer of the Debian/Ubuntu package turns off a workaround for a Mono clipboard bug. For my builds, I prefer a working clipboard, thus I'll not remove the workaround.

    Best regards,
    Dominik

     
  • JN

    JN - 2017-05-07

    Oh dear - I hadn't throught that the patch would disable any functionality. Still, I find that the 'copy username' and 'copy password' functions still work. So I presume that it is some more abstruse clipboard function(s) that gets disabled - and I can live with that. So . . backport after all? Or, on this website, give a prominent link to the patched version?

     
  • Dominik Reichl

    Dominik Reichl - 2017-05-07

    The workaround is for clipboard commands in context menus provided by Mono, for example the commands in the context menu of the user name textbox in the 'Edit Entry' dialog.

    Best regards,
    Dominik

     
  • JN

    JN - 2017-05-07

    Dear Dominik

    (1) On my system, the clipboard commands that you mention still work in the patched version of KeePass. However, I am using the beta of Mono.

    (2) That then - the patched KeePass and the mono beta - seems a good combination; so why not advertise it - fairly prominently - here on the sourceforge pages for KeePass? Otherwise, people will have a substandard experience, either by having high CPU usage (if they use the standard KeePass on low-powered devices) or (if they use the patched version of KeePass but the older version of Mono) by having only a partially working clipboard.

     

Log in to post a comment.