Reach DDC on GPUs that are not "VGA", and stop warning about an empty dock
ddcutil's udev rule grants the seated user the GPU's i2c buses only when the PCI class is 0x030000. An AMD iGPU that is not the primary boot display says 0x038000, so on the Framework every DDC bus stayed root-only. Ship the same grant for the class the hardware actually reports; change-settings installs it. And two conflations in the probe: an undocked laptop reported its normal state as an error, and doctor collapsed every error into "No accessible DDC/CI bus". Nothing external connected is now a clean empty -- doctor's unconfigured path -- and a real failure surfaces the probe's own words, because an unreadable bus and a monitor with DDC/CI off in its menu have different fixes. Claude-Session: https://claude.ai/code/session_01Epx9ZC1gwm81K3jm9x9CKh
This commit is contained in:
@@ -533,7 +533,10 @@ def check_brightness(config: DoctorConfig) -> Check:
|
||||
except (json.JSONDecodeError, KeyError, TypeError, ValueError):
|
||||
return Check("input.brightness", "input-media", "External monitor brightness", "warning", "DDC/CI probe returned an invalid result.", instructions)
|
||||
if error:
|
||||
return Check("input.brightness", "input-media", "External monitor brightness", "warning", "No accessible DDC/CI bus.", instructions)
|
||||
# The probe says what is actually wrong -- an unreadable bus and a
|
||||
# monitor with DDC/CI switched off in its menu are different problems
|
||||
# with different fixes, and one hardcoded string here hid that.
|
||||
return Check("input.brightness", "input-media", "External monitor brightness", "warning", error.rstrip(".") + ".", instructions)
|
||||
if not displays:
|
||||
return Check("input.brightness", "input-media", "External monitor brightness", "unconfigured", "No DDC/CI display is configured.")
|
||||
return Check("input.brightness", "input-media", "External monitor brightness", "ok", f"{len(displays)} DDC/CI display{'s' if len(displays) != 1 else ''} available.")
|
||||
|
||||
Reference in New Issue
Block a user