Solved How to force Minecraft (or any app) use the GPU in my Fedora Desktop?

Solved issue

CataclysmicGentleman

Active Member
Joined
Jan 18, 2023
Messages
213
Reaction score
87
Credits
1,729
My GPU is (AMD RX 6400 (SFF, 4GB RAM)) I have looked a lot online but still cant figure out how to get minecraft to rely on the GPU instead of the intel i5 core.. I LIKE SHADERS and streaming to youtube... and i really really enjoy using fedora, i just dont know all the commands or how to troubleshoot since my skill level is like 3.7/10 but I want to get better and learn, I hope to get a job in this field of work (IT/Computer Science).
I use a DELL Desktop, SFF, 16 GB ram, 1 TB SSD, Intel i5 8th gen, Fedora 36.
If you need any other information let me know. (PS: I just realized this belongs in "gaming" so if theres a way for me to move it there id gladly do that)
:D
 
Last edited:


Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,368
Reaction score
1,744
Credits
19,535
My GPU is (AMD RX 6400 (SFF, 4GB RAM)) I have looked a lot online but still cant figure out how to get minecraft to rely on the GPU instead of the intel i5 core.. I LIKE SHADERS and streaming to youtube... and i really really enjoy using fedora, i just dont know all the commands or how to troubleshoot since my skill level is like 3.7/10 but I want to get better and learn, I hope to get a job in this field of work (IT/Computer Science).
I use a DELL Desktop, SFF, 16 GB ram, 1 TB SSD, Intel i5 8th gen, Fedora 36.
If you need any other information let me know. (PS: I just realized this belongs in "gaming" so if theres a way for me to move it there id gladly do that)
:D
I think only an administrator or moderator @wizardfromoz or @KGIII can move your thread to the gaming section of the forum.

What kernel is your Fedora install using?
Code:
uname -r
 

Alexzee

Well-Known Member
Joined
Jun 1, 2019
Messages
3,368
Reaction score
1,744
Credits
19,535
In the meantime have a look here:

 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,398
Reaction score
4,850
Credits
47,020
If your monitor is plugged into the either the dvi or hdmi output interfaces of your graphics card, that graphics card should be used. If your monitor is plugged into the dvi or hdmi ports on your motherboard and your cpu has a graphical chip then most likely that one will be used, I have never tried it but it's the most logical way for it to work. You don't need to install the amd proprietary drivers, the opensource driver in the kernel should be fine for gaming.
 

DexTheDog

Active Member
Joined
Nov 2, 2020
Messages
391
Reaction score
163
Credits
2,649
My GPU is (AMD RX 6400 (SFF, 4GB RAM)) I have looked a lot online but still cant figure out how to get minecraft to rely on the GPU instead of the intel i5 core.. I LIKE SHADERS and streaming to youtube... and i really really enjoy using fedora, i just dont know all the commands or how to troubleshoot since my skill level is like 3.7/10 but I want to get better and learn, I hope to get a job in this field of work (IT/Computer Science).
I use a DELL Desktop, SFF, 16 GB ram, 1 TB SSD, Intel i5 8th gen, Fedora 36.
If you need any other information let me know. (PS: I just realized this belongs in "gaming" so if theres a way for me to move it there id gladly do that)
:D
Also how are you finding what gpu a game is using?(In minecraft you can do F3 and upper right I think)
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
9,161
Reaction score
8,115
Credits
39,277
I have modified the text colour in the first post to black, it was grey and hard to read.

Others can do likewise with their quotes if they wish.

Wizard
 

BigBadBeef

Active Member
Joined
Sep 23, 2021
Messages
437
Reaction score
219
Credits
3,962
My GPU is (AMD RX 6400 (SFF, 4GB RAM)) I have looked a lot online but still cant figure out how to get minecraft to rely on the GPU instead of the intel i5 core.. I LIKE SHADERS and streaming to youtube... and i really really enjoy using fedora, i just dont know all the commands or how to troubleshoot since my skill level is like 3.7/10 but I want to get better and learn, I hope to get a job in this field of work (IT/Computer Science).
I use a DELL Desktop, SFF, 16 GB ram, 1 TB SSD, Intel i5 8th gen, Fedora 36.
Okay, so, I'm not sure I understand what is your issue here. Is your pc running low fps with shaders? Is it refusing to run shaders in the first place? Based on which problem are you trying to tamper with it?

