https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288898

            Bug ID: 288898
           Summary: VT: console fails to reply to primary device attribute
                    query
           Product: Base System
           Version: 14.3-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: [email protected]
          Reporter: [email protected]

As reported in [1], the FreeBSD console does not respond to the primary
device attribute (DA) query (a VT100 invention). To reproduce (I did this from
Linux):

        $ curl -O
https://download.freebsd.org/releases/VM-IMAGES/14.3-RELEASE/amd64/Latest/FreeBSD-14.3-RELEASE-amd64-zfs.qcow2.xz
        $ xz -d FreeBSD-14.3-RELEASE-amd64-zfs.qcow2.xz
        $ qemu-system-x86_64 ./FreeBSD-14.3-RELEASE-amd64-zfs.qcow2
        $ # boot to multi-user mode (by pressing enter)
        $ printf '\033[c'; cat

Expected: something like "^[[?6c" should be echoed
Actual: nothing is echoed

The primary DA query is useful because it allows applications to
1. send some other query
2. send the DA query
3. await the DA response

where the DA response tells the application that no more query response
will arrive. This helps avoid the need for timeout.  Almost all terminals
implement it (the only other exceptions I have found are dvtm/abduco).

It looks like FreeBSD source have it too, see
teken_subr_primary_device_attributes in
sys/teken/teken_subr.h

Maybe this function is unused?

I'd be happy to help but I'm not yet sure how to build a FreeBSD VM image (such
as the one above) to debug and fix this.

[1] https://github.com/fish-shell/fish-shell/issues/11723
Note that there are plans in fish shell to require terminals to implement this,
see the first table in
https://github.com/fish-shell/fish-shell/blob/79135c6c82417ea3e58e5f971398a48e44b03ce5/doc_src/terminal-compatibility.rst

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to