# Can't run xorg on ryzen 3 , vega 3 laptop....



## christhegeek (May 20, 2020)

Can't run xorg on ryzen 3 , vega 3 laptop....
I tried with disabling syscons parameter and it worked I managed to start it 2-3 times while pressing some buttons...but never again.
Xorg doesn't start if I don't disable syscons because of efi and amd gpu.
When I disable syscons then I got some framebuffer details and it freezes there , can't switch terminal can't do anything.
Is there a way I can fix that ?


----------



## tuxador (May 20, 2020)

1- install drm-kmod
2- put ' kld_list="amdgpu" ' to your /etc/rc.conf 
3- reboot


----------



## christhegeek (May 21, 2020)

I wish it would work only by doing that !
It doesn't even runs that way
I have to disable syscons to make xorg run
I made it run but after 2-3 times it freezes in framebuffer details and never start, I don't know maybe its the sddm I installed next with slim it booted I don't know if it is that.




tuxador said:


> 1- install drm-kmod
> 2- put ' kld_list="amdgpu" ' to your /etc/rc.conf
> 3- reboot


----------



## tuxador (May 21, 2020)

Can you share your xorg.conf file ?


----------



## christhegeek (May 21, 2020)

It doesn't switch to any terminal it doesn't do anything it stucked ! 
I can't see or modify anything it stucked completely !




tuxador said:


> Can you share your xorg.conf file ?


----------



## tuxador (May 21, 2020)

hit CTRL+ALT+F2 to access another teminal.
if not possible reboot freebsd on single user mode.


----------



## christhegeek (May 22, 2020)

I have already tried to boot freebsd in single user mode ctrl+alt+f2,3,4 doesn't work at all
but when i press the power button it shutdown .
Can you tell me what is the equivalent of linux amdgpu.dc=0 or 1   for freebsd ?  maybe something has to do with it ?
When i have not disabled syscons it doesn't start xorg but i have terminal , after i disable syscons it stucks no terminals nothing !
It stucks after the efi framebuffer information.
If you find a solution i'm making freebsd my daily driver , i want to switch from linux but i don't have to use linux on my laptop and  freebsd on my desktop either go with freebsd and works on my devices or stay with linux. 
I'm a linux user since 1999.



tuxador said:


> hit CTRL+ALT+F2 to access another teminal.
> if not possible reboot freebsd on single user mode.


----------



## memreflect (May 22, 2020)

christhegeek said:


> I have already tried to boot freebsd in single user mode ctrl+alt+f2,3,4 doesn't work at all


In single-user mode, there are no other virtual TTYs, so the hotkeys for switching won't work.  Once you're in multi-user mode, you can use Ctrl+Alt+F2,3,4 to switch to a different virtual TTY.



christhegeek said:


> tuxador said:
> 
> 
> > 1- install drm-kmod
> ...


Not sure whether you mean Xorg or syscons/vt when you say "it" doesn't run.  However, does it work if you list the path explicitly?  The GENERIC kernel for 12.x and earlier is built with DRM modules included by default, so you are probably loading /boot/kernel/amdgpu.ko when you want to load /boot/modules/amdgpu.ko from drm-kmod instead.  You may also need to load /boot/modules/drm.ko before that since /boot/kernel/drm.ko may be causing trouble as well:

```
kld_list="/boot/modules/drm.ko /boot/modules/amdgpu.ko"
```



christhegeek said:


> I have to disable syscons to make xorg run


When you say "syscons", you are referring to `hw.syscons.disable=1` in /boot/loader.conf, right?  I ask because syscons(4) is the old TTY driver and newer systems should be using vt(4) (i.e. `kern.vty=vt` in loader.conf; this should be used by default without you needing to set it explicitly).

This post may be helpful for your Vega 3 (start reading the code section at the line containing `## Graphics driver amdgpu`).  I'm sure you can use pkg(8) instead of building from source using `make install clean`.

If none of this info helps you to get Xorg working, it would also be helpful to see the relevant parts of your /var/log/Xorg.0.log dealing with video.


----------



## sidetone (May 23, 2020)

Last year, someone said either Ryzen 3 or 3,000 series didn't work yet.


----------



## christhegeek (May 23, 2020)

Yes i know in single mode there are no terminals, but in multiuser mode i can't switch to a terminal either !
no switching to a terminal means i can't configure any configuration files.
Yes im disabling syscons  with hw.syscons.disable=1  i tried that and booted one or two times then nothing .
Something has to do with efi framebuffer and amdgpu
---I haven't tried to load /boot/modules/drm.ko  i will try it.
I have another idea if i use radeon would be more compatible ???
Also what if i don't have the syscons disable parameter ?  can i have xorg in that way and how?
When i have not set syscons disable  i have terminal and it works normally but when i try to start xorg it doesn't start and show some error messages including something like i need to put some address for framebuffer .
---How i can install freebsd without efi ??  what kind of partition i can use instead of efi partition ??  for example on linux i can use an ext2,ext4 partition and mount it on /boot

