### Quick Start: Scaffold Project (Claude) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/Display_Timing_Tracker_DEV_PLAN.md Initiates project setup by creating a C program that interacts with libdrm to monitor page flip events and calculate timing deltas. ```bash # Phase 1: Scaffold the project claude "Create a C project with libdrm that opens /dev/dri/card0, polls for page flip events, and prints the ms delta between consecutive vblank timestamps" ``` -------------------------------- ### Install Build Dependencies (Gentoo) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Installs Vulkan essentials and the .NET 10 SDK for Gentoo users. ```bash # Vulkan Essentials emerge --ask dev-util/vulkan-headers dev-util/vulkan-utility-libraries # .NET 10 SDK emerge --ask dev-dotnet/dotnet-sdk-bin ``` -------------------------------- ### Install Dependencies Source: https://github.com/cxworld/capframex/blob/master/pmcreader-plugin/intel-perfmon/scripts/ci/verify_mapfile/README.md Install the necessary Python packages for the script using pip and the requirements.txt file. ```bash pip install -r requirements.txt ``` -------------------------------- ### Install Script Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Runs the installation script for CapFrameX Linux, which installs the daemon, Vulkan layer, and systemd service. ```bash ./scripts/install.sh ``` -------------------------------- ### Enable and Start Daemon Service Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Enables the CapFrameX daemon to start on boot and starts it immediately using systemd user services. ```bash systemctl --user enable --now capframex-daemon ``` -------------------------------- ### Launch Application Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Starts the CapFrameX GUI application from the command line. ```bash capframex ``` -------------------------------- ### Install Build Dependencies (Debian/Ubuntu) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Installs necessary build tools for the daemon and Vulkan layer, along with the .NET 8 SDK. ```bash sudo apt install build-essential cmake libvulkan-dev # .NET 8 SDK # See https://docs.microsoft.com/dotnet/core/install/linux ``` -------------------------------- ### Build Installer Source: https://github.com/cxworld/capframex/blob/master/CLAUDE.md Builds the CapFrameX installer and bootstrapper. Requires WiX Toolset v3.14.1 with VS 2022 Extension. ```bash msbuild source\CapFrameXInstaller\CapFrameXInstaller.wixproj /p:SolutionDir=%CD%\ /p:Configuration=Release /p:Platform=x64 ``` ```bash msbuild source\CapFrameXBootstrapper\CapFrameXBootstrapper.wixproj /p:SolutionDir=%CD%\ /p:Configuration=Release /p:Platform=x64 ``` -------------------------------- ### Overlay Renderer Integration in Swapchain Operations Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/OVERLAY_DEV_PLAN.md Demonstrates integrating overlay renderer setup during swapchain creation and drawing the overlay before presenting the swapchain. ```c // In layer_CreateSwapchainKHR - after swapchain creation if (g_overlayRenderer) { VkImage images[16]; uint32_t imageCount = 16; vkGetSwapchainImagesKHR(device, *pSwapchain, &imageCount, images); overlay_renderer_setup_swapchain(g_overlayRenderer, *pSwapchain, pCreateInfo->imageFormat, pCreateInfo->imageExtent.width, pCreateInfo->imageExtent.height, imageCount, images); } // In layer_QueuePresentKHR - before presenting if (g_overlayRenderer && overlay_enabled()) { overlay_renderer_draw(g_overlayRenderer, swapchain, imageIndex, waitSemaphore, signalSemaphore); } ``` -------------------------------- ### Quick Start: Multi-monitor Support (Claude) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/Display_Timing_Tracker_DEV_PLAN.md Enhances the project to support multiple monitors by enumerating CRTCs and tracking display timing independently for each. ```bash # Phase 3: Multi-monitor claude "Extend to enumerate all CRTCs and track timing per-CRTC separately" ``` -------------------------------- ### Install Daemon Executable Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/src/daemon/CMakeLists.txt Installs the 'capframex-daemon' executable to the system's binary directory and assigns it to the 'daemon' component for packaging. ```cmake install(TARGETS capframex-daemon RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT daemon) ``` -------------------------------- ### Build WiX Installer Source: https://github.com/cxworld/capframex/blob/master/AGENTS.md Builds the WiX installer project for CapFrameX. This command is used to create the final installation package. ```bash msbuild source\CapFrameXInstaller\CapFrameXInstaller.wixproj /p:Configuration=Release /p:Platform=x64 ``` -------------------------------- ### Install Build Dependencies (Debian/Ubuntu) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/CLAUDE.md Installs essential build tools and the Vulkan development library on Debian-based systems. ```bash sudo apt install build-essential cmake libvulkan-dev # .NET 8 SDK required - see https://dotnet.microsoft.com ``` -------------------------------- ### Quick Start: Add Threading (Claude) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/Display_Timing_Tracker_DEV_PLAN.md Extends the project by introducing a monitoring thread, a ring buffer for storing timing data, and a function to retrieve average flip timings. ```bash # Phase 2: Add threading claude "Add a monitoring thread with a ring buffer that stores the last 120 display timing samples, expose a function to get average ms between flips" ``` -------------------------------- ### Install libdrm and libudev on Debian/Ubuntu (Bash) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/Display_Timing_Tracker_DEV_PLAN.md Provides the command to install the necessary development libraries for DRM and udev on Debian-based systems. ```bash sudo apt install libdrm-dev libudev-dev ``` -------------------------------- ### Example perf stat Usage for CPU Utilization Source: https://github.com/cxworld/capframex/blob/master/pmcreader-plugin/intel-perfmon/README.md An example of using the perf stat command to measure CPU utilization percentage for the 'mlc' application. ```bash ./perf stat -M cpu_utilization_percent -a -- ./mlc ``` -------------------------------- ### Build Linux perf with Custom Metrics Source: https://github.com/cxworld/capframex/blob/master/pmcreader-plugin/intel-perfmon/README.md Navigates to the perf directory within the Linux kernel source and builds the perf executable. Ensure dependencies are installed prior to running. ```bash cd /tools/perf make ``` -------------------------------- ### Memory Clock Examples Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md Lists expected memory clock values for common DDR5 and LPDDR5X configurations to aid in hardware validation of the calculated QCLK MHz. ```text DDR5-5600: UI memory clock usually about 2800 MHz DDR5-6400: UI memory clock usually about 3200 MHz LPDDR5X-8533: UI memory clock convention may differ; validate carefully ``` -------------------------------- ### Run Daemon in Background Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Starts the CapFrameX daemon as a background process. ```bash ./build/bin/capframex-daemon & ``` -------------------------------- ### Overlay Configuration File Format Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/OVERLAY_DEV_PLAN.md Example INI file format for CapFrameX overlay configuration. Defines general settings, visibility toggles for metrics, graph parameters, and color customization. ```ini [General] enabled=true position=top_left preset=standard scale=1.0 opacity=0.85 toggle_key=F12 [Visibility] fps=true frametime=true frametime_graph=true 1_percent_low=true 0_1_percent_low=true cpu_usage=true cpu_temp=true gpu_usage=true gpu_temp=true gpu_power=true vram=true ram=false [Graph] width=300 height=80 history_seconds=10 show_grid=true target_fps=60 [Colors] accent=#4AA3DF background_opacity=0.85 ``` -------------------------------- ### Tool Definitions Source: https://github.com/cxworld/capframex/blob/master/dev-plans/MCP_Server_Implementation_NET472_WPF_App.md Example C# class defining tools that can be called via the MCP protocol. Each tool and its parameters are described using attributes, which the SDK uses to generate the JSON schema for tool discovery. ```APIDOC ## Tool Definitions (MyApp.Mcp/Tools/) Tools are defined as C# classes with attributes. The SDK automatically generates the JSON schema for MCP tool discovery. ```csharp using System.ComponentModel; using ModelContextProtocol; using MyApp.Core; [McpServerToolType] public class MyAppTools { private readonly TaskRepository _repo; public MyAppTools(TaskRepository repo) => _repo = repo; [McpServerTool, Description("Creates a new task in the app")] public async Task CreateTask( [Description("Title of the task")] string title, [Description("Person the task is assigned to")] string assignee = "") { var task = await _repo.CreateTask(title, assignee); return $"Task #{task.Id} created: {title} → {assignee}"; } [McpServerTool, Description("Lists tasks filtered by status (open, closed, all)")] public async Task> ListTasks( [Description("Filter status: open, closed, or all")] string status = "open") { return await _repo.GetTasksByStatus(status); } [McpServerTool, Description("Returns project statistics")] public async Task GetStats() { return await _repo.GetProjectStats(); } } ``` ### Guidelines for Tool Descriptions - Every tool and every parameter needs a `[Description]` attribute. - Descriptions should be clear and unambiguous – Claude selects tools based on these texts. - List allowed values for parameters (e.g. "open, closed, all") in the description. - Return values should be serializable objects or strings. ``` -------------------------------- ### Initialize DRM Device and Event Context (C) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/Display_Timing_Tracker_DEV_PLAN.md Includes necessary headers and demonstrates opening the DRM device and setting up the event context for handling vblank and page flip events. ```c #include #include int fd = open("/dev/dri/card0", O_RDWR); drmEventContext evctx = { .version = DRM_EVENT_CONTEXT_VERSION, .page_flip_handler = flip_handler, .vblank_handler = vblank_handler, }; ``` -------------------------------- ### Handoff Prompt for PawnIO Module Implementation Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md A detailed prompt for initiating the implementation of the PawnIO Intel client IMC clock module. It outlines the goal, key constraints, and initial steps for development. ```text We are implementing an upstream PR for https://github.com/namazso/PawnIO.Modules. Goal: add a safe read-only Intel client IMC/QCLK clock-ratio module for Panther Lake memory-clock calculation, without WinRing0-style generic access. Read local plan first: D:\Code\CapFrameX\dev-plans\PantherLake_IMC_Clock_PawnIO_PR_Plan.md Key constraints: - Do not expose generic PCI/MMIO/MSR read/write IOCTLs. - Add a dedicated module, likely IntelClientImcClock.p. - Export only ioctl_read_imc_clock with fixed output fields. - Strictly allowlist Intel Family 6 Model 0xCC and 0xD5 initially. - Read MCHBAR from PCI B0:D0:F0 offsets 0x48/0x4C, require enable bit, never write it. - First candidate register: MCHBAR + 0x13D10 MEMSS_PMA_CR_BIOS_DATA, bits 7:0 ratio, bit 8 gear, ref BCLK/3. - Treat source as experimental until validated on real PTL hardware. - Do not enable SA_PERF_STATUS for PTL unless validated; Intel docs warn QCLK_RATIO is not defined properly on Core Ultra H/U. - Include Doxygen-style docs and no dynamic arrays. Start by cloning PawnIO.Modules, inspecting IntelMSR.p and SmbusIntelSkylakeIMC.p, then implement the new module and run the repo's build workflow. ``` -------------------------------- ### Build Full Solution Source: https://github.com/cxworld/capframex/blob/master/AGENTS.md Builds the entire CapFrameX solution, including all projects, for the Release configuration and x64 platform. This command should be run from the repository root. ```bash msbuild CapFrameX.sln /p:Configuration=Release /p:Platform=x64 ``` -------------------------------- ### Run Avalonia App Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Launches the self-contained CapFrameX GUI application. ```bash ./build/publish/CapFrameX.App ``` -------------------------------- ### Overlay Renderer Header Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/OVERLAY_DEV_PLAN.md Defines the interface for the OverlayRenderer, including creation, destruction, swapchain setup, and drawing functions. ```c #ifndef OVERLAY_RENDERER_H #define OVERLAY_RENDERER_H #include #include typedef struct OverlayRenderer OverlayRenderer; // Lifecycle OverlayRenderer* overlay_renderer_create(VkDevice device, VkPhysicalDevice physDevice, uint32_t graphicsQueueFamily, VkQueue queue); void overlay_renderer_destroy(OverlayRenderer* renderer); // Per-swapchain setup bool overlay_renderer_setup_swapchain(OverlayRenderer* renderer, VkSwapchainKHR swapchain, VkFormat format, uint32_t width, uint32_t height, uint32_t imageCount, VkImage* images); void overlay_renderer_cleanup_swapchain(OverlayRenderer* renderer, VkSwapchainKHR swapchain); // Render overlay onto swapchain image void overlay_renderer_draw(OverlayRenderer* renderer, VkSwapchainKHR swapchain, uint32_t imageIndex, VkSemaphore waitSemaphore, VkSemaphore signalSemaphore); #endif ``` -------------------------------- ### Specify Wrapper File Path Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md Indicates the location for the C# wrapper file that will interface with the PawnIO Intel client IMC clock module. ```text source/LibreHardwareMonitorLib/PawnIo/IntelClientImcClock.cs ``` -------------------------------- ### Run CapFrameX Daemon in Debug Mode Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/CLAUDE.md Starts the CapFrameX daemon with debug output enabled. This should be run in a separate terminal. ```bash ./build/bin/capframex-daemon -d ``` -------------------------------- ### Create Working Directory for perfmon Metrics Source: https://github.com/cxworld/capframex/blob/master/pmcreader-plugin/intel-perfmon/README.md Creates a new directory and navigates into it for building perfmon metrics. ```bash mkdir perfmon-metrics cd perfmon-metrics ``` -------------------------------- ### Quick Build Script Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Executes a script to build all CapFrameX Linux components. ```bash ./scripts/build.sh ``` -------------------------------- ### Build Native C++ Components Source: https://github.com/cxworld/capframex/blob/master/CLAUDE.md Builds native C++ components required for full CapFrameX functionality. Ensure Visual Studio 2022 is installed. ```bash msbuild source\CapFrameX.Hwinfo\CapFrameX.Hwinfo.vcxproj /p:SolutionDir=%CD%\ /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=17.0 ``` ```bash msbuild source\CapFrameX.IGCL\CapFrameX.IGCL.vcxproj /p:SolutionDir=%CD%\ /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=17.0 ``` ```bash msbuild source\CapFrameX.ADLX\CapFrameX.ADLX.vcxproj /p:SolutionDir=%CD%\ /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=17.0 ``` -------------------------------- ### Test with Vulkan Application (vkcube) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/CLAUDE.md Configures environment variables to load the CapFrameX Vulkan layer and runs vkcube for testing. Ensure the build output is in the current directory. ```bash export VK_LAYER_PATH=$PWD/build/lib export VK_INSTANCE_LAYERS=VK_LAYER_capframex_capture vkcube ``` -------------------------------- ### MCP Protocol Flow Source: https://github.com/cxworld/capframex/blob/master/dev-plans/MCP_Server_Implementation_NET472_WPF_App.md This sequence illustrates the typical communication flow between Claude Code and an MCP server, starting from initialization to tool invocation and response. ```text 1. Claude Code starts MyApp.Mcp.exe 2. → initialize (handshake, protocol version) 3. ← response (server info, capabilities) 4. → tools/list (which tools are available?) 5. ← response (tool names, descriptions, JSON schemas) 6. → tools/call (invoke tool with arguments) 7. ← response (result as text/JSON) 8. ... (further calls) ``` -------------------------------- ### Build .NET GUI Application Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/CLAUDE.md Restores dependencies and builds the .NET GUI application in Release mode. ```bash cd src/app dotnet restore dotnet build -c Release ``` -------------------------------- ### MCP Server Debug Mode Source: https://github.com/cxworld/capframex/blob/master/dev-plans/MCP_Server_Implementation_NET472_WPF_App.md If you encounter issues with MCP server registration or connection, start Claude Code with this flag to enable debug logging for troubleshooting. ```bash claude --mcp-debug ``` -------------------------------- ### Overlay Renderer Integration in Layer Creation/Destruction Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/OVERLAY_DEV_PLAN.md Shows how to integrate the overlay renderer's creation and destruction calls within the layer's device creation and destruction functions. ```c // In layer_CreateDevice - after device creation static OverlayRenderer* g_overlayRenderer = NULL; // After successful device creation: g_overlayRenderer = overlay_renderer_create(device, physicalDevice, queueFamilyIndex, queue); // In layer_DestroyDevice - before device destruction overlay_renderer_destroy(g_overlayRenderer); g_overlayRenderer = NULL; ``` -------------------------------- ### Add MCP Server Command Source: https://github.com/cxworld/capframex/blob/master/dev-plans/MCP_Integration_DevPlan.md Example command to add the CapFrameX MCP server to a Claude Code client. The user needs to register the HTTP endpoint once. ```bash claude mcp add capframex --transport http http://localhost:/mcp ``` -------------------------------- ### Implement Main Function Gates Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md Implement the main function to gate module loading based on architecture and CPU vendor. It's recommended to return STATUS_NOT_SUPPORTED in the IOCTL for unsupported models. ```pawn NTSTATUS:main() { if (get_arch() != ARCH_X64) return STATUS_NOT_SUPPORTED; if (get_cpu_vendor() != CpuVendor_Intel) return STATUS_NOT_SUPPORTED; // Optional: do not hard fail on unsupported model in main() if users want // the module to load and then ioctl returns STATUS_NOT_SUPPORTED. return STATUS_SUCCESS; } ``` -------------------------------- ### Clone and Branch PawnIO Modules Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md Clone the PawnIO.Modules repository and create a new branch for Intel client IMC clock development. ```powershell git clone https://github.com//PawnIO.Modules.git cd PawnIO.Modules git remote add upstream https://github.com/namazso/PawnIO.Modules.git git checkout -b intel-client-imc-clock ``` -------------------------------- ### JSON Schema for MCP Input (JSON) Source: https://github.com/cxworld/capframex/blob/master/dev-plans/MCP_Integration_DevPlan.md Example of the expected input schema shape for MCP tools. This schema defines the structure for tool arguments, including primitive types and objects. ```json { "type": "object", "properties": { "filter": { "type": "string", "description": "..." } }, "required": [] } ``` -------------------------------- ### Build Native Components (Daemon + Layer) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/CLAUDE.md Compiles only the native daemon and Vulkan layer components using CMake. Ensure you are in the build directory. ```bash mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release make -j$(nproc) ``` -------------------------------- ### Register CapFrameX MCP Server with Claude Code Source: https://github.com/cxworld/capframex/blob/master/README.md Register the CapFrameX MCP server with Claude Code. This is a one-time setup. Ensure CapFrameX is running and note the active port from its logs or settings. ```bash claude mcp add -s user capframex --transport http http://localhost:/mcp ``` -------------------------------- ### Build Main Application Source: https://github.com/cxworld/capframex/blob/master/CLAUDE.md Builds the main CapFrameX application in Release configuration for x64 platform. Requires Visual Studio 2022. ```bash msbuild source\CapFrameX\CapFrameX.csproj /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=17.0 ``` -------------------------------- ### MCP Server Entry Point Configuration Source: https://github.com/cxworld/capframex/blob/master/dev-plans/MCP_Server_Implementation_NET472_WPF_App.md Configures the MCP server using dependency injection and the stdio transport. It registers shared services from the core library and uses `CreateEmptyApplicationBuilder` to prevent log output corruption. ```csharp using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using ModelContextProtocol; using MyApp.Core; var builder = Host.CreateEmptyApplicationBuilder(settings: null); builder.Services .AddMcpServer() .WithStdioServerTransport() .WithToolsFromAssembly(); // Register shared services from MyApp.Core builder.Services.AddSingleton(); builder.Services.AddSingleton(); var app = builder.Build(); await app.RunAsync(); ``` -------------------------------- ### Helper Functions for MCHBAR Access Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md Recommended helper function signatures for reading MCHBAR base and DWORD values, and checking CPU model support. Security rule: only use compile-time constants or source-table offsets for MCHBAR access. ```pawn stock NTSTATUS:read_mchbar_base(&base) stock NTSTATUS:read_mchbar_dword(offset, &value) stock bool:is_supported_cpu_model(model) ``` -------------------------------- ### MCP Server Entry Point Source: https://github.com/cxworld/capframex/blob/master/dev-plans/MCP_Server_Implementation_NET472_WPF_App.md The Program.cs file for the .NET 9 console application that hosts the MCP server. It configures dependency injection for the MCP server and registers shared services from the MyApp.Core project. ```APIDOC ## MCP Server Entry Point (MyApp.Mcp/Program.cs) ```csharp using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using ModelContextProtocol; using MyApp.Core; var builder = Host.CreateEmptyApplicationBuilder(settings: null); builder.Services .AddMcpServer() .WithStdioServerTransport() .WithToolsFromAssembly(); // Register shared services from MyApp.Core builder.Services.AddSingleton(); builder.Services.AddSingleton(); var app = builder.Build(); await app.RunAsync(); ``` **Important:** Use `CreateEmptyApplicationBuilder`, not `CreateDefaultBuilder` – otherwise log messages end up on stdout and corrupt the JSON-RPC communication. ``` -------------------------------- ### Run Unit Tests Source: https://github.com/cxworld/capframex/blob/master/pmcreader-plugin/intel-perfmon/scripts/ci/verify_mapfile/README.md Execute the unit tests for the verification script using the Python unittest module. ```bash python -m unittest ``` -------------------------------- ### Existing PTL Implementation Reference Source: https://github.com/cxworld/capframex/blob/master/dev-plans/ArrowLake_OOBMSM_NguD2d_DevPlan.md Reference to the existing PTL implementation file for Intel Oobmsm Clocks. ```csharp source/LibreHardwareMonitorLib/PawnIo/IntelOobmsmClocks.cs ``` -------------------------------- ### Restore NuGet Packages Source: https://github.com/cxworld/capframex/blob/master/AGENTS.md Use this command to restore all necessary NuGet packages for the entire solution. Ensure you are in the root directory of the repository. ```bash nuget restore CapFrameX.sln ``` -------------------------------- ### CapFrameX Webserver Factory Integration Source: https://github.com/cxworld/capframex/blob/master/dev-plans/MCP_Integration_DevPlan.md Shows how the CapFrameX webserver factory is extended to include the new MCP module. This demonstrates the in-process integration. ```C# WebserverFactory.CreateWebServer(...) │ ├─► WithWebApi("/api", ...) existing REST ├─► WithModule(/ws/osd ...) existing WS ├─► WithModule(/ws/sensors ...) existing WS └─► WithModule(McpModule "/mcp") NEW ``` -------------------------------- ### Build Daemon and Vulkan Layer Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/README.md Compiles the daemon and Vulkan layer components using CMake. ```bash cmake -S . -B build cmake --build build ``` -------------------------------- ### Add Embedded Resource for PawnIO Module Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md Embed the Intel client IMC clock binary resource into the project. This is a necessary step before the wrapper can load and utilize the module. ```xml ``` -------------------------------- ### Run Integration Test (FrameReceptionTest) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/CLAUDE.md Executes an integration test that connects to the running daemon and verifies frame data reception. The daemon must be running prior to execution. ```bash dotnet run --project src/app/FrameReceptionTest ``` -------------------------------- ### Clock Speed Conversion Formula Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md Provides a reference conversion formula from bus clock (busClockMHz) to reference clock (refMHz) based on refMode, and then to QCLK MHz using the ratio. This is intended for the consumer wrapper, not the PawnIO module. ```text if refMode == BCLK_DIV_3: refMHz = busClockMHz / 3 if refMode == BCLK: refMHz = busClockMHz if refMode == BCLK_MUL_4_DIV_3: refMHz = busClockMHz * 4 / 3 qclkMHz = ratio * refMHz ``` -------------------------------- ### Display Timing Sample Structure and API (C) Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/Display_Timing_Tracker_DEV_PLAN.md Defines a structure to hold display timing information and outlines a C API for initializing, retrieving, and calculating display timing statistics. ```c typedef struct { double ms_between_display_change; uint64_t vblank_sequence; uint64_t timestamp_us; bool frame_missed; // sequence gap > 1 } display_timing_sample_t; // API int display_timing_init(const char* drm_device); int display_timing_get_latest(display_timing_sample_t* out); void display_timing_get_stats(double* avg_ms, double* min_ms, double* max_ms); void display_timing_shutdown(void); ``` -------------------------------- ### Configure Claude Desktop for CapFrameX Source: https://github.com/cxworld/capframex/blob/master/README.md Add this JSON configuration to your claude_desktop_config.json file to enable CapFrameX tools. Restart Claude Desktop after applying the changes. ```json { "mcpServers": { "capframex": { "url": "http://localhost:/mcp" } } } ``` -------------------------------- ### IntelMSR.p Module Structure Source: https://github.com/cxworld/capframex/blob/master/dev-plans/PantherLake_IMC_Clock_PawnIO_PR_Plan.md Reference PawnIO module structure for Intel MSR access. It includes allowlisted MSRs, size definitions, and basic gating for architecture and vendor. ```pawn #define DEFINE_IOCTL_SIZED(name, size) \ static inline int name(int fd, unsigned int cmd, void *arg) { \ return ioctl(fd, cmd, arg); \ } // ... other definitions ... int main(int fd, unsigned int cmd, void *arg) { // Gate on architecture and vendor if (arch != ARCH_X64 || vendor != VENDOR_INTEL) { return -1; } // ... rest of module logic ... return 0; } ``` -------------------------------- ### Build Main Application Source: https://github.com/cxworld/capframex/blob/master/AGENTS.md Builds only the main CapFrameX application project. This is useful for quicker iteration on the core application without building the entire solution. ```bash msbuild source\CapFrameX\CapFrameX.csproj /p:Configuration=Release /p:Platform=x64 ``` -------------------------------- ### Create Daemon Executable Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/src/daemon/CMakeLists.txt Creates the 'capframex-daemon' executable from the defined source and header files. ```cmake add_executable(capframex-daemon ${DAEMON_SOURCES} ${DAEMON_HEADERS}) ``` -------------------------------- ### Publish Self-Contained .NET Application Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/CLAUDE.md Builds and publishes a self-contained version of the application, likely for easier deployment. ```bash ./scripts/build.sh --publish ``` -------------------------------- ### Input Hooking for Hotkeys Source: https://github.com/cxworld/capframex/blob/master/capframex-linux/OVERLAY_DEV_PLAN.md Placeholder comment indicating the need to hook into X11/Wayland input systems for hotkey detection. An alternative approach using /dev/input/event* is also mentioned. ```c // Hook X11/Wayland input for hotkey detection // Alternative: Read from /dev/input/event* with appropriate permissions ```