ArcticaProject / nx-libs

nx-libs
Other
120 stars 39 forks source link

Mouse unusable with nxagent (~3.5.99.24 and later) #983

Closed realsimix closed 3 years ago

realsimix commented 3 years ago

My test setup was broken because of a dead motherboard. After quite some time I was now able to fix it and did tests with recent versions of nx-libs.

I've discovered a strange issue where the mouse is unusable. Mouse movement works but it seems like mouse buttons are mixed up somehow and mouse clicks don't work.

I've tested with some snapshots I had on disk: nxagent 20200630 OK nxagent 20201022 BROKEN nxagent 20201105 BROKEN nxagent 20210109 BROKEN

Does anybody remember changes which could result in such issues?

Thanks, Simon

uli42 commented 3 years ago

Hmm, I am not aware. Am I right that you can reliably trigger that?

On Mon, Jan 11, 2021 at 8:02 AM Simon Matter notifications@github.com wrote:

My test setup was broken because of a dead motherboard. After quite some time I was now able to fix it and did tests with recent versions of nx-libs.

I've discovered a strange issue where the mouse is unusable. Mouse movement works but it seems like mouse buttons are mixed up somehow and mouse clicks don't work.

I've tested with some snapshots I had on disk: nxagent 20200630 OK nxagent 20201022 BROKEN nxagent 20201105 BROKEN nxagent 20210109 BROKEN

Does anybody remember changes which could result in such issues?

Thanks, Simon

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ArcticaProject/nx-libs/issues/983, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQHBZFEV77PZDN3JOV7GZLSZKPBRANCNFSM4V5EEEBA .

realsimix commented 3 years ago

Correct, nxproxy version doesn't matter but nxagent does. I start an XFCE session and mouse is not usable, it moves but keys don't work as expected and desktop can not be used.

nxproxy is latest from git nxagent from 20200630 works nxagent from 20201022 and later are broken

Just discovered something interesting: This happens with nxagent -geometry fullscreen. As soon as I switch to window mode with Alt&F, it works. Then switching back to fullscreen again with Alt&F keeps the session working.

uli42 commented 3 years ago

I will try to trigger this this evening.

3.5.99.24 was released on May 31st 3.5.99.25 was released on Nov. 4th

So what are the dates you are mentioning related to?

Here are the merges we had in your time frame:

The merges marked with X are probably not causing this because they are changing stuff outside of nxagent. The only keyboard related change is 2b0976e. So maybe you can track this down by leaving out one or another.

Uli

realsimix commented 3 years ago

For building RPMs I'm often using patches directly from github like this: This is the commit: https://github.com/ArcticaProject/nx-libs/commit/13211ec6a5060db75c93cbb4e75d017b0a49386e

I get the patch like so: https://github.com/ArcticaProject/nx-libs/commit/13211ec6a5060db75c93cbb4e75d017b0a49386e.patch

Now I'm really confused as both links above don't show the same changes! Maybe it's just lack of coffee or something but I just confused why this happens?

I think that's what I always did when backporting fixes into RPM packages...

realsimix commented 3 years ago

But this works: https://github.com/ArcticaProject/nx-libs/commit/13211ec6a5060db75c93cbb4e75d017b0a49386e.diff

Can someone confirm these files are different https://github.com/ArcticaProject/nx-libs/commit/13211ec6a5060db75c93cbb4e75d017b0a49386e.patch https://github.com/ArcticaProject/nx-libs/commit/13211ec6a5060db75c93cbb4e75d017b0a49386e.diff

uli42 commented 3 years ago

After a quick glance I think you are confused by the different order of the changes. The diff has all changes "in one go" while the patch sorts them by single commits.

Uli

On Mon, Jan 11, 2021 at 12:16 PM Simon Matter notifications@github.com wrote:

But this works:

https://github.com/ArcticaProject/nx-libs/commit/13211ec6a5060db75c93cbb4e75d017b0a49386e.diff

Can someone confirm these files are different

