OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Cautionary Word About Mouse Use And Busy Systems
iamasmith
post Jan 20 2006, 03:52 AM
Post #1





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



I think I have pinned down what happens to cause X to die on my Z occasionally.

Only seems to happen when the Z is paging a lot and X is not responsive and only seems to happen with a mouse connected.

I see a lot of dmesg errors coming from wxmouse and I think that the stream of mouse events generated by moving a mouse is overflowing a buffer because the X server is partially paged out and can't read this buffer (or something like that). Obviously stylus use generates single mousemove events rather than a constant stream so this isn't as likely to fill that buffer.

Bear this in mind if you are compiling something big, it can save a restart.

- Andy
Go to the top of the page
 
+Quote Post
iamasmith
post Feb 3 2006, 05:01 AM
Post #2





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



Yesterday I got a reply and a diff patch to the ws_drv from Matthieu Herb on this issue..

http://marc.theaimsgroup.com/?l=openbsd-ar...92269628962&w=2

The issue basically boils down to the order of conditions in a while loop, the original version read a byte from a buffer before checking the destination buffer length.. this caused a discard of that byte if the buffer was full. Since the events are multi-byte (just being copied 1 byte at a time) subsequent events would all be misaligned and this would happen on the first buffer overrun.

The posting above contains the source of the patch.

Attached here is a compiled version of that driver (built by Matthieu - many thanks I didn't have XF4 cvs built on my Z) and I have built an md5sum to go with it.

Replace /usr/X11R6/lib/modules/input/ws_drv.so with this version and I think you will find things a little more stable. - sorry you will have to rename it back to ws_drv.so - I couldn't post it with that extension.

On a seprate note you may get processes being put into a STOP state if your Zaurus is very busy (seems to happen to avoid thrashing). This unfortunately happens for thinks like xfwm which isn't greatly helpful since you need a Window Manager running to do most things in X. You can recover as follows...

i. Switch to a text vt using Ctrl-Alt-F2 (you can switch back to ttyC0/vt01 with Ctrl-Alt-F1)
ii. Login as root
iii. Run the top command and look for the processes marked 'stop' that may be effecting your X session.
iv. hit k (for kill)
v. enter '-CONT <pid>' (without the quotes and where <pid> is the process ID of the process you want to resume.
vi. hit q to quit from top when done.

Note that if something heavy is immediately pushing your process back to sleep you can use kill -STOP <pid> to suspend that process until you have managed to deal with your X session then you can kill -CONT that process to resume it.

This is far from ideal so I'm now looking to see if there is a way of flagging stuff so it doesn't get stopped like this (or disabling the feature). - If anyone knows how to do this then that would be great smile.gif

- Andy
Attached File(s)
Attached File  ws_drv.so.renameme.txt ( 14.94K ) Number of downloads: 65
Attached File  ws_drv.so.md5sum.txt ( 44bytes ) Number of downloads: 29
 
Go to the top of the page
 
+Quote Post
iamasmith
post Feb 3 2006, 06:26 PM
Post #3





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



Perhaps my previous post was misleading about the processes going into STOP state..

That actually isn't related to the ws_drv posted above... that's an entirely seperate issue.

I would recommend using this update or building it yourself as it significantly improves the X server stability on the Zaurus.

- Andy
Go to the top of the page
 
+Quote Post
iamasmith
post Feb 4 2006, 02:35 AM
Post #4





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



QUOTE(iamasmith @ Feb 3 2006, 01:01 PM)
Yesterday I got a reply and a diff patch to the ws_drv from Matthieu Herb on this issue..

http://marc.theaimsgroup.com/?l=openbsd-ar...92269628962&w=2
On a seprate note you may get processes being put into a STOP state if your Zaurus is very busy (seems to happen to avoid thrashing). This unfortunately happens for thinks like xfwm which isn't greatly helpful since you need a Window Manager running to do most things in X. You can recover as follows...

i. Switch to a text vt using Ctrl-Alt-F2 (you can switch back to ttyC0/vt01 with Ctrl-Alt-F1)
ii. Login as root
iii. Run the top command and look for the processes marked 'stop' that may be effecting your X session.
iv. hit k (for kill)
v. enter '-CONT <pid>' (without the quotes and where <pid> is the process ID of the process you want to resume.
vi. hit q to quit from top when done.

Note that if something heavy is immediately pushing your process back to sleep you can use kill -STOP <pid> to suspend that process until you have managed to deal with your X session then you can kill -CONT that process to resume it.

This is far from ideal so I'm now looking to see if there is a way of flagging stuff so it doesn't get stopped like this (or disabling the feature). - If anyone knows how to do this then that would be great smile.gif
*


Mystery solved - don't build or install DBUS unless you find out how to disable the following behaviour.

When VTs are switched DBUS sends a SIGSTOP to all processes that are associated with that VT, unfortunately under certain conditions it also happens when you don't switch VT sad.gif

DBUS isn't in the ports feed anyway.. it was an add-on build that I thought may help.

- Andy
Go to the top of the page
 
+Quote Post
iamasmith
post Feb 4 2006, 03:51 AM
Post #5





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



BTW: the ws_drv patch shown above seems to have resolved all my X server crashes (must try harder to break it smile.gif) - I have now had xfce4 running with AbiWord and 80Mb of pagefile in use whilst Konqueror-Embedded is building in the background... bullet proof so far smile.gif

Please note there was a snapshot of the Zaurus X stuff made on 3rd Feb '06, other base stuff was uploaded on the 1st - this patch hasn't been committed to the -current cvs yet so you will still need to either patch source or use the above binary to implement the fix with this snapshot.

- Andy
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th December 2014 - 12:08 PM