Bug 235635 - vt video corruption when switching from xserver to tty
Summary: vt video corruption when switching from xserver to tty
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: vt
Depends on:
Blocks:
 
Reported: 2019-02-10 07:44 UTC by Damien
Modified: 2022-02-24 15:30 UTC (History)
4 users (show)

See Also:


Attachments
Corruption to vt under i915kms after switching from xserver (657.23 KB, image/jpeg)
2019-02-10 07:51 UTC, Damien
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damien 2019-02-10 07:44:12 UTC
On i915kms, vt(4) is shown to have corruption as per the attached image in the top left of the display resulting in some unreadable text.

Steps to replicate:
As a regular user, run startx
Press Alt-Ctrl-F? to switch to a tty
Corruption is seen on top left of the display.

This issue can be intermittent and also affects 12.0 RELEASE on the same system.

Machine is Lenovo T480 with integrated graphics from Intel.
Comment 1 Damien 2019-02-10 07:51:40 UTC
Created attachment 201884 [details]
Corruption to vt under i915kms after switching from xserver
Comment 2 Damien 2019-02-18 14:30:23 UTC
Additional Information:

I can confirm that this only occurs when switching from X server to tty without shutting down X first.
If X server is shut down, when the switch to the tty occurs, any corruption is now gone.
Also, if the corruption persists due to X server being shut down forceably i.e. through kill etc., restarting X and then shutting it down gracefully prevents the corruption from being displayed when it X server terminates.
It should be noted that no corruption is ever seen when the tty is switched to the active X server.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2019-09-16 19:06:01 UTC
I've not observed this on my X220 w/ i915 graphics.
Comment 4 Ed Maste freebsd_committer freebsd_triage 2019-09-20 07:24:28 UTC
What's the version of your X server and drm kmod packages?
Comment 5 ota 2019-09-21 03:12:10 UTC
I recently started using a very old laptop and also saw video corruption, too.
I haven't care much about it but seeing this made me curious how this incident will go and if I also get benefit, too...
Comment 6 Ed Maste freebsd_committer freebsd_triage 2020-04-03 19:37:43 UTC
I can reproduce this on my new laptop, Lenovo X1 Carbon 7th Generation, with:

$ pciconf -lv | grep -B2 -A2 Graphics
vgapci0@pci0:0:2:0:     class=0x030000 rev=0x02 hdr=0x00 vendor=0x8086 device=0x3ea0 subvendor=0x17aa subdevice=0x2292
    vendor     = 'Intel Corporation'
    device     = 'UHD Graphics 620 (Whiskey Lake)'
    class      = display
    subclass   = VGA
Comment 7 Emmanuel Vadot freebsd_committer freebsd_triage 2020-05-30 10:55:31 UTC
There is a few stuff worth to try:
 - Use 13.0-CURRENT with the latest drm-current-kmod (based on Linux 5.2)
 - Set hw.i915kms.enable_fbc=0 in loader.conf
 - Set hw.i915kms.enable_psr=0 in loader.conf

I don't have the issue on all my intel systems so that might take a while to debug ...
Comment 8 Ed Maste freebsd_committer freebsd_triage 2021-09-26 21:26:17 UTC
I cannot reproduce this on my X1 carbon now, releng/13.0 with drm-kmod at the following:

commit f7a3f523e006a1071cab494cf9237378bc564d68 (HEAD, tag: drm_v5.4.144, origin/5.4-lts)
Author: Mark Yacoub <markyacoub@google.com>
Date:   Thu Aug 12 15:49:17 2021 -0400

    drm: Copy drm_wait_vblank to user before returning
    
    [ Upstream commit fa0b1ef5f7a694f48e00804a391245f3471aa155 ]
Comment 9 Ed Maste freebsd_committer freebsd_triage 2022-02-24 15:30:02 UTC
Presumed fixed by drm-kmod update. If still reproducible please reopen and indicate the drm-kmod version in use.