Open Bug 1597617 Opened 6 years ago Updated 3 years ago

R-Go Tools' USB keyboard lags in Firefox; fine on other software

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

70 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: tzaeru, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

Bought and connected a R-Go Tools split keyboard.

Actual results:

Keyboard input lags significantly in Firefox. Typing anything - anywhere - puts Firefox's CPU use to max.

Expected results:

No lag and no significant CPU spike.

I had a small Reddit thread about this, where someone suggested to file a bug, https://www.reddit.com/r/firefox/comments/d6wco3/slowdown_when_using_an_external_keyboard/

Other external keyboards are actually fine. Typing on the laptop keyboard is fine. It's only this one particular keyboard with the problem; yet no other software but Firefox seems to suffer from it. The lag is pretty extreme and very noticeable.

In one discussion, it was suggested that one possible cause could be the keyboard (or the driver) spamming nonsense messages that Firefox has trouble dealing with while other software don't. I could try to maybe check into what kind of messages are actually coming from the keyboard, though I'm not sure if I can do this do this as easily as just hooking into some device file or running some off-the-box tool?

I cannot confirm this bg since we don't have that keyboard, but I am setting its component as (Core) Dom: Editor.
@tzaeru: Can you answer some questions, please?

  1. In which Firefox version have you seen this issue reproduce?
  2. What operating system do you use?
  3. Can you please retest this issue in safe mode? here is a link that can help you:
    https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
    Does it occur in safe mode as well?

I wouldn't know how to troubleshoot this issue further, but someone with more knowledge on this matter might ask you some other questions.
Thank you for your contribution!

Component: Untriaged → DOM: Editor
Flags: needinfo?(tzaeru)
Product: Firefox → Core

(In reply to tzaeru from comment #1)

I had a small Reddit thread about this, where someone suggested to file a bug, https://www.reddit.com/r/firefox/comments/d6wco3/slowdown_when_using_an_external_keyboard/

Other external keyboards are actually fine. Typing on the laptop keyboard is fine. It's only this one particular keyboard with the problem; yet no other software but Firefox seems to suffer from it. The lag is pretty extreme and very noticeable.

In one discussion, it was suggested that one possible cause could be the keyboard (or the driver) spamming nonsense messages that Firefox has trouble dealing with while other software don't. I could try to maybe check into what kind of messages are actually coming from the keyboard, though I'm not sure if I can do this do this as easily as just hooking into some device file or running some off-the-box tool?

Hey Masayuki, do you have recommendation to the reporter that what kind of messages and setup they can use to help debug?

Component: DOM: Editor → DOM: UI Events & Focus Handling
Flags: needinfo?(masayuki)

Well, you can get a log file with setting following env:

MOZ_LOG=KeymapWrapperWidgets:3,sync
MOZ_LOG_FILE=/path/to/log/file

I think that 3 is enough for this use case. 4 or 5 includes spams. Note that the log file will include any input which you typed, e.g., passwords too. So, be careful if you publish the log file in the web.

Flags: needinfo?(masayuki)
Priority: -- → P3

(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #4)

Well, you can get a log file with setting following env:

MOZ_LOG=KeymapWrapperWidgets:3,sync
MOZ_LOG_FILE=/path/to/log/file

I think that 3 is enough for this use case. 4 or 5 includes spams. Note that the log file will include any input which you typed, e.g., passwords too. So, be careful if you publish the log file in the web.

The log file seems to be empty with these settings.

Verifying with set, I have:

MOZ_LOG=KeymapWrapperWidgets:3,sync
MOZ_LOG_FILE=/home/tzaeru/ff.log

Also tried with
MOZ_LOG=KeymapWrapperWidgets:4,sync

Flags: needinfo?(tzaeru)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.