# How to enable Amd Graphics card?



## unbalancedskunk (Nov 26, 2022)

İ have installed drm-kmod. My computer is Dell Inspiron 5559. İ enabled graphics by processor but i would like to use my graphics card which is AMD Radeon R5 M335. Is there a way to enable it? I am looking for single command to use graphics card.


----------



## Alain De Vos (Nov 26, 2022)

These are the cards known to work,


			Graphics/AMD-GPU-Matrix - FreeBSD Wiki
		

The following output can be interesting,

```
pciconf -lv | egrep -i "amd|radeon"
```
In rc.conf put something like,

```
kld_list="drm radeonkms"
```
For newer cards its,

```
kld_list="drm amdgpu"
```
Try first without /etc/X11/xorg.conf
It if it fails make a small /etc/X11/xorg.conf

```
Section "Device"
    Identifier "Card0"
    Option "AccelMethod" "EXA"
    BusID "PC:1:0:0"
    Screen 0
EndSection
Section "Screen"
    Identifier "Screen0"
    Device       "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Depth     24
    EndSubSection
EndSection
```


----------



## unbalancedskunk (Nov 26, 2022)

Alain De Vos thank you but when i would like to activate graphics card for specific games. How do i do that? Will it be enabled automatically for all games?


----------



## Alain De Vos (Nov 26, 2022)

You install and run a window manager for most games,








						Chapter 5. The X Window System
					

This chapter describes how to install and configure Xorg on FreeBSD, which provides the open source X Window System used to provide a graphical environment




					docs.freebsd.org


----------



## meaw229a (Nov 27, 2022)

unbalancedskunk are you talking about a notebook with hybrid graphics ??


----------



## unbalancedskunk (Nov 27, 2022)

meaw229a may be, my processor has graphics module and i have one graphics card too.


----------



## meaw229a (Nov 27, 2022)

I guess you have one of the hybrid graphics notebooks but you should give us bit more information about your hardware.
There is a lot of technical knowledge on this forums but to help, people need to know more exact what system you have.

I have one of this notebooks. Intel integrated graphics but also a amd card and I'm working to get my head around it if I can
make this work on FreeBSD.


----------



## unbalancedskunk (Nov 27, 2022)

unbalancedskunk said:


> İ have installed drm-kmod. My computer is Dell Inspiron 5559. İ enabled graphics by processor but i would like to use my graphics card which is AMD Radeon R5 M335. Is there a way to enable it? I am looking for single command to use graphics card.


What informations do you need?


----------



## Alexander88207 (Nov 28, 2022)

Alain De Vos said:


> These are the cards known to work,
> 
> 
> Graphics/AMD-GPU-Matrix - FreeBSD Wiki
> ...



A few points.

Custom Xorg configuartions should be put into /usr/local/etc/X11/xorg.conf.d
Loading `drm` by hand is not needed when `amdgpu`, `i915kms` etc.. gets already called.
Color deph gets also set to the best by the xorg driver unless you want a lower.
The reason to use EXA instead of glamor?


----------



## Alain De Vos (Nov 28, 2022)

I did a test with glxgears and it gave serious speed improvement fps on my card using EXA.


----------



## unbalancedskunk (Nov 29, 2022)

Alain De Vos thank you this works but now i have other problem. I have Amd graphics but it shows Nvidia. When i choose Nvidia it works well. Should it be a problem?


----------