I wouldn't put more load on that GPU if I were you. The RX 6400 cannot keep up even with my 8 year old graphics card in terms of performance, and is even limited to 4 lanes on the PCI-E bus. And who knows what proprietary abomination of a motherboard did Dell put inside it. When I was still playing minecraft, even I had performance issues with some of the shaders I tried to use.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
10,610
Reaction score
9,130
Credits
88,086
I have modified the text colour in the first post to black, it was grey and hard to read.

I have since edited it to 'remove formatting' - which means it's the default color that the theme uses.

So, in the light theme it is black and it is white in the dark theme.

With the dark theme, black text is impossible to read.
 
OP
CataclysmicGentleman

CataclysmicGentleman

Active Member
Joined
Jan 18, 2023
Messages
213
Reaction score
87
Credits
1,729
Thank you everyone for your helpfulness, sorry for the late reply.
I have forced darkmode on my websites so my text apears white and backroud apears black.
I think only an administrator or moderator @wizardfromoz or @KGIII can move your thread to the gaming section of the forum.

What kernel is your Fedora install using?
Code:
uname -r
Answer:
5.18.19-200.fc36.x86_64

In the meantime have a look here:

Thank you!

If your monitor is plugged into the either the dvi or hdmi output interfaces of your graphics card, that graphics card should be used. If your monitor is plugged into the dvi or hdmi ports on your motherboard and your cpu has a graphical chip then most likely that one will be used, I have never tried it but it's the most logical way for it to work. You don't need to install the amd proprietary drivers, the opensource driver in the kernel should be fine for gaming.
I just checked and am 100% sure my monitor is plugged into my GPU. The issue isn't with Linux from what I know, it's with minecraft. I had to jump through some hoops to tell the GPU to identify Minecraft as a game that needs the GPU on windows, but the only reason I use windows is because it games better, if I could play minecraft on Fedora I would probably also be on fedora more often in general. Thank you for the information and suggestions :D

Also how are you finding what gpu a game is using?(In minecraft you can do F3 and upper right I think)
I will be sure to double check this!

Taken care of.
Thank you!

I have modified the text colour in the first post to black, it was grey and hard to read.

Others can do likewise with their quotes if they wish.

Wizard
Thanks!

Okay, so, I'm not sure I understand what is your issue here. Is your pc running low fps with shaders? Is it refusing to run shaders in the first place? Based on which problem are you trying to tamper with it?

I wouldn't put more load on that GPU if I were you. The RX 6400 cannot keep up even with my 8 year old graphics card in terms of performance, and is even limited to 4 lanes on the PCI-E bus. And who knows what proprietary abomination of a motherboard did Dell put inside it. When I was still playing minecraft, even I had performance issues with some of the shaders I tried to use.
My issue is the I5 8th gen does not have good graphics processors, so it runs minecraft very poorly without using the GPU. on the other hand my new graphics card does! I get over 60 FPS with shaders on minecraft at full screen while streaming. My little GPU has been working wonderfully.

I have since edited it to 'remove formatting' - which means it's the default color that the theme uses.

So, in the light theme it is black and it is white in the dark theme.

With the dark theme, black text is impossible to read.
Screenshot 2023-01-20 at 00-17-50 How to force Minecraft (or any app) use the GPU in my Fedora...png


All in all thanks guys for the help! :D
 
OP
CataclysmicGentleman

CataclysmicGentleman

Active Member
Joined
Jan 18, 2023
Messages
213
Reaction score
87
Credits
1,729
My comments are still awaiting moderation approval (too long I suppose)

In the meantime, here is a screenshot of minecraft F3 menu.

mcf3menulinux.png
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,398
Reaction score
4,850
Credits
47,020
Is your system a laptop or a desktop system, if the latter what output input interface is your monitor plugged in?
 

BigBadBeef

Active Member
Joined
Sep 23, 2021
Messages
437
Reaction score
219
Credits
3,962
Is your system a laptop or a desktop system, if the latter what output input interface is your monitor plugged in?
Look at the third line from the bottom, it says "display 854x480 (AMD)".

I suspect his card just can't handle minecraft shaders. I wonder if he could run minecraft with the "glthread" argument?
 

BigBadBeef

Active Member
Joined
Sep 23, 2021
Messages
437
Reaction score
219
Credits
3,962
My issue is the I5 8th gen does not have good graphics processors, so it runs minecraft very poorly without using the GPU. on the other hand my new graphics card does! I get over 60 FPS with shaders on minecraft at full screen while streaming. My little GPU has been working wonderfully.
So what's the problem?
 
OP
CataclysmicGentleman

CataclysmicGentleman

Active Member
Joined
Jan 18, 2023
Messages
213
Reaction score
87
Credits
1,729
Is your system a laptop or a desktop system, if the latter what output input interface is your monitor plugged in?
Desktop, HDMI plugged into the GPU.
The issue isn't with Linux, it is with minecraft, on windows I had to jump through hoops to make the GPU run minecraft.

Look at the third line from the bottom, it says "display 854x480 (AMD)".

I suspect his card just can't handle minecraft shaders. I wonder if he could run minecraft with the "glthread" argument?
It can run it, but both on windows 10,11 and linux Fedora 36 it won't use the GPU without some fiddling. I already got it to work on windows 11, now I just want it to work also on Linux. Should be pretty easy.

So what's the problem?
Minecraft doesn't rely on the GPU by default.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,398
Reaction score
4,850
Credits
47,020

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
2,103
Reaction score
1,714
Credits
15,219
Minecraft doesn't rely on the GPU by default.

???. I didn't do any special config of tinkering. My grandson plays this all the time.
This PC only has a discrete video card. But I have a laptop with a Intel-integrated/GeForce combo.
Sometimes the laptop uses the Intel, sometimes it uses the GeForce. I don't really have any control over it.
It seems if there is a heavy graphics load, it "auto-switches" over to the GeForce. Usually Minecraft
doesn't require a heavy graphics load. So I guess it uses the Intel video to save power/battery?
Note: This isn't just a Linux thing.. it does the exact same thing on Windoze 11.

1674237304829.png
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,398
Reaction score
4,850
Credits
47,020
Close Minecraft and return to MultiMC. Edit Instance again and go to Settings. Click on Custom Commands tab. Enable the Custom Commands checkbox.

At the Wrapper Command form, write this:
env DRI_PRIME=1

What this does, if you’re not already familiar with it, is basically the way to tell Minecraft’s Java Runtime to use the dedicated Radeon Graphics, like the RX series. DRI_PRIME=1 in general is quite a tricky subject, but it does work on most apps. Minecraft just made it significantly more difficult to use because of its launcher.
 
OP
CataclysmicGentleman

CataclysmicGentleman

Active Member
Joined
Jan 18, 2023
Messages
213
Reaction score
87
Credits
1,729
???. I didn't do any special config of tinkering. My grandson plays this all the time.
This PC only has a discrete video card. But I have a laptop with a Intel-integrated/GeForce combo.
Sometimes the laptop uses the Intel, sometimes it uses the GeForce. I don't really have any control over it.
It seems if there is a heavy graphics load, it "auto-switches" over to the GeForce. Usually Minecraft
doesn't require a heavy graphics load. So I guess it uses the Intel video to save power/battery?
Note: This isn't just a Linux thing.. it does the exact same thing on Windoze 11.

View attachment 14711
Minecraft runs fine normally, but when I try to run pretty graphics is when it struggles. Example photo:
MCwShaders7.png
 
OP
CataclysmicGentleman

CataclysmicGentleman

Active Member
Joined
Jan 18, 2023
Messages
213
Reaction score
87
Credits
1,729

Members online


Top