Distro News

AMDGPU sysfs interface allows Linux users to adjust integrated GPU memory allocation

Key Takeaway

Users can now modify the Unified Memory Architecture (UMA) carveout for AMD integrated GPUs via sysfs without entering the BIOS.

Summary

A new interface within the AMDGPU driver enables Linux users to manage how much system RAM is reserved for integrated graphics. By utilizing the sysfs filesystem, users can view and request different Unified Memory Architecture (UMA) carveout sizes for hardware like the Radeon 890M. This functionality relies on GPU firmware and ACPI ATCS support to communicate allocation requests to the system.

Previously, adjusting the dedicated graphics memory required navigating through often-hidden BIOS menus. With this driver-level implementation, a simple terminal command can set a new allocation index, which then takes effect after a system reboot. This is particularly relevant for systems with high RAM capacities where users may want to balance memory between the CPU and the iGPU.

Technical implementation of the UMA carveout interface

  • Sysfs Interface: The driver exposes two specific files under /sys/class/drm/card*/device/uma/: carveout_options for viewing available memory indices and carveout for selecting a new allocation.
  • Hardware Requirements: The feature requires firmware that supports the necessary ACPI ATCS (AMD Configuration Table Structure) functionality to facilitate the memory request.
  • Kernel Integration: While the upstream kernel feature was introduced in version 7.0, it allows for direct interaction with the AMDGPU driver to change the fixed reservation at boot time.
  • Memory Management: Changing the allocation via echo [index] | sudo tee ... modifies the amount of system RAM reserved for the GPU, which is reflected in the total usable memory reported by tools like free -h after a reboot.

Why it matters

This development simplifies system tuning for Linux users running high-end APUs, especially those using large amounts of DDR5 RAM. It is particularly beneficial for local AI workloads and large-scale compute tasks that rely on reported dedicated video memory to determine model loading limits.

Original reference: www.linuxlinks.com →