----The most strange thing is that in one installation i managed to start slim and openbox at least two times , i will try with freebsd 13 and devel driver maybe i have some better luck ?
---The positives are that wifi sound works out of the box and touchpad works fine with iichid build from source.


----------



## christhegeek (May 23, 2020)

Last year i don't my rx580 would even work normally 
Yes vega has problems if i had no efi i would have no problems at all, i wish my laptop could boot from non efi partitions...maybe it can but i don't know how to install freebsd with no efi !
I mean what type of partition i have to make instead of efi ??   is there freebsd-boot or something ?



sidetone said:



			Last year, someone said either Ryzen 3 or 3,000 series didn't work yet.
		
Click to expand...


" href="/index.php?threads/


sidetone said:


> Last year, someone said either Ryzen 3 or 3,000 series didn't work yet.



/">Thread 


sidetone said:


> Last year, someone said either Ryzen 3 or 3,000 series didn't work yet.


----------



## christhegeek (May 29, 2020)

I found a post in this forum that says that i need to find a device address with pciconf -lv  and enter the address in the file _/usr/local/share/pciids/pci.ids        
....to be able to run xorg without disabling syscons !!  
I i don't have syscons disabled i can't run Xorg , it gives me a message that it needs  to input some framebuffer addresses !  
If i have hw.sysons.disable=1 then xorg stuck on EFI Framework Information...... i succeed sometimes to boot it but then i was not able to boot anymore it has problems disabling syscons also i have no access to a terminal .
----Can anyone help me how and what addresses this file needs for my graphics card ?????????  * 
Is anyone here that knows how to install it on my ryzen3 vega3 laptop touchpad,sound,wifi works fine  but i have this problem only . 
I don't see much support to be sincere every problem i had i solved myself.*_


----------



## christhegeek (May 30, 2020)

*I found a post in this forum that says that i need to find a device address with pciconf -lv  and enter the address in the file /usr/local/share/pciids/pci.ids        *
_* ....to be able to run xorg without disabling syscons !!  
I i don't have syscons disabled i can't run Xorg , it gives me a message that it needs to input some framebuffer addresses ! 
If i have hw.sysons.disable=1 then xorg stuck on EFI Framework Information...... i succeed sometimes to boot it but then i was not able to boot anymore it has problems disabling syscons also i have no access to a terminal .
----Can anyone help me how and what addresses this file needs for my graphics card ????????? ** 
*_






memreflect said:


> In single-user mode, there are no other virtual TTYs, so the hotkeys for switching won't work.  Once you're in multi-user mode, you can use Ctrl+Alt+F2,3,4 to switch to a different virtual TTY.
> 
> 
> Not sure whether you mean Xorg or syscons/vt when you say "it" doesn't run.  However, does it work if you list the path explicitly?  The GENERIC kernel for 12.x and earlier is built with DRM modules included by default, so you are probably loading /boot/kernel/amdgpu.ko when you want to load /boot/modules/amdgpu.ko from drm-kmod instead.  You may also need to load /boot/modules/drm.ko before that since /boot/kernel/drm.ko may be causing trouble as well:
> ...


----------



## acheron (Jun 1, 2020)

Someone managed to have video on laptop with similar spec (on 13-current): https://wiki.freebsd.org/Laptops/Motile_M141


----------



## christhegeek (Jun 1, 2020)

I will give it another try (i tried so many times already)  i don't know why he succeed but i can't !
I wonder what would be if i haven't used efi partition and created a freebsd-boot partition would be able to boot or not ?
I'm afraid it won't work , this is so bad when you fail and i have invested much time learning freebsd i want to make a change i'm using linux since 1999
I don't care about games if i can run some pixelated games from wine steam or linux version of steam i would be more than satisfied.
I had it running on my previous laptop and with very good performance also on my pc it performs pretty well !



acheron said:


> Someone managed to have video on laptop with similar spec (on 13-current): https://wiki.freebsd.org/Laptops/Motile_M141


----------



## acheron (Jun 1, 2020)

You can try to ask himhttps://wiki.freebsd.org/AndriyGapon


----------



## christhegeek (Jun 1, 2020)

It worked !

LOL
Maybe it helped that i made a xorg -configure ?? i'm not sure ! 
But it worked fine !
The only that is painful with FreeBSD is the package download speed ! They download slowly and i have a 50MBPS internet connection , i even switched to europe but that didn't helped much
It could be faster



acheron said:


> Someone managed to have video on laptop with similar spec (on 13-current): https://wiki.freebsd.org/Laptops/Motile_M141


----------



