# Cannot run in framebuffer mode.



## zoujiaqing (Feb 20, 2020)

My laptop CPU is AMD Ryzen 3700U and GPU is AMD VEGA 10!

startx is failed!

I installed for drm-kmod-12 and kldload amdgpu .. can't start.


----------



## Raffeale (Feb 21, 2020)

can you find anything about drm information in your dmesg,I think that is drm problem, Svn checkout FreeBSD Svn and compile it,I will give your a thread for this written by me


----------



## Raffeale (Feb 21, 2020)

Read this thread, Amd gpu setup for beginner it can help you ,my laptop cpu is r3500u


----------



## SirDice (Feb 21, 2020)

Install misc/pastebinit and run `cat /var/log/Xorg.0.log | pastebinit`. Post the URL here.


----------



## zoujiaqing (Feb 22, 2020)

SirDice said:


> Install misc/pastebinit and run `cat /var/log/Xorg.0.log | pastebinit`. Post the URL here.











						root - Pastebin.com
					






					pastebin.com


----------



## Sevendogsbsd (Feb 22, 2020)

I suspect this is your issue but I don't have an AMD GPU so have no experience setting them up:

```
[  2551.827] (II) LoadModule: "ati"
[  2551.827] (WW) Warning, couldn't open module ati
[  2551.827] (II) UnloadModule: "ati"
[  2551.827] (II) Unloading ati
[  2551.827] (EE) Failed to load module "ati" (module does not exist, 0)
```

Also, did you read the FreeBSD graphics wiki? There is a bit about AMD graphics and the EFI framebuffer:


> It is important to note that there is currently a conflict with both AMD drivers and the EFI frambuffer.  The current workaround, when booting via UEFI on these systems, is to disable the framebuffer via /boot/loader.conf:
> hw.syscons.disable=1
> This will have the side effect of there being no console output until either the amdgpu or radeonkms kernel driver is loaded.  Please see this Github issue for more context.



Maybe this is related to your issue?


----------



## zoujiaqing (Feb 22, 2020)

Sevendogsbsd said:


> I suspect this is your issue but I don't have an AMD GPU so have no experience setting them up:
> 
> ```
> [  2551.827] (II) LoadModule: "ati"
> ...


Yes, i create new bug in bugzilla! and post other thread in forum!





						244274 – set hw.syscons.disable=1 FreeBSD is crashed!
					






					bugs.freebsd.org


----------



## zoujiaqing (Feb 22, 2020)

Raffeale said:


> can you find anything about drm information in your dmesg,I think that is drm problem, Svn checkout FreeBSD Svn and compile it,I will give your a thread for this written by me


----------



## zoujiaqing (Feb 22, 2020)

Raffeale said:


> Read this thread, Amd gpu setup for beginner it can help you ,my laptop cpu is r3500u


I will go to read now!


----------



## Raffeale (Feb 23, 2020)

Your demesg looks like incorrect, you didn’t load amdgpu module in your rc.conf


----------



## zoujiaqing (Feb 23, 2020)

Thanks all! The question has resolved!


```
$ cd /home/zoujiaqing
$ pkg install git
$ clone https://github.com/FreeBSDDesktop/kms-drm.git
$ cd kms-drm/
$ git checkout kms-drm-v5.0-fbsd12.1
$ make
$ sudo make install
$ sudo reboot
```

PS： The kms-drm 4.16 has bug!


----------



## wxsabi (Mar 19, 2020)

$ git checkout kms-drm-v5.0-fbsd12.1

that part gives me

error: pathspec 'kms-drm-v5.0-fbsd12.1' did not match any file(s) know to git

'


----------



## eternal_noob (Mar 19, 2020)

wxsabi said:


> error: pathspec 'kms-drm-v5.0-fbsd12.1' did not match any file(s) know to git


The branch is called _drm-v5.0-fbsd12.1_, try this one rather than _kms-drm-v5.0-fbsd12.1_.


----------



## wxsabi (Mar 19, 2020)

freebsd_noob said:


> The branch is called _drm-v5.0-fbsd12.1_, try this one rather than _kms-drm-v5.0-fbsd12.1_.



It took a while to compile, but that worked as far getting the module built. 

I rebooted and I got a graphical environment, but I think it's loading the vesa driver and not amdgpu for my RX580. Does it look like that to you? Here's my /varl/log/Xorg.0.log


----------



## eternal_noob (Mar 20, 2020)

wxsabi said:


> but I think it's loading the vesa driver and not amdgpu


Do you actually load the driver via `/etc/rc.conf`?
`kld_list="/boot/modules/amdgpu.ko"`

Is your user in the video group?
`pw groupmod video -m <username>`

PS: https://wiki.freebsd.org/Graphics


----------



## wxsabi (Mar 20, 2020)

Yep, I’ve done both things I got the results in the log file


----------



## shkhln (Mar 20, 2020)

wxsabi said:


> I rebooted and I got a graphical environment, but I think it's loading the vesa driver and not amdgpu for my RX580. Does it look like that to you? Here's my /varl/log/Xorg.0.log



You are running the "modesetting" driver.


----------



## wxsabi (Mar 20, 2020)

Ok, any clue on how I can get it to load amdgpu?


----------



## shkhln (Mar 20, 2020)

wxsabi said:


> Ok, any clue on how I can get it to load amdgpu?




```
Section "Device"
    Identifier "AMD"
    Driver "amdgpu"
EndSection
```


----------



## wxsabi (Mar 20, 2020)

Cool, I’ll see if I can find where that conf file is located.

thanks


----------



## eternal_noob (Mar 20, 2020)

wxsabi said:


> Cool, I’ll see if I can find where that conf file is located.


Create a file `/usr/local/etc/X11/xorg.conf.d/driver.conf` and add it to it.


----------



## wxsabi (Mar 22, 2020)

So, I did that, and this time the graphical environment didn't load at all. If I run startx it tells me that there is no screen found. 

Here's my log again


----------



## shkhln (Mar 22, 2020)

Apparently, you don't have xf86-video-amdgpu installed.


----------



## wxsabi (Mar 22, 2020)

What th...? nope, it wasn't installed. I have NO clue at what point I uninstalled it, but that seems to have done the trick.

Thanks a lot for your help everyone!


----------

