https://bugs.kde.org/show_bug.cgi?id=464782

            Bug ID: 464782
           Summary: kscreen picks DoubleScan modelines ahead of regular
                    ones, causing system hang on amdgpu
    Classification: Plasma
           Product: KScreen
           Version: 5.26.5
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: common
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 155574
  --> https://bugs.kde.org/attachment.cgi?id=155574&action=edit
xrandr --verbose, all modelines of my VGA CRT monitor (VX720)

SUMMARY
When I hook up a CRT to KDE and pick a low resolution (like 800x600) in System
Settings -> Display Configuration, and the chosen resolution and refresh rate
contain a modeline with DoubleScan enabled, kscreen sometimes picks that
instead of the native resolution. On amdgpu, this causes a full system hang,
which persists when I reboot and login again with the CRT plugged in, until I
delete the ~/.local/share/kscreen folder.

STEPS TO REPRODUCE
1. Power on a VGA CRT and connect it to a DP-to-VGA adapter (in any order).
2. Plug the DP-to-VGA adapter (connected to a powered-on CRT) into a DP port on
your GPU. (My CRT does not emit EDID data through a plugged-in VGA cable when
powered off, which is not good behavior but you can't exactly ask Gateway to
release a fixed CRT these days.)
3. In "Display Configuration", set the CRT to 800x600 at 60 Hz and Apply.

OBSERVED RESULT
The system hangs, amdgpu emits ominous warnings into the systemd journal, and
the only way out is REISUB (the screen doesn't even update across
Alt+SysRq+REISU until you press B to reboot), or a hard reset.

I get the same system hang when I run `xrandr --output DP-2 --mode 0x9c` which
picks `800x600 (0x9c) 81.000MHz +HSync +VSync DoubleScan`, but no system hang
when I run `xrandr --output DP-2 --mode 0x9f` which picks `800x600 (0x9f)
40.000MHz +HSync +VSync`.

EXPECTED RESULT
kscreen picks a regular 800x600 resolution, without DoubleScan whenever
available, avoiding old creaky untested Xorg display modes which crash on
modern drivers. (I think the intended function of DoubleScan is to emit a
1200-line signal, outputting each of the 600 rows of pixels twice, but modern
amdgpu doesn't handle that anymore... or interlacing... grrr
https://gitlab.freedesktop.org/drm/amd/-/issues/1636)

If a given resolution or refresh rate is not available without DoubleScan, I'm
not sure what to do... Don't list it at all? Let the user pick it and hang
their system if they're on amdgpu (it might work fine on radeon or other
drivers?)

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.7-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550M DS3H

DP-to-VGA adapter: https://plugable.com/products/dpm-vgaf,
https://www.amazon.com/Plugable-Passive-DisplayPort-Adapter-Supports/dp/B01GW8FV7U,
operates using DP++ (HDMI over DisplayPort)
VGA monitor: Gateway VX720

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to