Night Light only affects one of two identical external monitors with identical EDIDs

オープン 初心者向け
#482 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c
領域
desktop

調査の方向性

plugins/color/csd-color-state.c から始め、ccm_session_get_output_id() と ccm_session_get_state_output_by_id() を併せて読みます。EDID データが重複する出力について、デバイス ID がどのように形成されるかを確認し、その後ビルドして、異なる XRandR 出力に接続された同一のモニター 2 台に別々の ID が割り当てられ、両方が Night Light に応答することを検証します。

索引モデルが issue の本文から書いたものです。

説明

I found and fixed a bug in cinnamon-settings-daemon affecting systems with two identical external monitors.

System:

Linux Mint 22.3 Zena

Cinnamon 6.6.9

cinnamon-settings-daemon 6.6.4+zena

X11 session

Intel Iris Xe graphics

Two identical HKC E2411F monitors connected via DisplayPort

Problem

Both external monitors have identical EDID data, including the same manufacturer, model and serial number.

When Night Light was enabled, only one of the two external monitors changed its color temperature. The second monitor was not affected.

Root cause

In plugins/color/csd-color-state.c, the function ccm_session_get_output_id() creates the device ID using the EDID vendor, model and serial number.

For two identical monitors, this produces the same device ID.

The function ccm_session_get_state_output_by_id() then returns the first output matching that ID. Consequently, both physical monitors are mapped to the same output.

Colord originally showed only one external display device.

Proposed fix

Append the XRandR output name to the device ID, even when valid EDID data is available:

/* Distinguish identical monitors connected to different outputs. */
g_string_append_printf (device_id,
"-%s",
gnome_rr_output_get_name (output));

This makes the IDs unique for monitors connected to different outputs.

Verification

I applied this change locally, rebuilt and installed cinnamon-settings-daemon, and rebooted.

After the change, colormgr get-devices correctly showed two separate display devices:

...DP-2-1

...DP-2-2

Both monitors were then affected correctly by Cinnamon Night Light, including after a reboot.

Expected behavior

Each physical display should have its own unique device ID, even if multiple monitors report identical EDID data.

I hope this fix can be considered for inclusion in Cinnamon.

主要言語
C
スター
70
フォーク
81
平均マージ
2日 7時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/cinnamon-settings-daemon のほかの issue

linuxmint/cinnamon-settings-daemon の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。