https://github.com/ArcticaProject/nx-libs/commit/13211ec6a5060db75c93cbb4e75d017b0a49386e.patch

https://github.com/ArcticaProject/nx-libs/commit/13211ec6a5060db75c93cbb4e75d017b0a49386e.diff

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ArcticaProject/nx-libs/issues/983#issuecomment-757884359, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQHBZG5WVDO57NZYQ5POH3SZLMXNANCNFSM4V5EEEBA .

realsimix commented 3 years ago

Looks like https://github.com/ArcticaProject/nx-libs/commit/0f8ed4d103b3f68d5cedaa611b47b7cdb1e0517c is the culprit.

Any ideas?

uli42 commented 3 years ago

ok, then I will undo it. Or better add an explaining comment.

On Mon, Jan 11, 2021 at 3:04 PM Simon Matter notifications@github.com wrote:

Looks like 0f8ed4d is the culprit.

Any ideas?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

realsimix commented 3 years ago

Thanks, I can confirm that this resolves the issue.

uli42 commented 3 years ago

I cannot seem to replicate the issue. Can you please provide detailed instructions?

On Mon, Jan 11, 2021 at 3:23 PM Simon Matter notifications@github.com wrote:

Thanks, I can confirm that this resolves the issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ArcticaProject/nx-libs/issues/983#issuecomment-757982878, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQHBZDL7DTOOG44K5KGPODSZMCVFANCNFSM4V5EEEBA .

realsimix commented 3 years ago

I cannot seem to replicate the issue. Can you please provide detailed instructions?

There is nothing special. Nxproxy on a client connects to nxagent on server. Nxagent is run with -geometry fullscreen and runs startxfce desktop.

uli42 commented 3 years ago

Ok, with a slightly modified version of testscripts/run-nxproxy2nxagent-on-localhost I was able to replicate the issue. However, I cannot simply fix it because unfortunately that single change was a fix for another issue (#925)...

diff --git a/testscripts/run-nxproxy2nxagent-on-localhost b/testscripts/run-nxproxy2nxagent-on-localhost index d520a4c..5696741 100755 --- a/testscripts/run-nxproxy2nxagent-on-localhost +++ b/testscripts/run-nxproxy2nxagent-on-localhost @@ -30,7 +30,8 @@ ulimit -c "unlimited"

NXPROXYBIN="nxproxy" -NXAGENTBIN="nxagent" +#NXAGENTBIN="nxagent" +NXAGENTBIN="/home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/nxagent"

@@ -108,7 +109,7 @@ export DISPLAY

valgrind -v --num-callers=8 --error-limit=no --trace-children=no \

valgrind --num-callers=8 --tool=memcheck --leak-check=yes

--show-reachable=yes --track-fds=yes \

ldd "${NXAGENTBIN}"

-"${NXAGENTBIN}" -name 'NX' -geometry "800x600+100+100" "${@}" \ +"${NXAGENTBIN}" -name 'NX' -geometry "fullscreen" "${@}" \ "${NX_AGENT}" 2>>"${NX_ROOT}/C-${NX_PORT}/session" &

# @@ -141,3 +142,5 @@ echo "Running the X server side NX proxy." 2>>"${NX_ROOT}/S-${NX_PORT}/session" &

echo "Session running on display :$NX_PORT." + +xterm -display $(hostname):9

On Mon, Jan 11, 2021 at 8:38 PM Simon Matter notifications@github.com wrote:

I cannot seem to replicate the issue. Can you please provide detailed instructions?

There is nothing special. Nxproxy on a client connects to nxagent on server. Nxagent is run with -geometry fullscreen and runs startxfce desktop.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

uli42 commented 3 years ago

Found the root cause and added a better fix than reverting an old commit.

realsimix commented 3 years ago

Thanks, I can confirm that the patch fixes the issue.

realsimix commented 3 years ago

Does it make sense to leave this open until the patch goes in?

uli42 commented 3 years ago

yes, that's how we handle that usually.