Git Product home page Git Product logo

Comments (9)

matt335672 avatar matt335672 commented on June 20, 2024

Hi @abma

More details please:-

  • What client are you using on debian 12?
  • What is your keyboard layout?
  • Which xrdp backend are you using? Xorg or Xvnc? If the former, what is the version of xorgxrdp?

from xorgxrdp.

abma avatar abma commented on June 20, 2024

What client are you using on debian 12?

xfreerdp

What is your keyboard layout?

on client: de / pc105, on server: de / pc105,

Which xrdp backend are you using? Xorg or Xvnc? If the former, what is the version of xorgxrdp?

xorg with xorgxrdp v0.9.19-1

i've noticed in ~/.xorgxrdp..log that the the line

[746023.837] KbdSync: toggling caps lock

only sometimes occours when i press caps lock. i don't get this line with working remmina / mstsc as client to the xrdp server.
it seems the problem and this log line seems to match: as long as this log message doesn't occour keyboard led + caps lock state on server side are in sync. when this message occours its out of sync.

also i would expect that this line should occour every time i press caps lock, right?! but it only occours maybe in one of 10 presses.

from xorgxrdp.

matt335672 avatar matt335672 commented on June 20, 2024

Thanks - that's useful.

The message is generated when the client sends this RDP event (or its fastpath variant):-

https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/6c5d0ef9-4653-4d69-9ba9-09ba3acd660f

It's a sync event, so isn't sent every time caps lock is pressed.

from xorgxrdp.

matt335672 avatar matt335672 commented on June 20, 2024

I've also read the comments on the freerdp issue.

If it's at all possible to come up with a way to reproduce this it will be a lot easier to look at.

from xorgxrdp.

matt335672 avatar matt335672 commented on June 20, 2024

I can reproduce this on devel now, with a UK keyboard.

I ran a simple session with just an xterm in it running watch -n 0.1 "xset q" as suggested in the linked issue (nice suggestion @abma)

Connecting with xfreerdp 2.9.0 resulted in the caps lock state not always changing when the key was pressed.

It looks like xfreerdp is sending a capslock down, capslock up, and also a sync request very close to each other. Remmina does not send the sync requests like this.

Problem does not occur at all with Xvnc, so I'm moving this to the xorgxrdp repo.

from xorgxrdp.

matt335672 avatar matt335672 commented on June 20, 2024

My guess is that things are going wrong in KbdSync:-

KbdSync(rdpKeyboard *keyboard, int param1)
{
int xkb_state;
xkb_state = XkbStateFieldFromRec(&(keyboard->device->key->xkbInfo->state));
if ((!(xkb_state & 0x02)) != (!(param1 & 4))) /* caps lock */
{
LLOGLN(0, ("KbdSync: toggling caps lock"));
KbdAddEvent(keyboard, 1, 58, 0, 58, 0);
KbdAddEvent(keyboard, 0, 58, 49152, 58, 49152);
}
if ((!(xkb_state & 0x10)) != (!(param1 & 2))) /* num lock */
{
LLOGLN(0, ("KbdSync: toggling num lock"));
KbdAddEvent(keyboard, 1, 69, 0, 69, 0);
KbdAddEvent(keyboard, 0, 69, 49152, 69, 49152);
}
if ((!(keyboard->scroll_lock_down)) != (!(param1 & 1))) /* scroll lock */
{
LLOGLN(0, ("KbdSync: toggling scroll lock"));
KbdAddEvent(keyboard, 1, 70, 0, 70, 0);
KbdAddEvent(keyboard, 0, 70, 49152, 70, 49152);
}
}

Because the sync is sent so closely after the keypresses, it's possible the call to XkbStateFieldFromRec is getting stale information. This is a complete guess however - I don't know enough about X server internals to be sure about this.

from xorgxrdp.

zeusin avatar zeusin commented on June 20, 2024

Experience same problem with xorgxrdp ... It also happens with num lock

from xorgxrdp.

zeusin avatar zeusin commented on June 20, 2024

@abma Have you tried rdesktop to see if the problem persist?

There is also this option in rdesktop
-N
Enable numlock syncronization between the Xserver and the remote RDP session. This is useful with applications that looks at the numlock state, but might cause problems with some Xservers like Xvnc

from xorgxrdp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.