Bug 216376 - AMDGPU: display output disables and quickly reenables when switching AVR into/from standby doing HDMI passthrough
Summary: AMDGPU: display output disables and quickly reenables when switching AVR into...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: All Linux
: P1 low
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-18 18:14 UTC by Jure Repinc
Modified: 2022-08-18 19:32 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.19.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (94.67 KB, text/plain)
2022-08-18 18:14 UTC, Jure Repinc
Details
Xorg.0.log (178.16 KB, text/plain)
2022-08-18 18:15 UTC, Jure Repinc
Details
lspci (6.81 KB, text/plain)
2022-08-18 18:16 UTC, Jure Repinc
Details

Description Jure Repinc 2022-08-18 18:14:12 UTC
Created attachment 301600 [details]
dmesg

I have A PC with Radeon RX480 which has HDMI output connected to HDMI input on Marantz SR5015 AV reciever and there the HDMI output goes to a TV (Panasonic TX-55CX200E). The DVI output is connected to an LCD monitor. The AVR has the feature to pass through HDMI signal when put into standby mode. When I switch AVR from/to standby mode it looks like it for a very short time interrupts the connection from PC to TV and during this time it appears that the video card output turns off and monitor layout is re-aranged to one screen (DVI) only and then almost immediately back two previous dual screen layout. Would it be possible to delay turning off the HDMI output for a bit longer so that it would wait long enough that AVR would reconnect entire HDMI path to TV back again and the HDMI output on video card would not need to be turned off and keep sending output in the meantime? So that the display layout configuration would keep being in dual-screen mode for the whole time?
Comment 1 Jure Repinc 2022-08-18 18:15:20 UTC
Created attachment 301601 [details]
Xorg.0.log
Comment 2 Jure Repinc 2022-08-18 18:16:32 UTC
Created attachment 301602 [details]
lspci
Comment 3 Alex Deucher 2022-08-18 18:23:12 UTC
I suspect the receiver toggles the hotplug pin when it switches to/from passthrough mode notify the GPU that the EDID will change (e.g., from receiver audio to monitor audio) otherwise the GPU won't know that the receiver is no longer part of the chain.  The driver doesn't actually do anything when it receives this hotplug interrupt.  It just tells userspace.  Your desktop environment listens for hotplug events and then acts on them (either enabling or disabling displays).  Your best bet is probably to change the behavior of your desktop environment when it receives a hotplug notification.  Alternatively, you could try and block drm hotplug events in udev.
Comment 4 Jure Repinc 2022-08-18 18:47:08 UTC
If I got it right, the hotplug events are all posted via udev? If so, is it correct to use "udevadm monitor --environment --udev" to see these events posted to userspace? Or is there somethign better? Just trying to make the best sense out of it to try making a workaround and gather as much relevant information to report a good bug/feature request with correct info to KDE developers.


If I use "udevadm monitor --environment --udev" I get the output:

udevadm monitor --environment --udev
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing


< switching AVR from on to standby mode >


UDEV  [35121.304457] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=74
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=12043
USEC_INITIALIZED=4651406
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
ID_FOR_SEAT=drm-pci-0000_01_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:01:00.0-card
TAGS=:uaccess:master-of-seat:seat:
CURRENT_TAGS=:uaccess:master-of-seat:seat:

UDEV  [35124.216717] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=74
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=12044
USEC_INITIALIZED=4651406
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
ID_FOR_SEAT=drm-pci-0000_01_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:01:00.0-card
TAGS=:uaccess:master-of-seat:seat:
CURRENT_TAGS=:uaccess:master-of-seat:seat:


< switching AVR from standby to on mode >


UDEV  [35155.373681] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=74
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=12048
USEC_INITIALIZED=4651406
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
ID_FOR_SEAT=drm-pci-0000_01_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:01:00.0-card
TAGS=:uaccess:master-of-seat:seat:
CURRENT_TAGS=:uaccess:master-of-seat:seat:

UDEV  [35158.196252] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=74
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=12049
USEC_INITIALIZED=4651406
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
ID_FOR_SEAT=drm-pci-0000_01_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:01:00.0-card
TAGS=:uaccess:master-of-seat:seat:
CURRENT_TAGS=:uaccess:master-of-seat:seat:

UDEV  [35158.953569] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=74
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=12050
USEC_INITIALIZED=4651406
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
ID_FOR_SEAT=drm-pci-0000_01_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:01:00.0-card
TAGS=:uaccess:master-of-seat:seat:
CURRENT_TAGS=:uaccess:master-of-seat:seat:

UDEV  [35161.036327] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=74
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=12051
USEC_INITIALIZED=4651406
ID_PATH=pci-0000:01:00.0
ID_PATH_TAG=pci-0000_01_00_0
ID_FOR_SEAT=drm-pci-0000_01_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:01:00.0-card
TAGS=:uaccess:master-of-seat:seat:
CURRENT_TAGS=:uaccess:master-of-seat:seat:
Comment 5 Alex Deucher 2022-08-18 19:32:29 UTC
Yes, those are the events.  The desktop environment listens for them and reacts.

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