Bug 261641 - graphics/drm-kmod: Launch message is written into (possibly random) memory locations on kldload with vt console
Summary: graphics/drm-kmod: Launch message is written into (possibly random) memory lo...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-qa, vt
Depends on:
Blocks:
 
Reported: 2022-01-31 23:41 UTC by Stefan B.
Modified: 2025-01-25 11:17 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback? (x11)
koobs: maintainer-feedback? (manu)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan B. 2022-01-31 23:41:21 UTC
I noticed that when radeonkms gets kldloaded while the cursor is on the last screen line (of 25x80 mode) after lots of output, it appears to place its message "Loaded radeonkms, id 14" onto screen line 25 *after* resizing the vt screen to a higher resolution than 25x80, overwriting previous output.

Shouldn't it output on the last line at the bottom instead, where one expects it to appear, instead of somewhere into old output in the upper half of the screen, where it is easily overlooked?
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2022-01-31 23:48:44 UTC
@Reporter What FreeBSD version is running and could you please include the following please, as attachments:

- /var/run/dmesg.boot
- pciconf -lv
- pkg version -v output
Comment 2 Stefan B. 2022-02-06 16:35:32 UTC
This was on a testing machine (HP Z800 late boot block with latest BIOS) with 13-RELEASE-p6 using Radeon HD 7350.
pkg are latest (pkg update upgrade was done shortly before).
dmesg.boot is gone, as I rollbacked the system directly afterwards.

As I am doing tests with different hardware on the test machine, I will repeat testing this later, not only with radeonkms, but also on another machine with i915kms, because I would not be surprised if the same issue also appears there.
Comment 3 Stefan B. 2022-02-10 08:11:55 UTC
Update:
I found the i915kms driver "works" the same way.
It appears like that it depends on how much the scrollback ring buffer is filled, where the kms loading message appears on the screen (if at all).
Sometimes it does not appear on the visible area of the screen, which I find somewhat concerning, as one does not know where in memory the output is written to.

So I have to change the bug description accordingly.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2024-10-04 12:45:25 UTC
^Triage: clear unneeded flags.  Nothing has yet been committed to be merged.
Comment 5 Stefan B. 2025-01-25 11:16:49 UTC
The problem basically is that neither radeonkms nor i915kms recalculate the cursor position screen address after changing display mode.
So the cursor position is quite random.

Linux solves this problem differently: it just clears the screen after video mode change.
For the Linux people  it is easier anyway, they don't have scrollback.