# FreeBSD 12 (Release) and Ryzen revisited



## asymmetry (Aug 12, 2019)

Hello to all.

A few days ago I bought a new laptop (from ASUS VivoBook 15 series). I have tried to install FreeBSD 12 - Release but I have faced with one plus one problems:

1) at boot time everything freezes (something relevant to acpi). So I found that the solution is to set

```
hw.pci.mcfg=0
```
at boot prompt and later to set it at /boot/loader.conf

2) I have not managed to make the Radeon Vega gtx, integrated, gpu to work. 
The trick 

```
kld_list="amdgpu"
```
after having install both drm-kmod and drm-fbsd12-kmod did not help.

So I would like to ask: is the any way to go with this problem? 

Thank you in advance for your time and help!


----------



## Phishfry (Aug 13, 2019)

asymmetry said:


> kld_list="amdgpu"


You want to use the version from ports. The modules for that go in a different directory and you must give the path.
* kld_list="/boot/modules/amdgpu.ko"*


----------



## asymmetry (Aug 13, 2019)

Phishfry said:


> You want to use the version from ports. The modules for that go in a different directory and you must give the path. * kld_list="/boot/modules/amdgpu.ko"*



I have tried this as well but in vain...


----------



## asymmetry (Aug 13, 2019)

Updated info.

I have tried, without success, to install FreeBSD 12-Release plus Mate desktop.

The steps I have followed are:


```
# pkg update
# pkg install xorg slim mate drm-kmod drm-fdsb12.0-kmod xf86-video-amdgpu
```

then
at /etc/rc.conf

```
dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
```

at /etc/fstab

```
proc /proc procfs rw 0 0
```

at .xinitrc

```
exec mate-session
```

afterwards

```
cp ~/.xinitrc /home/USER/
```

and finally
at /boot/loader.conf

```
hw.pci.mcfg=0
hw.syscons.disable=1
kern.vty="vt"
kld_load="'/boot/modules/amdgpu.ko"
```

but my machine freezes after boot at efifb stage...

Could any one help me?


----------



## shkhln (Aug 13, 2019)

Depending on which Linux kernel version supports your hardware, you might want a development version of amdgpu port. See https://github.com/FreeBSDDesktop/kms-drm/issues/146#issuecomment-492755569.


----------



## asymmetry (Aug 13, 2019)

shkhln said:


> Depending on which Linux kernel version supports your hardware, you might want a development version of amdgpu port. See https://github.com/FreeBSDDesktop/kms-drm/issues/146#issuecomment-492755569.


Thank you. So it seems that I have to use Current (i.e., 13) isn't it? 
Have you spotted any other mistake?


----------



## shkhln (Aug 13, 2019)

asymmetry said:


> at /boot/loader.conf
> 
> ```
> …
> ...



Isn't that supposed to be _kld_list_ and placed in /etc/rc.conf?


----------



## asymmetry (Aug 13, 2019)

shkhln said:


> Isn't that supposed to be _kld_list_ and placed in /etc/rc.conf?


Yes my mistake.. Thank you very much.


----------



## shkhln (Aug 13, 2019)

asymmetry said:


> So it seems that I have to use Current (i.e., 13) isn't it?



We never recommend CURRENT here. STABLE might be an option, assuming all necessary things are backported.


----------



## asymmetry (Aug 13, 2019)

shkhln said:


> We never recommend CURRENT here. STABLE might be an option, assuming all necessary things are backported.


I have tried STABLE but nothing.... Any other ideas?


----------



## shkhln (Aug 13, 2019)

asymmetry said:


> I have tried STABLE but nothing....



Somehow I doubt you managed to build the FreeBSD kernel and LLVM from source in a half an hour on a laptop. What exactly did you try?


----------



## asymmetry (Aug 13, 2019)

shkhln said:


> Somehow I doubt you managed to build the FreeBSD kernel and LLVM from source in a half an hour on a laptop. What exactly did you try?


Of course I did not do that -what I meant is that I have downloaded the STABLE version and I tried the steps I describe in my previous post. I tend to believe that the problem is my graphics card. I see a message saying: "/dev/dri/card0 not found"


----------



## jallen (Aug 14, 2019)

asymmetry said:


> ```
> ...
> kld_load="'/boot/modules/amdgpu.ko"
> ```



What does this line look like after moving it to /etc/rc.conf and s/kld_load/kld_list? There is also an extra ' in that line.


----------



## asymmetry (Aug 15, 2019)

jallen said:


> What does this line look like after moving it to /etc/rc.conf and s/kld_load/kld_list? There is also an extra ' in that line.



The ' was a typo. If I do what you say I shows that the driver is loader. 

To my understanding, the bottom-line 
a) is there Vega GPU support in FreeBSD?
b) if yes, how should this be invoked?


----------



## shkhln (Aug 15, 2019)

You still didn't specify your CPU model or explained how "doesn't work" looks like this time. Xorg doesn't start? Crash and reboot? Anything else?


----------



## asymmetry (Aug 19, 2019)

AMD Ryzen 7 (3000 series). Does NOT work = I do not get to GUI by any means -always to the prompt for login, nothing else.


----------



## olli@ (Aug 19, 2019)

Would you please specify which “ASUS VivoBook 15” you have, and which Ryzen processor *exactly*? There are a lot of different models with different GPUs.

For example, if it's the ASUS VivoBook 15 X512DA with a Ryzen 7 3700U, then that one has a Radeon RX Vega 10 GPU. I think that one is not supported yet, but I could be wrong. Maybe someone else can tell for sure.

By the way, if Xorg refuses to start, the first thing to do is look at the Xorg.log file (it's in the /var/log directory).


----------



## asymmetry (Aug 19, 2019)

This is exactly the model. So my suspicion is verified.


----------



## shkhln (Aug 19, 2019)

olli@ said:


> Ryzen 7 3700U



Likely this PCI id (corresponds to this upstream commit). So, drm-v4.20 and drm-v5.0 branches.


----------



## asymmetry (Aug 19, 2019)

shkhln said:


> Likely this PCI id (corresponds to this upstream commit). So, drm-v4.20 and drm-v5.0 branches.


What does this mean? Should I have to wait until 12.1 or 13? (althought I have tested 13.0 and I had the same results).


----------



## shkhln (Aug 19, 2019)

asymmetry said:


> I have tested 13.0 and I had the same results



With drm-_devel_-kmod package? Otherwise that means precisely nothing.


----------



## asymmetry (Aug 19, 2019)

shkhln said:


> With drm-_devel_-kmod package? Otherwise that means precisely nothing.



OK but I am a bit confused.... drm-devel-kmod (and nothing else?) in which FreeBSD edition (12 Release, 12 Stable, 13 Current)?


----------



## asymmetry (Aug 21, 2019)

Update: 13-Current (15/08/2019) and (08/08/2019) both seem to be "broken": installation does not proceed and error messages show up. The procedure stacks at the point where basic packages are loaded (like kernel.txz etc).


----------



## asymmetry (Aug 21, 2019)

https://termbin.com/5lf6
		


Here are the details of my laptop.


----------

