Skip to content

Fix prefs crash, DRM GPU sensor bugs, and default off public-IP calls - #1

Open
Vigwear wants to merge 3 commits into
mainfrom
fix-gpu-drm-sensors
Open

Fix prefs crash, DRM GPU sensor bugs, and default off public-IP calls#1
Vigwear wants to merge 3 commits into
mainfrom
fix-gpu-drm-sensors

Conversation

@Vigwear

@Vigwear Vigwear commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Three unrelated fixes, stacked on one branch:

1. Prefs crash — AdwViewSwitcherSidebar doesn't exist
prefs.ui referenced AdwViewSwitcherSidebar, which is not a real widget in any released libadwaita version (confirmed against 1.7.6's typelib — only AdwViewSwitcher, AdwViewSwitcherBar, AdwViewSwitcherTitle, and AdwInlineViewSwitcher exist). Opening extension preferences threw Gtk.BuilderError: Invalid object type 'AdwViewSwitcherSidebar' and crashed immediately. The file's <requires lib="libadwaita" version="1.9"/> was also bogus (1.9 doesn't exist).

Rebuilt the sidebar as a GtkListBox of rows (Adw.ButtonContent icon+label) bound to the AdwViewStack pages, wired up in prefs.js.

2. GPU/DRM sensor bugs

3. Public IP lookup — default off
include-public-ip defaulted to true, with the provider defaulting to Core Coding's own endpoint (ipv4.corecoding.com), and network-public-ip-interval defaulting to 60 — so a fresh install phoned home to the developer's server once an hour without the user opting in. _refreshIPAddress() is gated solely by this one boolean; flipping its default to false stops all such requests until a user explicitly enables "Include public IP address" in Network settings.

Test plan

  • Verified prefs.ui XML is well-formed and every widget class it now references resolves against the installed libadwaita/GTK typelibs (no live-display test available in the dev sandbox — needs a manual open-preferences check)
  • node --check clean on prefs.js and sensors.js
  • Manually confirm Graphics group now populates on DRM-fallback GPUs (AMD/Intel/NVIDIA-nouveau)
  • Confirm no outbound request fires on a fresh-defaults profile with Network monitoring enabled

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Vigwear and others added 3 commits August 11, 2026 12:03
AdwViewSwitcherSidebar is not a real libadwaita widget in any released
version (confirmed against libadwaita 1.7.6's typelib, which only has
AdwViewSwitcher, AdwViewSwitcherBar, AdwViewSwitcherTitle, and
AdwInlineViewSwitcher). Referencing it in prefs.ui made GtkBuilder throw
Gtk.BuilderError: Invalid object type 'AdwViewSwitcherSidebar', crashing
prefs on open. The file's declared <requires lib="libadwaita" version="1.9"/>
was also bogus (1.9 doesn't exist).

Rebuild the sidebar as a GtkListBox of rows (Adw.ButtonContent icon+label)
bound to the AdwViewStack pages, wired up in prefs.js instead of relying on
the missing widget's stack/mode properties and activated signal.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ding

_readGpuDrm() built typeName from the raw sysfs card index (gpu#0 for
card0), but other code paths that reference the same group key use a
1-based index (e.g. the hardcoded 'Refresh Rate' at gpu#1, and the
NVIDIA path's 'gpu#' + gpuNum). The mismatch means the DRM-path Graphics
group is created under a key nothing else looks up, so it silently
disappears (upstream corecoding#474/corecoding#554, fixed the same way in open PR corecoding#517).

The vendor switch also compared uppercase hex literals ('0x10DE',
'0x13B5') against vendor strings that sysfs always reports lowercase,
so NVIDIA (nouveau) and ARM cards could never match and fell through to
"Unknown 0x...". Normalize with toLowerCase() before comparing.

Also add a Frequency reading for Intel (i915) GPUs, sourced from
gt_cur_freq_mhz, since i915 has no gpu_busy_percent equivalent to amdgpu
and previously showed no usage data at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
include-public-ip defaulted to true, with the provider defaulting to
Core Coding's own endpoint (ipv4.corecoding.com) — meaning a fresh
install phoned home once an hour (network-public-ip-interval defaults
to 60) without the user opting in. _refreshIPAddress() is gated solely
by this one setting, so flipping the default to false stops all such
requests until a user explicitly turns "Include public IP address" on
in Network settings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant