Changing Primary GPU on Ubuntu with AMD 7950X CPU Built-in GPU and Dedicated 4090 GPU
When it comes to using a computer with multiple GPUs, such as an AMD 7950X CPU built-in GPU and a dedicated 4090 GPU, you might want to change the primary GPU on Ubuntu. This article will guide you through the process, providing detailed context and key concepts related to the topic.
Understanding GPUs on Ubuntu
Ubuntu supports both integrated and dedicated GPUs. The integrated GPU is built into the CPU, while the dedicated GPU is a separate component that can be added to the system. Both GPUs can be used simultaneously, but you may want to change the primary GPU for various reasons, such as improving performance or fixing compatibility issues.
Identifying GPUs on Ubuntu
To identify the GPUs on your Ubuntu system, you can use the following command:
lspci | grep VGAThis command will display a list of all the GPUs on your system, along with their device IDs.
Changing the Primary GPU
To change the primary GPU on Ubuntu, you need to edit the GRUB configuration file. You can do this by running the following command:
sudo nano /etc/default/grubFind the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and add the following option:
radeon.runpm=0 amdgpu.runpm=0This option will disable power management for both GPUs, allowing you to change the primary GPU.
Next, you need to edit the /etc/X11/xorg.conf file. If the file does not exist, you can create it by running the following command:
sudo nano /etc/X11/xorg.confAdd the following sections to the file, replacing Device0 and Device1 with the device IDs of your GPUs:
Section "Device"
Identifier "Device0"
Driver "radeon"
BusID "PCI:x:x:x"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
BusID "PCI:x:x:x"
EndSectionFinally, you need to specify the primary GPU. To do this, add the following line to the Section "Screen" section:
Option "PrimaryGPU" "Device0"Save the file and restart your system. The primary GPU should now be changed to the one specified in the PrimaryGPU option.
Monitor Connections
When connecting monitors to your system, it's important to note that the built-in GPU on the AMD 7950X CPU has two HDMI ports. If you're using an Asus ProArt X670E motherboard, you can connect the monitors to either the CPU or the dedicated 4090 GPU. However, if you're using the built-in GPU as the primary GPU, you should connect the monitors to the CPU.
- Ubuntu supports both integrated and dedicated GPUs
- You can identify GPUs on Ubuntu using the
lspci | grep VGAcommand - To change the primary GPU, you need to edit the GRUB and
xorg.conffiles - When connecting monitors, make sure to connect them to the primary GPU
References
- Ubuntu Documentation: https://help.ubuntu.com/community/BinaryDriverHowto/AMD
- Arch Linux Wiki: https://wiki.archlinux.org/title/NVIDIA
- Red Hat Documentation: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/graphics_ troubleshooting_guide/ch-gpu-troubleshooting