Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257794 - x11-misc/synergy - fix synergyc stalling when used with xcb based libX11
Summary: x11-misc/synergy - fix synergyc stalling when used with xcb based libX11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL: http://sourceforge.net/tracker/?func=...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 17:54 UTC by Kai Groner
Modified: 2009-10-30 09:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from upstream project's tracker (synergy-stuttered-delay-fix.patch,2.09 KB, patch)
2009-02-05 17:58 UTC, Kai Groner
Details | Diff
Modified ebuild (synergy-1.3.1.ebuild,1.37 KB, text/plain)
2009-02-05 18:02 UTC, Kai Groner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Groner 2009-02-05 17:54:54 UTC
Quote from the issue in upstream project's tracker: 

  Fix intermittent delay problem with synergyc under Xwindows
  There is poor assumption in the XWindowsEventQueue
  class. The assumption is that all events will cause
  a change on the Xwindows file descriptor. This is not
  true. Some events are queued in the Xlib buffers. This is
  extremely noticable with the new xcb version of Xorg.

  It causes synergy to hang or delay for a period of time
  (timeout value in waitForEvent) as there is no event on
  the fd to wake up the thread. This delay is VERY annoying.

  The fix is to check for events not only from the server
  itself but also in the xlib event queue. We don't need to
  lock this test as it's a non blocking io call.

  We change the XPending call in isEmpty to QueueLength to
  avoid the XFlush call that XPending may cause.

  This fix eliminates the delay at the cost of a little more
  cpu time - still < 1% on my box.

I've applied this patch and it does smooth out the stalls I
have been experiencing lately.



Reproducible: Always

Steps to Reproduce:
1. Install x11-libs/libX11 with xcb use flag
2. Install synergy
3. Run synergyc on the gentoo side

Actual Results:  
Moving the mouse connected to the synergy server, on the synergy client display, there are frequent pauses often lasting seconds.  Various LANS have exhibited this problem.

Expected Results:  
No or nearly no pauses.

I am using keyword masked libX11-1.1.5 and keyword masked libxcb-1.1.90.1,
I have not tested this with non-masked libX11-1.1.4 or libxcb-1.1.

synergy connections are made through ssh forwarded ports.
Comment 1 Kai Groner 2009-02-05 17:58:06 UTC
Created attachment 181063 [details, diff]
Patch from upstream project's tracker
Comment 2 Kai Groner 2009-02-05 18:02:16 UTC
Created attachment 181064 [details]
Modified ebuild

--- /usr/portage/x11-misc/synergy/synergy-1.3.1.ebuild	2008-04-21 10:07:17.000000000 -0400
+++ synergy-1.3.1.ebuild	2009-02-05 11:51:56.000000000 -0500
@@ -29,4 +29,5 @@ src_unpack() {
 
 	epatch "${FILESDIR}/${P}+gcc-4.3.patch"
+	epatch "${FILESDIR}/${PN}-stuttered-delay-fix.patch"
 
 	# Remove -Werror usage.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2009-02-05 22:40:35 UTC
Maybe block bug #174434?
Comment 4 georg.wacker 2009-07-01 14:42:25 UTC
I can confirm that this patch makes synergy(c) usable again. I'm on ~amd64.
Comment 5 Cyrill Helg 2009-10-15 14:51:34 UTC
I'm having the same issue. Do you have this patch applied on the machine that runs the server or the client? I just did update the client and it did not fix it. 
Comment 6 georg.wacker 2009-10-15 14:57:07 UTC
My gentoo-box connects to a mac synergy server (also 1.3.1).
Comment 7 Alex Alexander (RETIRED) gentoo-dev 2009-10-30 09:25:55 UTC
patch in tree, thanks Kai :)