RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2170830 - [RHEL-8] Barcode scanner result is not shown correctly on gnome-terminal
Summary: [RHEL-8] Barcode scanner result is not shown correctly on gnome-terminal
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: mutter
Version: 8.7
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Carlos Garnacho
QA Contact: Tomas Pelka
URL:
Whiteboard:
Depends On:
Blocks: 2218146 2218521
TreeView+ depends on / blocked
 
Reported: 2023-02-17 10:42 UTC by Vikramsingh Patil
Modified: 2023-11-14 16:47 UTC (History)
12 users (show)

Fixed In Version: mutter-3.32.2-71.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2218146 2218521 (view as bug list)
Environment:
Last Closed: 2023-11-14 15:32:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-149054 0 None None None 2023-02-17 10:43:42 UTC
Red Hat Product Errata RHBA-2023:6960 0 None None None 2023-11-14 15:32:25 UTC

Description Vikramsingh Patil 2023-02-17 10:42:04 UTC
Description of problem:
When any barcode has been scanned using barcode scanner, it is not showing correct value in gnome-terminal

Version-Release number of selected component (if applicable):
gnome-terminal-3.28.3-3.el8.x86_64

How reproducible:
everytime

Steps to Reproduce:
1. scan SN barcodes to gnome terminal.
2. Reboot
3. Try to scan SN barcodes to gnome terminal again & again.
4. Initially Gnome-terminal shows correct data, but after few reboot, we started seeing the issue.

Actual results:

The Gnome-Terminal shows junk data and sometimes uppercase letters converted to lowercase and vice-versa.

Expected results:

Gnome-terminal should show correct barcode data.

Additional info:

The issue is only with gnome-terminal in RHEL-8.x

The issue is not reproducible with RHEL-7.x

Also If we use Xterm in RHEL-8 then the issue is not reproducible.

Workaround used by customer is to add Intercharacter delay from the barcode scanner side.

Comment 7 Tomas Popela 2023-02-17 11:18:41 UTC
(In reply to Vikramsingh Patil from comment #0)
> 1. scan SN barcodes to gnome terminal.

Please describe this step more thoroughly. As I honestly don't understand what the step involves. Do we have hardware to reproduce locally? @tpelka do you know?

Comment 8 Tomas Pelka 2023-02-17 11:48:01 UTC
(In reply to Tomas Popela from comment #7)
> (In reply to Vikramsingh Patil from comment #0)
> > 1. scan SN barcodes to gnome terminal.
> 
> Please describe this step more thoroughly. As I honestly don't understand
> what the step involves. Do we have hardware to reproduce locally?
> @tpelka do you know?

If you mean a barcode scanner then no, but I believe a camera can be used too, no?

Comment 9 Tomas Popela 2023-02-17 11:51:21 UTC
(In reply to Tomas Pelka from comment #8)
> (In reply to Tomas Popela from comment #7)
> > (In reply to Vikramsingh Patil from comment #0)
> > > 1. scan SN barcodes to gnome terminal.
> > 
> > Please describe this step more thoroughly. As I honestly don't understand
> > what the step involves. Do we have hardware to reproduce locally?
> > @tpelka do you know?
> 
> If you mean a barcode scanner then no, but I believe a camera can be used
> too, no?

Do you have a mode in your camera that puts the content of the barcode (the code itself) into stdout? I'm failing to understand how that would work.

Comment 18 Steve Barcomb 2023-05-25 01:05:48 UTC
I purchased this scanner and was able to reproduce the issue.  The customer provided a sample code which I will attach.  In testing this on rhel9.1 and rhel8.3 I was unable to reproduce the issue if I scanned into vim running inside gnome-terminal.  The provided code prints "205X8397780035".

When I scanned the code into just the bash shell, and hit space after each scan I would get an erroneous code about every 25-30 scans.  What is interesting is how the scan was modified:

  @)%X8397780035

  20%X8397780035

Are the two errors I was able to capture.  The characters that are incorrect are the same characters you would get after holding shift and hitting the correct character.  The customer reports that the issue does not appear in xterm.  He further reports that the issue does reproduce in 8.7.

I have asked the customer to confirm if his erroneous scans all correlate to "correct character" + shift.

Comment 20 Brandon Clark 2023-05-25 22:47:53 UTC
Customer attempted additional test and the output does indeed match the same behavior that Steve noted. Erroneous shifts appear to be getting inserted, with numbers being replaced with symbols and letters capitalizing.

Comment 22 Steve Barcomb 2023-05-31 20:26:11 UTC
I was given https://wayland.freedesktop.org/libinput/doc/latest/tools.html which I used the following ways:

libinput debug_events  --verbose  (which does not look useful) 
libinput record /dev/input/event23 (which I do not understand)

I am attaching both outputs.  In the file libinput_record_dev_input_event23.out I scanned the customer's code ~80 times which consistently reads 205x8397780035 (note the lowercase x) and on the second to last scan it recorded @)%x8397780035.

- I tested this in tcsh within Gnome Terminal and could reproduce this.
- I tested in xterm and could not reproduce the issue.  Curiously, in xterm the code reads 205X8397780035 (note the capital X)

In learning about the scanner it looks like it might be programmed by scanning UPC codes.  The customer mentioned that his scanner inserts a carriage return that mine does not.  I stumbled across this https://poscatch.com/blog/how-to-activate-the-symbol-ls2208-carriage-return-enter-function/ but did not program the device.  Looking for similar issues I also stumbled across https://supportcommunity.zebra.com/s/article/000016982?language=en_US in which the manufacturer has a kbase that instructs you to program the device with an intercharacter delay.  I did not program my copy of the device in this way, since I was unsure how to reset it.

I have asked the customer about the impact they see when the intercharacter delay is added to the scanner.

Comment 31 Steve Barcomb 2023-06-12 13:48:52 UTC
I tested this build on my thinkpad and it seems that modifier keys are not working for me.  I installed the rpm and rebooted.  I wanted to ensure that I had the right package so I was attempting to type out "rpm -qa | grep mutter" and I can't type the | key.  I conduct the test and cannot reproduce the issue.  I try to hit control + c to get a prompt back from the terminal so I can clear it.  That does not work either.  I tested both key combinations in xterm and they work fine.

- I cannot reproduce the scanning failure with the test build.
- The test build seems to make my modifier keys not work correctly
- The test build still prints the code with lower case letters which xterm does not do.

Comment 32 Carlos Garnacho 2023-06-12 17:04:08 UTC
Sorry, the backport to 3.32 was a bit more of a rewrite and I missed an important bit that went under the rader in my quick testing. https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=53238434 should work better wrt modifiers in Wayland clients.

Comment 33 Steve Barcomb 2023-06-12 19:35:44 UTC
Ok, this version tests correctly.  

 - I cannot reproduce the scanner character issue
 - My modifiers work correctly
 - The letters are printed upper case.

I will provide the new build to the customer since they do a bit more than what I have been doing in my testing.

Comment 65 errata-xmlrpc 2023-11-14 15:32:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (mutter bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6960


Note You need to log in before you can comment on or make changes to this bug.