swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.41k stars 1.1k forks source link

[intel/ivybridge] Monitor hotplugging does not work with native resolution (QHD) #6993

Open camoz opened 2 years ago

camoz commented 2 years ago

Hotplugging the external monitor (Dell U2520D) does not work when set to the native resolution. It (hotplugging) works when set to 1080p though. When first starting sway (or restarting it after the issue appeared), the monitor always works fine at the native resolution. DPMS off/on, swayidle and suspend also work if the monitor stays connected and powered on.

Steps to reproduce:

Expected results: Monitor gets detected.

Actual results: Monitor stays black (no signal).

I can also reproduce this with WLR_DRM_NO_MODIFIERS=1 and/or WLR_DRM_NO_ATOMIC=1.

The interesting part of the dmesg debug log is probably this ``` [11194.682811] i915 0000:00:02.0: [drm:drm_atomic_check_only] checking 000000002acc2ad7 [11194.682818] i915 0000:00:02.0: [drm:drm_atomic_helper_check_modeset] [CRTC:75:pipe C] mode changed [11194.682827] i915 0000:00:02.0: [drm:drm_atomic_helper_check_modeset] [CRTC:75:pipe C] enable changed [11194.682833] i915 0000:00:02.0: [drm:drm_atomic_helper_check_modeset] [CRTC:75:pipe C] active changed [11194.682843] i915 0000:00:02.0: [drm:drm_atomic_helper_check_modeset] Updating routing for [CONNECTOR:104:DP-2] [11194.682850] i915 0000:00:02.0: [drm:drm_atomic_helper_check_modeset] [CONNECTOR:104:DP-2] using [ENCODER:103:DP C] on [CRTC:75:pipe C] [11194.682858] i915 0000:00:02.0: [drm:drm_atomic_helper_check_modeset] [CRTC:75:pipe C] needs all connectors, enable: y, active: y [11194.682865] i915 0000:00:02.0: [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:75:pipe C] to 000000002acc2ad7 [11194.682871] i915 0000:00:02.0: [drm:drm_atomic_add_affected_planes] Adding all current planes for [CRTC:75:pipe C] to 000000002acc2ad7 [11194.682877] i915 0000:00:02.0: [drm:drm_atomic_add_encoder_bridges] Adding all bridges for [encoder:103:DP C] to 000000002acc2ad7 [11194.682888] i915 0000:00:02.0: [drm:intel_atomic_check [i915]] [CONNECTOR:104:DP-2] Limiting display bpp to 24 instead of EDID bpp 24, requested bpp 36, max platform bpp 36 [11194.683081] i915 0000:00:02.0: [drm:intel_dp_compute_config [i915]] DP link computation with max lane count 4 max rate 270000 max bpp 24 pixel clock 241500KHz [11194.683265] i915 0000:00:02.0: [drm:intel_dp_compute_config [i915]] Force DSC en = 0 [11194.683446] i915 0000:00:02.0: [drm:intel_dp_compute_config [i915]] DP lane count 4 clock 270000 bpp 24 [11194.683625] i915 0000:00:02.0: [drm:intel_dp_compute_config [i915]] DP link rate required 724500 available 1080000 [11194.683819] i915 0000:00:02.0: [drm:ilk_fdi_compute_config [i915]] checking fdi config on pipe C, lanes 3 [11194.683999] i915 0000:00:02.0: [drm:ilk_fdi_compute_config [i915]] only 2 lanes on pipe C: required 3 lanes [11194.684178] i915 0000:00:02.0: [drm:ilk_fdi_compute_config [i915]] fdi link bw constraint, reducing pipe bpp to 18 [11194.684357] i915 0000:00:02.0: [drm:ilk_fdi_compute_config [i915]] checking fdi config on pipe C, lanes 3 [11194.684536] i915 0000:00:02.0: [drm:ilk_fdi_compute_config [i915]] only 2 lanes on pipe C: required 3 lanes [11194.684715] i915 0000:00:02.0: [drm:intel_atomic_check [i915]] CRTC bw constrained, retrying [11194.684921] i915 0000:00:02.0: [drm:intel_dp_compute_config [i915]] DP link computation with max lane count 4 max rate 270000 max bpp 18 pixel clock 241500KHz [11194.685105] i915 0000:00:02.0: [drm:intel_dp_compute_config [i915]] Force DSC en = 0 [11194.685222] i915 0000:00:02.0: [drm:intel_dp_compute_config [i915]] DP lane count 4 clock 162000 bpp 18 [11194.685345] i915 0000:00:02.0: [drm:intel_dp_compute_config [i915]] DP link rate required 543375 available 648000 [11194.685468] i915 0000:00:02.0: [drm:ilk_fdi_compute_config [i915]] checking fdi config on pipe C, lanes 3 [11194.685591] i915 0000:00:02.0: [drm:ilk_fdi_compute_config [i915]] only 2 lanes on pipe C: required 3 lanes [11194.685713] i915 0000:00:02.0: [drm:intel_atomic_check [i915]] CRTC config failure: -22 [11194.685837] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] [CRTC:75:pipe C] enable: yes [failed] [11194.685961] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] active: yes, output_types: DP (0x80), output format: RGB [11194.686067] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] cpu_transcoder: C, pipe bpp: 18, dithering: 0 [11194.686148] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] MST master transcoder: [11194.686237] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] port sync: master transcoder: , slave transcoder bitmask = 0x0 [11194.686329] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] bigjoiner: no [11194.686421] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] splitter: disabled, link count 0, overlap 0 [11194.686513] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] fdi: lanes: 3; gmch_m: 5627357, gmch_n: 8388608, link_m: 468946, link_n: 524288, tu: 64 [11194.686606] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] dp m_n: lanes: 4; gmch_m: 7034197, gmch_n: 8388608, link_m: 390788, link_n: 262144, tu: 64 [11194.686699] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] audio: 1, infoframes: 0, infoframes enabled: 0x0 [11194.686791] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] vrr: no, vmin: 0, vmax: 0, pipeline full: 0, guardband: 0 flipline: 0, vmin vblank: -1, vmax vblank: -2 [11194.686885] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] requested mode: [11194.686977] [drm:drm_mode_debug_printmodeline] Modeline "2560x1440": 60 241500 2560 2608 2640 2720 1440 1443 1448 1481 0x48 0x9 [11194.686982] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] adjusted mode: [11194.687074] [drm:drm_mode_debug_printmodeline] Modeline "2560x1440": 60 241500 2560 2608 2640 2720 1440 1443 1448 1481 0x48 0x9 [11194.687078] i915 0000:00:02.0: [drm:intel_dump_crtc_timings [i915]] crtc timings: 241500 2560 2608 2640 2720 1440 1443 1448 1481, type: 0x48 flags: 0x9 [11194.687172] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] pipe mode: [11194.687254] [drm:drm_mode_debug_printmodeline] Modeline "2560x1440": 60 241500 2560 2608 2640 2720 1440 1443 1448 1481 0x40 0x9 [11194.687259] i915 0000:00:02.0: [drm:intel_dump_crtc_timings [i915]] crtc timings: 241500 2560 2608 2640 2720 1440 1443 1448 1481, type: 0x40 flags: 0x9 [11194.687351] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] port clock: 162000, pipe src size: 2560x1440, pixel rate 241500 [11194.687443] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] linetime: 0, ips linetime: 0 [11194.687535] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] pch pfit: 0x0+0+0, disabled, force thru: no [11194.687628] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] ips: 0, double wide: 0 [11194.687719] i915 0000:00:02.0: [drm:ibx_dump_hw_state [i915]] dpll_hw_state: dpll: 0x0, dpll_md: 0x0, fp0: 0x0, fp1: 0x0 [11194.687812] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] csc_mode: 0x0 gamma_mode: 0x0 gamma_enable: 0 csc_enable: 0 [11194.687904] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] degamma lut: 0 entries, gamma lut: 0 entries [11194.687997] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] [PLANE:61:primary C] fb: [NOFB], visible: no [11194.688089] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] [PLANE:71:cursor C] fb: [NOFB], visible: no [11194.688190] i915 0000:00:02.0: [drm:drm_atomic_check_only] atomic driver check for 000000002acc2ad7 failed: -22 ```

I found some similar (same?) issues:

If this should be reported somewhere else, can someone please tell me where to report it, ideally with a link? Thanks.

camoz commented 2 years ago

Hm, actually switching to a VT and back does work for bringing back the external monitor at the native resolution, I just did not wait long enough. After switching to a VT and having it display on both the internal + external monitor, I switch back to sway, but then it takes around 20 sec for the external monitor to catch the signal. Also sometimes it seems I have to do another round of VT-switching to bring it back. So, maybe it is actually the same issue as https://github.com/swaywm/wlroots/issues/2967. Now asking there (on the gitlab issue at https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2967) to clarify some further things...