我正在使用 KVM 切换器在运行 Ubuntu 18.04 的计算机和运行 Windows 的计算机之间快速切换。切换到 Windows 计算机工作正常。但是,当切换回 Ubuntu 计算机时,分辨率设置为 800x600。奇怪的是,我能够使用 xrandr 切换到原始分辨率。我的显示器的原始分辨率是 3840x2160。Ubuntu 计算机运行带有开源 amdgpu 驱动程序的 Radeon RX560。
最初我以为是 KVM 交换机没有发送 EDID 信息的问题。所以我尝试使用 drm.edid_firmware cmdline 选项将 EDID blob 添加到 /lib/firmware,但这似乎没有帮助。我还尝试使用 video=DP-1:3840x2160@60 设置原始分辨率
切换到 Windows 机器时的内核日志:
[ 621.586743] [drm] Rx Caps:
[ 621.750368] [drm] Got external EDID base block and 1 extension from "edid/DELL-P2715Q.bin" for connector "DP-1"
[ 621.802277] [drm] Unknownx0 EQ failed VS=0, PE=0
[ 621.804349] [drm] DELL P2715Q: [Block 0]
[ 621.804350] [drm] DELL P2715Q: [Block 1]
[ 621.804352] [drm] dc_link_detect: manufacturer_id = AC10, product_id = 40BD, serial_number = 33373653, manufacture_week = 23, manufacture_year = 25, display_name = DELL P2715Q, speaker_flag = 1, audio_mode_count = 1
[ 621.804353] [drm] dc_link_detect: mode number = 0, format_code = 1, channel_count = 2, sample_rate = 31, sample_size = 7
[ 621.808345] [drm:dm_restore_drm_connector_state [amdgpu]] *ERROR* Restoring old state failed with -22
[ 621.840311] [drm] {800x600, 1056x625@49500Khz}
[ 621.886965] [drm] RBRx1 CR failed VS=0, PE=0
[ 621.982017] [drm] RBRx1 CR failed VS=0, PE=0
[ 622.126043] [drm] RBRx1 CR failed VS=0, PE=0
切换回 Ubuntu 机器时的内核日志:
[ 622.322063] [drm] RBRx1 CR failed VS=0, PE=0
[ 626.251705] [drm] Rx Caps:
[ 626.253741] [drm] Got external EDID base block and 1 extension from "edid/DELL-P2715Q.bin" for connector "DP-1"
[ 626.260101] [drm] HBR2x4 pass VS=1, PE=1
[ 626.260408] [drm] DELL P2715Q: [Block 0]
[ 626.260409] [drm] DELL P2715Q: [Block 1]
[ 626.260411] [drm] dc_link_detect: manufacturer_id = AC10, product_id = 40BD, serial_number = 33373653, manufacture_week = 23, manufacture_year = 25, display_name = DELL P2715Q, speaker_flag = 1, audio_mode_count = 1
[ 626.260412] [drm] dc_link_detect: mode number = 0, format_code = 1, channel_count = 2, sample_rate = 31, sample_size = 7
[ 626.261282] [drm] {800x600, 1056x625@49500Khz}
最后使用 xrandr 切换到原始分辨率:
[ 626.289617] [drm] RBRx1 pass VS=1, PE=1
[ 633.990747] [drm] {3840x2160, 4000x2222@533250Khz}
在 Xorg.0.log 中,我获得了一个模式行列表(包括本机模式行),然后:
[ 626.422] (EE) AMDGPU(0): failed to set mode: Permission denied
这是 kms 还是 Xorg 的问题?
任何关于解决此问题的帮助都将不胜感激。目前我在切换后手动运行 xrandr,这相当繁琐。