Table of Contents
Introduccion
Do you have a laptop equipped with both an internal AMD Radeon Graphics card with the AMD CPU and a discrete NVIDIA GeForce RTX 3050 Mobile? This setup provides unparalleled performance when needed, but sometimes you might prioritize battery life and cooler operation. Fortunately in my case, openSUSE offers suseprime-select, a handy tool that allows you to switch between graphics cards, giving you the best of both worlds.
This blog post will guide you through activating and manually updating suseprime-select, along with demonstrating how to switch between your AMD Radeon 680M and NVIDIA GeForce RTX 3050 Mobile for optimal performance or battery savings in my case.
Let’s get to work :)
requirements
- openSUSE Tumbleweed (Maybe in other linux distribution you can have similar functionality)
- Root (administrator) privileges (achieved using sudo)
Installation:
Update package lists:
sudo zypper update
Install suseprime-select and its app indicator
sudo zypper install suseprime-select suseprime-appindicator
adjustment Scripts:
By default, suseprime-select assumes an Intel integrated graphics card. If yours is AMD, create custom scripts (proceed with caution if unfamiliar with file system modifications):
Create pkexec_amd script:
sudo nano /usr/share/suseprime-appindicator/scripts/pkexec_amd
Paste the following content:
#!/bin/bash
pkexec --disable-internal-agent /usr/sbin/prime-select amd
Save the file (Ctrl+O, Enter), then set permissions:
sudo chmod +x /usr/share/suseprime-appindicator/scripts/pkexec_amd
Modify indicator.py
sudo nano /usr/lib/python3.11/site-packages/suseprimeindicator/indicator.py
Locate the line containing ‘intel’ and change it to ‘amd’.
Search for a line similar to:
...
intel_notif = _('Switching to Intel staged')"
...
item_intel = gtk.MenuItem.new_with_label(_('Switch to Intel'))
...
result, output, error, status = glib.spawn_command_line_sync('/usr/share/suseprime-appindicator/scripts/pkexec_intel')
...
Save the file (Ctrl+O, Enter) and consider creating a backup before modification.
Switching Graphics Cards
Launch the app indicator:
The suseprime-appindicator should automatically show up in the system tray after installation.
Select the desired GPU:
Right-click the app indicator and choose either “Performance” (NVIDIA) or “Battery” (AMD) based on your needs.
Log out/in or reboot:
Switching between graphics cards often requires a logout/login or system restart for changes to take effect.
Conclusion
By following these steps, you’ve empowered yourself to manage your graphics card usage effectively on openSUSE Tumbleweed with an AMD Radeon and NVIDIA card setup. suseprime-select provides a convenient way to switch between cards, optimizing performance or conserving battery life as needed. Remember to exercise caution when modifying system files, and have fun exploring the flexibility of your powerful laptop!
Thank you for the initial photo.