# stuck at welcome to freebsd.



## unique name (Aug 17, 2021)

I am getting same error. I have rx580


SirDice said:


> Create a /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf:
> 
> ```
> Section "Device"
> ...


I am getting same error. I have rx580.
And have you pressed tab on 2nd and 3rd line? Also do i have to write Device or replace it with my device name?


----------



## SirDice (Aug 17, 2021)

unique name said:


> I am getting same error. I have rx580


That's an ATI/AMD card, not an NVidia card, so why are you enabling the NVidia driver?


----------



## unique name (Aug 17, 2021)

SirDice said:


> That's an ATI/AMD card, not an NVidia card, so why are you enabling the NVidia driver?


I havent done anything yet. I have just installed xorg, dwm, st, dmenu, vim, doas iirc. I havent changed any settings yet (havent added dwm in xinit).
But when i do startx, i get the same error of framebuffer.


----------



## SirDice (Aug 17, 2021)

unique name said:


> I havent done anything yet. I have just installed xorg, dwm, st, dmenu, vim, doas iirc. I havent changed any settings yet (havent added dwm in xinit).
> But when i do startx, i get the same error of framebuffer.


Start reading the handbook: 5.4. Xorg Configuration


----------



## unique name (Aug 17, 2021)

SirDice said:


> Start reading the handbook: 5.4. Xorg Configuration


I cant seem to find the issue. I have already added myself to wheel and video group and rx580 is a very common card which worked in openbsd.


----------



## SirDice (Aug 17, 2021)

Did you install graphics/drm-kmod? Did you load the correct kernel module?


----------



## unique name (Aug 17, 2021)

SirDice said:


> Did you install graphics/drm-kmod? Did you load the correct kernel module?


I did this 
"

Install the drm-kmod package
$ sudo pkg install drm-kmod

Take note of the post-install package message from drm-_fbsd<version>_-kmod as it contains important information - specifically add this to your /etc/rc.conf or /etc/rc.conf.d/amd file:
kld_list="/boot/modules/amdgpu.ko"

Ensure that your UID is a member of the "video" group.
Restart your system; you should see the amdgpu.ko get loaded and a flash on your console as we switch over to the new display driver.
Start Xorg via your usual method (i.e. startx, GDM, etc.)"
And this 
"
It is important to note that there is currently a conflict with both AMD drivers and the EFI frame buffer.  The current workaround, when booting via UEFI on these systems, is to disable the frame buffer via /boot/loader.conf:

hw.syscons.disable=1"

Now after reboot, i am stuck at welcome to freebsd screen.


----------



## Vull (Aug 17, 2021)

How I configure Radeon ATI graphics on FreeBSD-13.0-RELEASE-p3 for my Lenovo Laptop G50-45 integrated AMD APU, described as:

AMD A6-6310 APU with AMD Radeon R4 Graphics

Remove all files from /etc/X11/ and /usr/local/etc/X11/xorg.conf.d/ directories.
Put my user in the wheel and operator group, or, alternatively, in the video group only.
`pkg install drm-kmod xf86-video-ati`.
Explicitly do _*not*_ put any radeonkms, i915kms, or amdgpu directives in kld_list, /etc/rc.conf, or /boot/loader.conf.
Start X windows.
The machine starts in framebuffer mode for as long as the machine remains in text mode, but at the time when X windows switches to graphics mode, it switches out of framebuffer mode and the radeon driver loads the radeonkms driver. This all gets reported in /var/log/Xorg.0.log.

This works for this particular, older, integrated AMD APU chipset. If it didn't work on some other newer AMD Radeon chipset, I'd next try removing xf86-video-ati and install xf86-video-amdgpu in its place, then try again to restart graphics after rebooting.


----------



## unique name (Aug 17, 2021)

I installed freebsd 13 release amd64 and also xorg. after entering the command startx, i was getting framebuffer error. So i followed the following guide:
"


Install the drm-kmodpackage
$ sudo pkg install drm-kmod

Take note of the post-install package message from drm-_fbsd<version>_-kmod as it contains important information - specifically add this to your /etc/rc.conf or /etc/rc.conf.d/amd file:
kld_list="/boot/modules/amdgpu.ko"

Ensure that your UID is a member of the "video" group.
Restart your system; you should see the amdgpu.ko get loaded and a flash on your console as we switch over to the new display driver.
Start Xorg via your usual method (i.e. startx, GDM, etc.)"
And this 
"
It is important to note that there is currently a conflict with both AMD drivers and the EFI frame buffer.  The current workaround, when booting via UEFI on these systems, is to disable the frame buffer via /boot/loader.conf:

hw.syscons.disable=1"

Now after reboot, i am stuck at welcome to freebsd screen.


----------



## Alexander88207 (Aug 17, 2021)

unique name said:


> Now after reboot, i am stuck at welcome to freebsd screen.



That means that the kernel driver did not successfully load or didnt load at all. You only can try blind or via ssh removing hw.syscons.disable=1.


----------



## Vull (Aug 17, 2021)

Or boot from a USB installer and use the shell from there to remove `hw.syscons.disable=1`.


----------



## Tieks (Aug 17, 2021)

unique name said:


> i am stuck at welcome to freebsd screen.


You don't say whether you use ZFS or UFS. In case of UFS, use your install medium to boot and when bsdinstall shows up, choose 'Live CD'. Login as root without password. Then mount your root partition with something like `mount -t ufs /dev/ada0p2 /mnt`. Use ee or vi to edit your (then) /mnt/boot/loader.conf. Please not that errors in /etc/fstab and /etc/rc.conf may lead to boot problems too.


----------



## eternal_noob (Aug 17, 2021)

What's your graphics card anyway?


----------



## SirDice (Aug 17, 2021)

unique name Don't post the same questions in multiple threads. Posts split off and threads merged (post order might be a little wonky now).


----------



## unique name (Aug 17, 2021)

eternal_noob said:


> What's your graphics card anyway?


Rx580 and i am using zfs. Fixed the issue but still having problem with startx.


----------



## astyle (Aug 17, 2021)

unique name said:


> hw.syscons.disable=1"


No need for that on FreeBSD 13-RELEASE.  I had to do that on earlier versions for my Asus Radeon RX 550 4GB. Comment out that line in /boot/loader.conf. ZFS or UFS don't really matter when dealing with a GPU driver. I worked with both, so I would know.

eternal_noob : OP's GPU is RX 580, an AMD card (too new to be ATI).

Now, there was a fantastic post on these forums from 2017 that just disappeared, so I only have my own notes from February 2020 to go by. And that saved me more than a few times, and yes, it's related to proper booting when I mess up loading the GPU driver (and my filesystem is in fact ZFS. For UFS, it's different)


Boot install stick. Start the shell, not the installer. In that shell, issue the following commands:
`# zpool list` Show your datasets
`# gpart show` Find the slice called freebsd-zfs, you'll need it later.
`# mkdir /tmp/mydata` temporary mountpoint for your filesystem
`# zpool import -fa -R /tmp/mydata`
`# zpool mount zroot/ROOT/default` From step 1, hopefully it's actually 'zroot'.
`# cd /tmp/mydata/boot` Steps 5 and 6, recognize anything?
`# vi loader.conf` Edit your loader.conf. Yes, you're stuck using vi, but that's unix for you.
This was my post number 666! Mua, haa, haa!


----------



## eternal_noob (Aug 17, 2021)

astyle said:


> _*eternal_noob*_ : OP's GPU is RX 580, an AMD card (too new to be ATI).


Yeah, i figured it out after SirDice merged all his scattered posts from several threads.
The time i posted, there only was #9.


----------



## Alexander88207 (Aug 17, 2021)

astyle said:


> No need for that on FreeBSD 13-RELEASE.  I had to do that on earlier versions for my Asus Radeon RX 550 4GB. Comment out that line in /boot/loader.conf. ZFS or UFS don't really matter when dealing with a GPU driver. I worked with both, so I would know.



Thanks for the reminder.

I have tried it out and it works!

Here is the confirmation: https://github.com/freebsd/drm-kmod/pull/61


----------



## unique name (Aug 18, 2021)

astyle said:


> No need for that on FreeBSD 13-RELEASE.  I had to do that on earlier versions for my Asus Radeon RX 550 4GB. Comment out that line in /boot/loader.conf. ZFS or UFS don't really matter when dealing with a GPU driver. I worked with both, so I would know.
> 
> eternal_noob : OP's GPU is RX 580, an AMD card (too new to be ATI).
> 
> ...


Thank you but as i said above, i have already fixed this issue. The only problem i have is when i do startx, i get framebuffer busid error. I have downloaded the dmk pkg.


----------



## SirDice (Aug 18, 2021)

Run `cat /var/log/Xorg.0.log | nc termbin.com 9999` and post the URL here.


----------



## unique name (Aug 18, 2021)

SirDice said:


> Run `cat /var/log/Xorg.0.log | nc termbin.com 9999` and post the URL here.





			Https://termbin.com/a54s


----------



## SirDice (Aug 18, 2021)

```
[    60.574] (II) LoadModule: "ati"
[    60.574] (WW) Warning, couldn't open module ati
[    60.574] (EE) Failed to load module "ati" (module does not exist, 0)
```
Remove any configuration you've done for Xorg.


----------



## unique name (Aug 18, 2021)

SirDice said:


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


i have done just this
"your /etc/rc.conf or /etc/rc.conf.d/amd file:

kld_list="/boot/modules/amdgpu.ko"
But this is not xorg config right?


----------



## SirDice (Aug 18, 2021)

unique name said:


> But this is not xorg config right?


No, that just tells the system to load a kernel module. Xorg configuration is done in /usr/local/etc/X11/xorg.conf and/or /usr/local/etc/X11/xorg.conf.d/*.


----------



## unique name (Aug 18, 2021)

SirDice said:


> No, that just tells the system to load a kernel module. Xorg configuration is done in /usr/local/etc/X11/xorg.conf and/or /usr/local/etc/X11/xorg.conf.d/*.


There is no xorg.conf file and nothing in xorg.conf.d


----------



## SirDice (Aug 18, 2021)

Just to make sure: `rm -rf /etc/X11/* /usr/local/etc/X11/xorg.conf.d/* /usr/local/etc/X11/xorg.conf`.

And please post the output from `kldstat`.


----------



## unique name (Aug 18, 2021)

SirDice said:


> Just to make sure: `rm -rf /etc/X11/* /usr/local/etc/X11/xorg.conf.d/* /usr/local/etc/X11/xorg.conf`.
> 
> And please post the output from `kldstat`.


----------



## SirDice (Aug 18, 2021)

Please don't post pictures of text, just copy/paste the information. Looking at the output, the amdgpu kernel module isn't loaded. What does `sysrc kld_list` output?


----------



## unique name (Aug 18, 2021)

SirDice said:


> Please don't post pictures of text, just copy/paste the information. Looking at the output, the amdgpu kernel module isn't loaded. What does `sysrc kld_list` output?


Sysrc: unknown variable 'kld_list'
I am sorry for the picture.


----------



## SirDice (Aug 18, 2021)

unique name said:


> "your /etc/rc.conf or /etc/rc.conf.d/amd file:


Remove that /etc/rc.conf.d/amd file. And enter `sysrc kld_list="amdgpu"`. Then reboot. After the reboot verify with `kldstat` if the kernel module is correctly loaded.

I'm completely lost when it comes to ATI/AMD videocard identification though. I'm not entirely sure if that amdgpu is the correct one for your RX580 videocard.


----------



## unique name (Aug 18, 2021)

SirDice said:


> Remove that /etc/rc.conf.d/amd file. And enter `sysrc kld_list="amdgpu"`. Then reboot. After the reboot verify with `kldstat` if the kernel module is correctly loaded.
> 
> I'm completely lost when it comes to ATI/AMD videocard identification though. I'm not entirely sure if that amdgpu is the correct one for your RX580 videocard.


Thanks a lot kind Sir!!!
It worked!
Btw what is kld? Kernel load? Kernel daemon?
And shutdown -r now and reboot are same right? Instead of waiting for 15 sec with reboot command i can use shutdown -r now right?


----------



## SirDice (Aug 18, 2021)

unique name said:


> Btw what is kld? Kernel load? Kernel daemon?


kldstat(8), kldload(8), kldunload(8). The /etc/rc.d/kld boot script makes it easy to load kernel modules from kld_list during boot. 



unique name said:


> And shutdown -r now and reboot are same right?


Not exactly. They'll both restart the machine that's correct. But a `shutdown -r now` will gracefully stop all services before restarting whereas `reboot` will _kill_ processes before rebooting. You should always use `shutdown -r now` so services are correctly shutdown before the reboot.


----------



## astyle (Aug 18, 2021)

SirDice said:


> I'm not entirely sure if that amdgpu is the correct one for your RX580 videocard


It is the correct one.  I have an Asus Radeon RX 550 4 GB (works problem-free under FreeBSD 13-RELEASE) and RX 580 is a bit newer.


----------

