Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How do i make debian use the dedicated GPU in games?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
Terminator_3420
Posts: 73
Joined: 2021-12-22 13:24
Been thanked: 1 time

How do i make debian use the dedicated GPU in games?

#1 Post by Terminator_3420 »

Well i installed minecraft and i get 90FPS even though i installed optifine. And i think the game uses iGPU not AMD GPU. Well how do i make my games run in dedicated GPU?
I like using Debian.

User avatar
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: How do i make debian use the dedicated GPU in games?

#2 Post by canci »

It's easiest to do in Gnome, where you can just "right-click on the app (while it's not running) in GNOME Shell's Activities Overview and choose the "Launch using Dedicated Graphics Card" option." (Source: switcheroo-control package information).

I'm not sure about KDE, but I can imagine they have a similar option somewhere.

If you don't have Gnome, KDE or another fancy desktop:

It's hard to tell how it was configured on your system, but usually, you can just prepend DRI_PRIME=1 to a command and it will use the dedicated card. So, for example, if you want famous open source game Super Tux Kart to run with your dedicated GPU, you'd start it like this:

Code: Select all

DRI_PRIME=1 supertuxkart
In specific cases, the number after = could vary.

You can then write custom scripts or edit application files manually in /usr/share/applications/ in order to have them always run with the dedicated card.
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

User avatar
Terminator_3420
Posts: 73
Joined: 2021-12-22 13:24
Been thanked: 1 time

Re: How do i make debian use the dedicated GPU in games?

#3 Post by Terminator_3420 »

canci wrote: 2022-01-23 10:34 It's easiest to do in Gnome, where you can just "right-click on the app (while it's not running) in GNOME Shell's Activities Overview and choose the "Launch using Dedicated Graphics Card" option." (Source: switcheroo-control package information).

I'm not sure about KDE, but I can imagine they have a similar option somewhere.

If you don't have Gnome, KDE or another fancy desktop:

It's hard to tell how it was configured on your system, but usually, you can just prepend DRI_PRIME=1 to a command and it will use the dedicated card. So, for example, if you want famous open source game Super Tux Kart to run with your dedicated GPU, you'd start it like this:

Code: Select all

DRI_PRIME=1 supertuxkart
In specific cases, the number after = could vary.

You can then write custom scripts or edit application files manually in /usr/share/applications/ in order to have them always run with the dedicated card.
Well i want to play minecraft so i need to type DRI_PRIME=1 Minecraft Launcher right?
I like using Debian.

User avatar
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: How do i make debian use the dedicated GPU in games?

#4 Post by canci »

You can also open the Minecraft Launcher in a text editor and prepend DRI_PRIME=1 where it says Exec= if you start Minecraft that way.

I think in Minecraft, it should say something like:

Code: Select all

Exec=/opt/minecraft-launcher/minecraft-launcher
Change that to:

Code: Select all

Exec=DRI_PRIME=1 /opt/minecraft-launcher/minecraft-launcher
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

User avatar
Terminator_3420
Posts: 73
Joined: 2021-12-22 13:24
Been thanked: 1 time

Re: How do i make debian use the dedicated GPU in games?

#5 Post by Terminator_3420 »

canci wrote: 2022-01-23 11:05 You can also open the Minecraft Launcher in a text editor and prepend DRI_PRIME=1 where it says Exec= if you start Minecraft that way.

I think in Minecraft, it should say something like:

Code: Select all

Exec=/opt/minecraft-launcher/minecraft-launcher
Change that to:

Code: Select all

Exec=DRI_PRIME=1 /opt/minecraft-launcher/minecraft-launcher
First i will try to open the game with terminal with this command DRI_PRIME=1 Minecraft Launcher. I hope it works.
I like using Debian.

User avatar
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: How do i make debian use the dedicated GPU in games?

#6 Post by canci »

Here's more documentation in case it doesn't work immediately:

https://wiki.archlinux.org/title/PRIME
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

User avatar
Terminator_3420
Posts: 73
Joined: 2021-12-22 13:24
Been thanked: 1 time

Re: How do i make debian use the dedicated GPU in games?

#7 Post by Terminator_3420 »

canci wrote: 2022-01-23 11:10 Here's more documentation in case it doesn't work immediately:

https://wiki.archlinux.org/title/PRIME
Thanks. But i use debian 11.
I like using Debian.

User avatar
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: How do i make debian use the dedicated GPU in games?

#8 Post by canci »

The instructions on the Arch Wiki are generic and work the same on Debian.
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

User avatar
Terminator_3420
Posts: 73
Joined: 2021-12-22 13:24
Been thanked: 1 time

Re: How do i make debian use the dedicated GPU in games?

#9 Post by Terminator_3420 »

canci wrote: 2022-01-23 11:21 The instructions on the Arch Wiki are generic and work the same on Debian.
Okay.
I like using Debian.

Post Reply