eythaann/Seelen-UI · warning

Monitor settings not initialized ${device.id}

Error message

Monitor settings not initialized ${device.id}

What it means

The settings app's ByMonitor module renders a MonitorConfig for each display device using a settings record keyed by device id. When settingsByMonitor[device.id] is undefined — the per-monitor settings entry has not been initialized/loaded for that device — the component logs this warning and renders null for that monitor instead of crashing.

Source

Thrown at src/ui/react/settings/modules/ByMonitor/infra/index.tsx:91

              );
            })}
          </SettingsGroup>
        </div>
      </div>
    </SettingsGroup>
  );
}

export function SettingsByMonitor() {
  const devices = monitors.value;
  const settingsByMonitor = settings.value.monitorsV3;

  return (
    <>
      {devices.map((device) => {
        let monitor = settingsByMonitor[device.id];
        if (!monitor) {
          console.warn(`Monitor settings not initialized ${device.id}`);
          return null;
        }
        return <MonitorConfig key={device.id} device={device} />;
      })}
    </>
  );
}

function isConfigurableByMonitor(widget: Widget) {
  if (widget.instances === "ReplicaByMonitor") {
    return true;
  }

  // Check if any setting item allows configuration by monitor
  const stack = [...widget.settings];

  while (stack.length > 0) {
    const definition = stack.pop()!;

View on GitHub (pinned to dee4aaa940)

Solutions

  1. Wait for the settings/device data to finish loading before rendering the list (show a loader until the settings-by-monitor signal is populated).
  2. Re-open the settings window after the monitor is connected so devices and settings are re-fetched together.
  3. Ensure every detected device gets a default entry: when loading settings, merge in defaults for any device id missing from settingsByMonitor.
  4. If a device id is permanently stale (driver/topology change), reset or repair the monitor settings store.

Example fix

// before
let monitor = settingsByMonitor[device.id];
if (!monitor) {
  console.warn(`Monitor settings not initialized ${device.id}`);
  return null;
}

// after
let monitor = settingsByMonitor[device.id];
if (!monitor) {
  console.warn(`Monitor settings not initialized ${device.id}`);
  monitor = createDefaultMonitorSettings(device); // render with defaults instead of null
}
Defensive patterns

Strategy: fallback

Validate before calling

const ready = devices.every(d => settingsByMonitor[d.id] != null);
if (!ready) return <Spinner />; // render loader until per-monitor settings are loaded

Type guard

function hasMonitorSettings(d: Device, s: Record<string, MonitorSettings>):
  d is Device & { id: string } {
  return s[d.id] != null;
}

Prevention

When it happens

Trigger: A monitor present in the OS device list has no corresponding entry in the per-monitor settings map: settings not yet loaded when the component renders, a monitor added/plugged in after settings were loaded, or a stale settings file that predates the device id.

Common situations: Opening settings immediately at startup before async settings fetch resolves; hot-plugging a monitor while settings is open; changing GPU drivers or display topology producing new device ids; migrating settings across machines where monitor ids differ.

Related errors


AI-assisted analysis of eythaann/Seelen-UI@dee4aaa940 (2026-09-03). Data as JSON: /api/errors/ceb539bc749dfe53. Report an issue: GitHub.