Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dual GPU/DRI_PRIME not working right
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
Hammerheart
n00b
n00b


Joined: 08 Aug 2023
Posts: 1
Location: MTL, QC, Canada

PostPosted: Tue Aug 08, 2023 4:06 pm    Post subject: Dual GPU/DRI_PRIME not working right Reply with quote

Well met everyone,

I got Gentoo running on my ThinkPad E460 a while ago, my third succesfull install, the other two being on my MacBook Pro 2012 (first one) and Acer Nitro 5.
The MacBook used Intel graphics, so just installing Mesa took care of everything. For my Acer, I went the other way and forced it to use NVIDIA only, which also worked just fine.
Now, the E460.
I have dual-graphics, Intel iGPU, and a Radeon dGPU.
BIOS doesn't let me deactivate the iGPU, and I understand that's because the dGPU is wired behind the iGPU.
I have installed Mesa drivers, as well as Radeon drivers. I installed Skyrim to test out, and I used launch options DRI_PRIME=1 as instructed to enable Prime offloading.
However, offloading doesn't work right, and only iGPU is used.

Here is part of my make.conf

Quote:
COMMON_FLAGS="-O2 -pipe -march=native"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
RUSTFLAGS="-C target-cpu=native -C link-arg=-Wl,-z,pack-relative-relocs -C opt-level=3"
DMDFLAGS="-O"
LDCFLAGS="-O4 -release"
MAKEOPTS="-j4 -l4"
PORTAGE_NICENESS=1
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=4 --autounmask=y --color=y"
VIDEO_CARDS="intel radeon"
ACCEPT_LICENSE="* -@EULA"
INPUT_DEVICES="libinput"
FEATURES="binpkg-logs buildpkg cgroup collision-protect downgrade-backup ipc-sandbox network-sandbox parallel-install sign"
USE="X -pgo -gpm minimal video_cards_radeon -video_cards_amdgpu -lto truetype -telemetry -nvidia python nvenc dri xinerama -cups -clamav -kde -systemd -cjk -gnome -emacs -xemacs -smartcard dbus motif elogind udev unicode upower usb dist-kernel modules mmap opengl qt4 qt5 qt6 gtk encoe ffmpeg networkmanager wifi bluetooth pulseaudio alsa cddb cda dvd dvdr vulkan layers anv abi_x86_32 abi_x86_64 driver persistenced -static-libs tools wayland libglvnd gles2 split-usr abi_x86_32 abi_x86_64 -static-libs udev split-usr tools readline


And here is the content of my Steam package.use

Quote:

x11-libs/libXdmcp abi_x86_32
virtual/opengl abi_x86_32
media-libs/mesa abi_x86_32
dev-libs/expat abi_x86_32
media-libs/libglvnd abi_x86_32
sys-libs/zlib abi_x86_32
x11-libs/libdrm abi_x86_32
x11-libs/libxshmfence abi_x86_32
x11-libs/libXext abi_x86_32
x11-libs/libXxf86vm abi_x86_32
x11-libs/libXfixes abi_x86_32
app-arch/zstd abi_x86_32
sys-devel/llvm abi_x86_32
x11-libs/libXrandr abi_x86_32
x11-libs/libXrender abi_x86_32
dev-libs/libffi abi_x86_32
sys-libs/ncurses abi_x86_32
dev-libs/libxml2 abi_x86_32
dev-libs/icu abi_x86_32
sys-libs/gpm abi_x86_32
virtual/libelf abi_x86_32
dev-libs/elfutils abi_x86_32
app-arch/bzip2 abi_x86_32
media-libs/vulkan-loader abi_x86_32


Am I missing something here? Have to admit, Optimus isn't my strong suit, and it's actually the first time I use a Radeon card under Linux.
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Wed Aug 16, 2023 5:37 pm    Post subject: Reply with quote

hi Hammerheart

i have to say that i have not manage to make it work my self because my dGPU is the main (nvidia) . but i will give you some info .
checkout :
https://wiki.gentoo.org/wiki/Hybrid_graphics

as you have intel and radeon you need :
Code:

VIDEO_CARDS="intel amdgpu radeonsi" #or radeon(older cards) but then i dont think you will get vulkan running and this may be why it is failing

they both will use modesetting and you can see what is what with :
Code:

xrandr --listproviders


small reply but it is a start :)

regards hedmo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum