Duplicate XRandR mode (user-added, identical to EDID mode) makes output invisible to DisplayConfig state — Display panel shows it disabled, "Set as Primary" ignored

Abierto
#881 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c, linux
Área
desktop-dev

Línea de trabajo

Start with the X11 backend code that reads each output's modes and matches the CRTC's current mode, and with the org.cinnamon.Muffin.DisplayConfig GetCurrentState path that builds logical monitors. Reproduce by adding a duplicate of a native mode with xrandr --newmode/--addmode, then check that the output lacks an is-current mode and a logical monitor. Done when the output keeps its is-current mode and logical monitor with the duplicate present.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Distribution

Mint 21.3

Package version

6.0

Graphics hardware in use

Intel i915 (integrated), outputs: eDP-1 (laptop panel) + DP-1 (XREAL One, 3840x1080@60)

Frequency

Always

Summary

When an output exposes two modes with identical geometry/timings — one advertised by the monitor's EDID and one added by the user with xrandr --newmode/--addmode — Muffin's current-state read drops that output from all logical monitors. The CRTC is active in X, but GetCurrentState reports the output with no is-current mode and no logical monitor, so:

  • the Cinnamon Display settings panel shows the monitor as disabled even though it is enabled and displaying,
  • "Set as Primary" silently never applies — Cinnamon's panels/taskbar follow Muffin's logical primary, which stays on another output,
  • the persistent layout (~/.config/monitors.xml) is never written for that output, so nothing survives relogin.

Removing the duplicate mode and restarting Cinnamon restores correct state, so the panel and csd are fine — the defect is in Muffin's mode dedup vs. current-mode matching in the X11 backend.

Environment

  • Linux Mint 21.3 "Virginia", Cinnamon 6.0.0
  • muffin 6.0 (X11 backend, session x11)
  • GPU: Intel i915 (integrated), outputs: eDP-1 (laptop panel) + DP-1 (XREAL One, 3840x1080@60)
  • The external display's EDID already advertises 3840x1080@60 (297.000MHz). A user-added modeline with identical timings was registered at login via ~/.xprofile:
xrandr --newmode "3840x1080_60.00" 297.00 3840 4016 4104 4400 1080 1084 1089 1125 +hsync +vsync
xrandr --addmode DP-1 "3840x1080_60.00"

Reproduction (no special hardware needed)

On any multi-monitor X11 Cinnamon setup, add a duplicate of an output's native mode:

# timings for 1920x1080@60 — substitute your monitor's native mode's timings from `xrandr --verbose`
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DP-1 "1920x1080_60.00"
  1. Open System Settings → Displays. The external monitor now shows as disabled although xrandr -q shows it connected, active (*current) and even primary.
  2. Toggle it on and/or "Set as Primary" → apply appears to do nothing; the panel/taskbar stays on the other display.
  3. Query Muffin's state (below): the output is missing from the logical-monitor list and its mode list has no is-current entry.
  4. Fix: xrandr --delmode <out> 1920x1080_60.00 && xrandr --rmmode 1920x1080_60.00, restart Cinnamon (Ctrl+Alt+Esc or cinnamon --replace) → the output immediately becomes an active logical monitor and primary works/persists.

Evidence

xrandr — X level says the output is fine (with duplicate present)
DP-1 connected primary 3840x1080+0+0 (normal left inverted right x axis y axis) 1860mm x 1050mm
   3840x1080     60.00*+          <- EDID-native, XID 0xabc, CURRENT
   3840x1080_60.00  60.00         <- user modeline, XID 0x9f7, identical timings
org.cinnamon.Muffin.DisplayConfig.GetCurrentState — broken state (duplicate present)

Logical monitors contain only eDP-1; DP-1 has no logical monitor, no is-current mode:

(uint32 34, [
  ... DP-1: [('3840x1080@60', 3840, 1080, 60.0, 1.0, [...scales...], {})],   <- no is-current
  ... eDP-1: ... {'is-current': <true>, 'is-preferred': <true>} ...
], [
  (1002, 1080, 1.0, uint32 0, true, [('eDP-1', 'AUO', '0x139d', '0x00000000')], @a{sv} {})
], ...)
Same call after removing the duplicate mode + restarting Cinnamon — correct state
], [
  (0, 0, 1.0, uint32 0, true,  [('DP-1', 'MRG', 'XREAL One', '0x00000000')], @a{sv} {}),
  (1002, 1080, 1.0, 0, false, [('eDP-1', 'AUO', '0x139d', '0x00000000')], {})
], ...)

DP-1 is now an active logical monitor and primary; the Display panel shows it enabled and "Set as Primary" works and persists.

Diagnosis / suggested fix direction

In the X11 backend, when the output's modes are read and deduplicated, two modes with identical width/height/refresh collapse to one retained XID. The CRTC's current mode (the EDID-native XID) then no longer matches the retained/deduplicated mode, so is-current is never set and the output is excluded from logical-monitor construction. Matching a CRTC's current mode should compare actual mode parameters (or track every XID mapping to the deduplicated mode) rather than a single retained XID.

Notes

  • The monitor is a XREAL One (84", 3840x1080). Its EDID is well-formed; this is not an EDID problem — the repro works with any monitor once a duplicate mode is added.
  • Real-world relevance: adding a modeline via .xprofile/.screenlayout scripts is a common user workaround, and Cinnamon's own "custom resolution" path can produce user-defined modes too, so any user who duplicates an EDID mode hits this.
Lenguaje dominante
C
Estrellas
249
Forks
131
Merge medio
11 d 13 h
PR fusionados (30 d)
6

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de linuxmint/muffin

Todos los issues de linuxmint/muffin

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.