Launching the matchbox on-screen keyboard causes pcmanfm 1.2.3-1+raspi to go to 100% CPU usage. The 100% CPU usage continues even if matchbox is closed. This behavior doesn't seem to occur with pcmanfm 0.9.10-3.
On the latest Raspbian image (February 16, 2015), launching the Matchbox on-screen keyboard causes the file manager (pcmanfm) to use up all available CPU usage. The CPU usage does not return to normal even if Matchbox is closed. The 100% CPU usage only occurs when pcmanfm is run in desktop mode (either on initial Raspbian launch, or with the command 'sudo pcmanfm --desktop'). It does not occur when pcmanfm is launched in a window (like when 'File Manager' is launched from the 'Accessories' menu). This behavior does not occur with the September 9, 2014 Raspbian image.
Anonymous
Sorry, there was an error in the above "Steps to reproduce" - In step 1, it should be the current Raspbian image, not the September 9th, 2014 image.
Info for the working (September 9th, 2014) image (No 100% CPU usage after Matchbox)
pcmanfm version: 0.9.10
OS Version: Linux raspberrypi 3.18.10+ #774 PREEMPT Wed Mar 25 13:58:34 GMT 2015 armv6l GNU/Linux ["Raspbian GNU/Linux 7 (wheezy)"]
If you start desktop support as user root then your application tries to own the desktop then it might be some conflict. Unfortunately I cannot test it since I don't know what matchbox does exactly and how to reproduce it. I would like you to try start pcmanfm in standard mode (without any sudo) and report, please, if it behaves the same way or your issue doesn't happen.
Unfortunately ancient version 0.9.10 (which was deprecated and unsupported since 2012) cannot be compared with current one due to too many changes since then, and therefore any issue should be investigated from scratch. And I might need your help with debug since I cannot test it myself (strictly speaking, I have 1st version of Raspberry Pi board somewhere but I'm not sure if I can reproduce your environment as I don't have any touchscreen that may be connected to it).
Thank you very much.
Hi, sorry I missed the notification for your previous question. The default user on Raspian is 'pi', not 'root' so I don't believe that can be the cause.
I will test 'pcmanfm --desktop' (without the sudo) soon, and get back to you with the results.
For your other question, Matchbox is an on-screen virtual keyboard as is used with touchscreens and tablets. It also works with a mouse. A touchscreen is not required.
Last edit: Dan 2015-05-19
Thank you very much. If you think it can be reproducible without touchscreen then may be I'll try it when time permits. I'm not sure though if it can run on my Pi (it's version 1 B board, not even B+) but I give it a shot, I didn't tried to use it for awhile.
Model B is fine. Should be pretty easy to reproduce:
Here are the results:
'pcmanfm --desktop' --> CPU usage goes to 100% when Matchbox keyboard is launched
'sudo pcmanfm --desktop' --> CPU usage goes to 100% when Matchbox keyboard is launched
'pcmanfm' --> CPU usage stays at 0% when Matchbox keyboard is launched
'sudo pcmanfm' --> CPU usage stays at 0% when Matchbox keyboard is launched
Last edit: Dan 2015-05-23
Unfortunately I could not find a source of that 100% CPU usage, trying gdb it shows stack is corrupted when I break execution, and even setting breakpoints in the pcmanfm code doesn't help, it doesn't stop on any. And BTW, the same matchbox with the same pcmanfm never has that problem on PC, only on Raspberry Pi. I'm afraid there is some XOrg problem on Raspberri Pi which causes this, I also got it to 100% when tried to configure panel keyboard switcher - the setxkbmap ate all the CPU, even mouse cursor was not much responsible so I had to kill panel from console (Ctrl+Alt+F1 then login) to be able to access terminal window. I'll test it again when time permits.
Thanks for looking into this! Very strange about the stack corruption. Is it possible to debug it by going the reverse way (i.e. setting breakpoints in the Matchbox code and stepping through it to see which line causes the problem)? Perhaps that would give a hint about where the problem lies in PCManFM (if in fact the problem is in PCManFM and not somewhere else)?
Also, is it possible that the 100% CPU usage is causing the debugger problems (i.e. Would it help to set the PCManFM thread priority very low, so that it is not able to hog the CPU and "starve" gdb of CPU time)? Or is it not possible for that to be the cause?
I'm sorry, you probably don't know how debugger works. It does not run in any thread or in background, it just adds some code over a running application so it can be stopped and debugger get control to inspect application current state, only debugger or application may run at the same time, not both. And if debugger shows stack corrupted then either application is really messed up, or debugger works incorrectly in that architecture. I need some more tests to decide is it former or latter case.
And I'm afraid it's really impossible to trace matchbox events to find a hint, I need to learn all details of matchbox code to do that, it's too much work with too low chance to get any help, I'm sorry.
I have the same problem. Did you find any workaround to this?
I have the same problem (100% CPU usage) on a RaspberryPI model A (with latest raspian).
Same symptoms here. Did an apt-get upgrade yesterday and after running matchbox, pcmanfm sucks up all the CPU cycles, even after a soft reboot. Cycling power fixes it until the next time matchbox runs.
I launch matchbox from a script. The code segment looks like this:
matchbox-keyboard&
zenity --username --password
killall matchbox-keyboard
This pops up a keyboard for a dialog when necessary and then goes away again. Crude, but it worked well and still works fine with Ubuntu on a PC.
Last edit: Chris Martinus 2016-09-30
There is a simple solution using python
import os
os.system("matchbox-keyboard")
quit()
This wil keep your CPU normal
There is a chance this issue is caused by the same as [#1028] which is now fixed in the GIT repository sources. Test it when possible, please, and report back whether it's fixed too or not. Thank you very much.
Related
Bugs: #1028
Nope it's stil broken. Cpu usage spikes to 100 and then settles at 25. Stays there until rebooting.
I confirm this 2017/07/04 is still broken on my pi from apt-get.
matchbox-keyboard 0.1
Copyright (C) 2007 OpenedHand Ltd.
Last edit: slajerek 2017-07-04
'metoo' - matchbox in raspbian repos needs to be updated:
matchbox-keyboard-im 0.1+svn20080916-10 armhfraspbian 8.0 on pi3
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Same problem here. 100% CPU after boot RPi + immediately launching matchbox-keyboard. From "ps ax" I see "pcmanfm --desktop --profile LXDE-pi". "kill -9 pid" on pnmanfm restarts the process and fixes the CPU. Closing the on-screen keyboard does nothing to reduce CPU. This is a new RPi 3 B fresh out of the box and patched
uname -a: Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux