Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Changed AMD Video Cards, Radeon Driver Won't Go Away
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tabanus
l33t
l33t


Joined: 11 Jun 2004
Posts: 626
Location: UK

PostPosted: Sun Sep 24, 2017 12:07 am    Post subject: Changed AMD Video Cards, Radeon Driver Won't Go Away Reply with quote

I've just upgraded a PC re-using hard drives, but with a new motherboard, CPU, graphics.

The old PC used the radeon graphics driver, and the new one is an AMD APU with Carrizo graphics. This uses the newer amdgpu driver. I've changed all the settings I can think of, re-compiled the kernel and libdrm for the new driver, but portage insists on compiling mesa with radeon graphics support. How do I nuke this?

Code:
$ cat /etc/portage/make.conf
CFLAGS="-march=bdver4 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
CPU_FLAGS_X86="aes avx avx2 fma3 fma4 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop"
LINGUAS="en_GB"
L10N="en-GB"
MAKEOPTS="-j4"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
USE="alsa cdr corefonts cups dri dvd ffmpeg foomaticdb icu nptl nsplugin opengl truetype type1 -bluetooth -firefox -gnome -gstreamer -gtk -introspection -ipv6 -libav -libnotify -oss -quicktime -samba -semantic-desktop -startup-notification -xinerama"
FEATURES="parallel-fetch buildpkg"
EMERGE_DEFAULT_OPTS="--verbose"
INPUT_DEVICES="evdev"
VIDEO_CARDS="amdgpu radeonsi"
PORTAGE_ELOG_SYSTEM="save_summary echo"
PORTDIR_OVERLAY="/usr/portage/local"
ACCEPT_LICENSE="dlj-1.1 google-chrome Google-TOS"
PORTAGE_NICENESS="15"
SANE_BACKENDS=""
GRUB_PLATFORMS="pc"
PORTDIR="/usr/portage"


Code:
# emerge -p mesa

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-libs/libdrm-2.4.80::gentoo  USE="-libkms -static-libs -valgrind" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="amdgpu radeon* (-exynos) (-freedreno) -intel -nouveau (-omap) (-tegra) (-vc4) (-vivante) -vmware" 0 KiB
[ebuild   R    ] media-libs/mesa-17.0.6::gentoo  USE="classic dri3 egl gallium gbm gles2 llvm nptl wayland -bindist -d3d9 -debug -gles1 -opencl -openmax -osmesa -pax_kernel -pic (-selinux) -vaapi -valgrind -vdpau -vulkan -xa -xvmc" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="radeonsi* (-freedreno) -i915 -i965 -imx -intel -nouveau -r100 -r200 -r300 -r600 -radeon* (-vc4) (-vivante) -vmware" 0 KiB

Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by media-libs/mesa-17.0.6::gentoo[-video_cards_r100,-video_cards_r300,-video_cards_r200,-video_cards_r600,-video_cards_radeon,video_cards_radeonsi]
# required by mesa (argument)
>=x11-libs/libdrm-2.4.80 video_cards_radeon

_________________
Things you might say if you never took Physics: "I'm overweight even though I don't overeat." - Neil deGrasse Tyson
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Sep 24, 2017 12:50 am    Post subject: Reply with quote

You could always try leaving out the radeon module from the kernel, and see how it goes.
/proc/config.gz wrote:
# CONFIG_DRM_RADEON is not set
CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_SI=y
CONFIG_DRM_AMDGPU_CIK=y

I think the amdgpu module is mainly for polaris and vega chips, but I have tried it with a hawaii chip and it seems to work.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17809

PostPosted: Sun Sep 24, 2017 3:17 am    Post subject: Reply with quote

Mesa itself doesn't appear to be using radeon in that output. And libdrm doesn't have an option for radeonsi, only radeon. I wonder if that is the issue?

Maybe this helps?
_________________

Believing I had supernatural powers I slammed into a brick wall.
I said hey, is this my problem? Is this my fault?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21549
Location: here

PostPosted: Sun Sep 24, 2017 11:01 am    Post subject: Reply with quote

You tried with
Code:
# emerge -ND --with-bdeps y @world

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
duby2291
Guru
Guru


Joined: 17 Oct 2004
Posts: 583

PostPosted: Sun Sep 24, 2017 12:59 pm    Post subject: Reply with quote

That's perfectly normal. The kernel has the radeon driver and the amdgpu driver. But mesa also has some drivers r300g, r600g and radeonsi. But there are shared components between them called radeon. It's not itself a driver, it's just a place where they can share stuff.
Back to top
View user's profile Send private message
tabanus
l33t
l33t


Joined: 11 Jun 2004
Posts: 626
Location: UK

PostPosted: Sun Sep 24, 2017 4:20 pm    Post subject: Reply with quote

Thanks for the replies
Code:

# emerge -ND --with-bdeps y @world

Allowed me to compile mesa without VIDEO_CARDS="radeon", but the system still wants to install x11-drivers/xf86-video-ati which is pulled in by libdrm. Upgrading to the latest mesa/libdrm/llvm as suggested on the reddit page that pjp linked doesn't appear to improve the situation.

I guess for now at least I'll have to stick with VIDEO_CARDS="amdgpu radeonsi radeon"

It doesn't really make sense that you have to install multiple drivers for the one chip. Seems to be working anyway. X starts & glx gears works.
_________________
Things you might say if you never took Physics: "I'm overweight even though I don't overeat." - Neil deGrasse Tyson
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Sep 24, 2017 10:49 pm    Post subject: Reply with quote

You can check which kernel module your video card is using like this :
Code:
# lspci -k

...
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT / Grenada XT [Radeon R9 290X/390X]
   Subsystem: PC Partner Limited / Sapphire Technology Hawaii XT / Grenada XT [Radeon R9 290X/390X]
   Kernel driver in use: amdgpu
   Kernel modules: amdgpu

I think most AMD chips default to the radeon driver unless you leave it out of the kernel like I did.
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Mon Sep 25, 2017 2:31 am    Post subject: Don't worry... be happy Reply with quote

It's fine to have radeon in your VIDEO_CARDS for your amdgpu. Here's what I have with an installed RX-460. I do leave out the radeon from kernel though.

Code:
# grep RADEON /usr/src/linux/.config
# CONFIG_DRM_RADEON is not set
# CONFIG_FB_RADEON is not set
# grep AMDGPU /usr/src/linux/.config
CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_SI=y
CONFIG_DRM_AMDGPU_CIK=y
CONFIG_DRM_AMDGPU_USERPTR=y
CONFIG_DRM_AMDGPU_GART_DEBUGFS=y



Code:
0c:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Polaris11] (rev cf)
        Subsystem: Gigabyte Technology Co., Ltd Baffin [Polaris11]
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu


Code:
# grep VIDEO /etc/portage/make.conf
VIDEO_CARDS="vesa radeonsi amdgpu radeon"


Code:
# emerge -pv mesa

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] media-libs/mesa-17.2.1::gentoo  USE="classic dri3 egl gallium gbm gles1 gles2 llvm nptl opencl osmesa vaapi valgrind vdpau vulkan wayland xa xvmc -bindist -d3d9 -debug -openmax -pax_kernel -pic (-selinux) -unwind" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="radeon radeonsi (-freedreno) -i915 -i965 -imx -intel -nouveau -r100 -r200 -r300 -r600 (-vc4) (-vivante) -vmware" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB



Code:
# emerge -pv libdrm                                                                                   

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] x11-libs/libdrm-2.4.83::gentoo  USE="libkms static-libs valgrind" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="amdgpu radeon (-exynos) (-freedreno) -intel -nouveau (-omap) (-tegra) (-vc4) (-vivante) -vmware" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


And so I have the xf86-video-ati emerged but it will never get used:

Code:
# ls /var/db/pkg/x11-drivers
xf86-input-evdev-2.10.5     xf86-input-mouse-1.9.2   xf86-video-fbdev-0.4.4
xf86-input-keyboard-1.9.0   xf86-video-amdgpu-1.4.0  xf86-video-qxl-0.1.5
xf86-input-libinput-0.25.1  xf86-video-ati-7.10.0    xf86-video-vesa-2.3.4
Back to top
View user's profile Send private message
tabanus
l33t
l33t


Joined: 11 Jun 2004
Posts: 626
Location: UK

PostPosted: Wed Oct 04, 2017 6:37 pm    Post subject: Reply with quote

This has to be a bug in the ebuild/portage.
It's pulling in completely unnecessary dependencies, ie x11-drivers/xf86-video-ati, and radeon in mesa.

Not sure who I would report this to
_________________
Things you might say if you never took Physics: "I'm overweight even though I don't overeat." - Neil deGrasse Tyson
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7038
Location: Saint Amant, Acadiana

PostPosted: Wed Oct 04, 2017 6:55 pm    Post subject: Reply with quote

It is more likely your world file is contaminated.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13607

PostPosted: Thu Oct 05, 2017 1:03 am    Post subject: Reply with quote

media-libs/mesa/mesa-17.0.6.ebuild:
    36  RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
    77  LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.74"
   136  for card in ${RADEON_CARDS}; do
   137      RDEPEND="${RDEPEND}
   138          video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] )
   139      "
   140  done
That explains why mesa with radeonsi requests x11-libs/libdrm with VIDEO_CARDS=radeon. None of the output shown supports the statement that x11-libs/libdrm requires x11-drivers/xf86-video-ati, nor does the x11-libs/libdrm ebuild support that. However, if you installed x11-drivers/xorg-drivers with the right flags, that would require x11-drivers/xf86-video-ati.
Back to top
View user's profile Send private message
Gordex
n00b
n00b


Joined: 10 Jul 2008
Posts: 26

PostPosted: Mon Oct 30, 2017 10:16 pm    Post subject: Reply with quote

indeed @ Hu.. encountered the same problem just today
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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