## christhegeek (Sep 22, 2020)

I finally succeed with the latest freebsd 13 ,  i found the solution by my own


----------



## ruffianeo (Jun 8, 2021)

Just about a year ago (Summer 2020), my old computer broke and I had to replace mainboard and some other stuff. I ended up with an AMD 3200G and decided for FreeBSD as my new main OS (I had prior used it only in virtualbox but liked it). Since this is my only machine at home, I went to a friend, downloaded a minimal FreeBSD (12.x or 13 - don't remember) on a USB stick and went home. But it would not even boot without crashing. Given the USB stick was all I had and no internet access or anything else... I mounted my bicycle once again and this time put a debian buster on my USB stick. I did not want Linux but I needed *something*... Buster at least managed to boot and get a system in text only mode installed. And with internet connection working, then I could (in 2 days work) upgrade it to bullseye, where finally also xwayland/gnome started to work with the on chip graphics of my new CPU.
Why do I tell this story here? Because all the advice I found in previous posts assumed, that you get into an at least minimal operable state, where you can tweak config files etc. 
And I think, even if one can manage to get it to work with tweaking, it is not good enough and people like me who have to cold-install and fail, it is an unsurmountable obstacle.


----------



## christhegeek (Jun 9, 2021)

I begin with FreeBSD about at the 2019 more seriously at 2020 , right now its perfect and rock stable it wasn't like that when i started !


ruffianeo said:


> Just about a year ago (Summer 2020), my old computer broke and I had to replace mainboard and some other stuff. I ended up with an AMD 3200G and decided for FreeBSD as my new main OS (I had prior used it only in virtualbox but liked it). Since this is my only machine at home, I went to a friend, downloaded a minimal FreeBSD (12.x or 13 - don't remember) on a USB stick and went home. But it would not even boot without crashing. Given the USB stick was all I had and no internet access or anything else... I mounted my bicycle once again and this time put a debian buster on my USB stick. I did not want Linux but I needed *something*... Buster at least managed to boot and get a system in text only mode installed. And with internet connection working, then I could (in 2 days work) upgrade it to bullseye, where finally also xwayland/gnome started to work with the on chip graphics of my new CPU.
> Why do I tell this story here? Because all the advice I found in previous posts assumed, that you get into an at least minimal operable state, where you can tweak config files etc.
> And I think, even if one can manage to get it to work with tweaking, it is not good enough and people like me who have to cold-install and fail, it is an unsurmountable obstacle.


----------



## Sivan! (Apr 18, 2022)

memreflect said:


> ```
> kld_list="/boot/modules/drm.ko /boot/modules/amdgpu.ko"
> ```



ln a desktop with AMD ryzen 3200G with built in radeon Vega8 graphics I experienced this problem, was redirected here, applied the as given by memreflect console and xfce works now.  Thank you.


----------



## Sivan! (Apr 18, 2022)

Some errors after fixing the startx error, related to the kld_list code

XFCE requires root privileges,  Chromium requires to be started as a user, if I logout I get back to the console from where Chromium can't be launched, launched it as root from the terminal with a --no-sandbox flag which gave the following warning:



> # chrome --no-sandbox
> amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
> If they do, bad things may happen!


----------



## grahamperrin@ (Apr 18, 2022)

"same file descriptor" warning on amdgpu · Issue #21 · freebsd/drm-kmod
					

Not sure if this is a bug or enhancement, but we do get this warning from time-to-time with the amdgpu (for example when running X or vdpauinfo with a NAVI10 card. amdgpu: os_same_file_description ...




					github.com
				






Sivasubramanian M said:


> related to the kld_list code



NB <https://forums.freebsd.org/posts/563973>


----------



## larshenrikoern (Apr 18, 2022)

Hi again

Simple things first. Is your user a member of the "wheel" and/or the "video" group ?? If not the user cannot run X


----------



## Alexander88207 (Apr 18, 2022)

Sivasubramanian M said:


> XFCE requires root privileges



That sounds like that your $USER is not in the video group.


----------



## Alexander88207 (Apr 18, 2022)

Sivasubramanian M said:


> "/boot/modules/drm.ko"



This entry is unnecessary because its enough only to specify the needed drm module (i915kms,amdgpu etc.

drm.ko gets already loaded automatically then.


----------



## grahamperrin@ (Apr 18, 2022)

From the parallel topic: "startx brings up xfce". 



larshenrikoern said:


> "wheel" and/or the "video" group ?? If not the user cannot run X



IIRC those are requirements for other things, not for X.


----------



## bakul (Apr 18, 2022)

FWIW, I have a Motile M142 laptop (Ryzen 3500U). In rc.conf I have `kld_list="ig4 iichid amdgpu amdsmb amdtemp linux64 linux"`.

In /boot/loader.conf I have `efi_max_resolution="1080p"`

In /etc/src.conf I have `PORTS_MODULES+=graphics/gpu-firmware-kmod`

After a bunch of trouble I ended up keeping a local copy of `https://github.com/freebsd/drm-kmod` in `/usr/local/sys/modules/drm-kmod` and manually keep it in sync the version in drm-devel-kmod by doing `git pull; git checkout $GH_TAGNAME`, where GH_TAGNAME comes from the drm-devel-kmod `Makefile`. I do this whenever I update the port locally. All this elaborate set up to make sure that whenever I rebuild the kernel, the amdgpu module automatically gets rebuilt and copied to `/boot/kernel/amdgpu.ko` when I do installkernel, so that it stays in sync with the kernel + it gives me the option of going back to an older working version in case of trouble.
 The iichid module is needed for the touchpad. In /`usr/local/etc/X11/xorg.conf.d/touchpad.conf` I have
`Section "InputClass"
    Identifier "touchpad"
    MatchIsTouchpad "on"
    Driver "libinput"
    Option "Tapping" "on"
EndSection`

This is about where I ran out of motivation as I actually don't directly use this laptop all that much as it my gateway machine (to avoid having a UPS for it)! I did make sound and video work on it as well. Its touchpad is terrible but for $300 I can't complain as I can also run VMs and jails on it.


----------



## grahamperrin@ (Apr 19, 2022)

bakul said:


> … In /etc/src.conf I have `PORTS_MODULES+=graphics/gpu-firmware-kmod` …



Here: 


```
% grep -v \# /etc/src.conf | sort

KERNCONF=GENERIC-NODEBUG
PORTS_MODULES= emulators/virtualbox-ose-kmod graphics/drm-devel-kmod graphics/gpu-firmware-kmod
WITH_CCACHE_BUILD=yes
WITH_MALLOC_PRODUCTION=yes
%
```

– and I have a routine that includes this, immediately before any build of world and kernel: 

`git -C /usr/ports pull --ff-only && git -C /usr/src pull --ff-only`


----------



## larshenrikoern (Apr 19, 2022)

grahamperrin said:


> From the parallel topic: "startx brings up xfce".
> 
> 
> 
> IIRC those are requirements for other things, not for X.


It is from the Handbook https://docs.freebsd.org/en/books/handbook/x11/


----------



## grahamperrin@ (Apr 19, 2022)

That's for things such as 3D acceleration on video cards. I'm fairly sure that acceleration of this type is not a requirement to (simply) start X.


----------



## Sivan! (Apr 19, 2022)

BSD boots to a login prompt.  When I log in as user, console loads.  No privileges to start xfce
Then I login as root, xfce starts. Chromium doesn't work for root except with a --no-sandbox flag.  As a result neither the user nor the root have privileges for both xfce and chromium, which needs xfce.  

`pw showgroup

wheel:*:0:root,myusername
video:*:44:myuserusername`


----------



## Sivan! (Apr 20, 2022)

Alexander88207 said:


> That sounds like that your $USER is not in the video group.


Yes.  Added user to the video and wheel groups, but it did not work.  I might have skipped some steps while installing xfce. Read a howto article, pkg installed slim, edited /etc/rc.conf to enable mouse, slim, hald and dbus, edited xinitrc to add `exec xfce4-session`

and also

`echo 'exec startxfce4' > /home/myusername/.xinitrc
nano /usr/local/etc/slim.conf
# in file slim.conf #
current_theme   fsbd`

After init 6  I could login via xfce as user.

Thank you.


----------



## grahamperrin@ (Apr 21, 2022)

Sivasubramanian M said:


> hald



Please remove it from your configuration. 



Sivasubramanian M said:


> a howto article,



(More than five years old.)


----------



## Sivan! (Apr 23, 2022)

grahamperrin said:


> Please remove it from your configuration.


Please tell me what is it that I need to remove from my configuration? The line `current_theme   fsbd`  or the entire slim.conf file or something else?  As of now it works fine, but if there is something that you noticed as wrong in the 5 year old howto article that I followed, I will do so immediately.

Thank you.


----------



## grahamperrin@ (Apr 23, 2022)

You edited /etc/rc.conf to include a HAL-related line. That one line can/should be removed.


----------



## Sivan! (Apr 23, 2022)

grahamperrin said:


> You edited /etc/rc.conf to include a HAL-related line. That one line can/should be removed.



Thank you. Removed that line, not rebooting immediately -  waiting for my terminal to finish `portmaster -a` that is running for the past 5 hours (BSD installed in under 30 minutes but this ports tree fix is taking so long). The command to update the ports tree appears to be compiling every software in the Ports tree.  Looks like the O/S in my computer is going to be one with a 100+ GB footprint. 

(After reboot I checked. The total space used is less than 5GB)


----------

