Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2019 21:10:16 +0100
From:      Phil Norman <philnorm@gmail.com>
To:        Pete Wright <pete@nomadlogic.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: X11 on Ryzen 2400G?
Message-ID:  <CAOa8eG597WK3Nc5CDo67oN2CErbbmdDM2hEmbsvq5_XzDoV23Q@mail.gmail.com>
In-Reply-To: <844971e0-1def-ce56-4c9c-369f3b0c6f3b@nomadlogic.org>
References:  <CAOa8eG4xX-mujmm=eTqNHFndpsL35hG6c=y=JW3808BB6a5X_A@mail.gmail.com> <844971e0-1def-ce56-4c9c-369f3b0c6f3b@nomadlogic.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi.

First of all, thanks for the detailed instructions. Response inline.

On Wed, 30 Jan 2019 at 20:07, Pete Wright <pete@nomadlogic.org> wrote:

>
>
> On 1/30/19 9:57 AM, Phil Norman wrote:
> > Hi.
> >
> > I recently got a Ryzen 2400G, which has on-board AMD Vega 11 graphics. I
> > can get a console to display via the motherboard's on-board HDMI, but
> > haven't been able to get Xorg working yet. I'm trying the 'amdgpu'
> driver,
> > and am using an xorg.conf file generated with 'Xorg -configure' (albeit
> > hand-tweaked to get rid of the nonexistent second screen it added, and
> fix
> > a few more things).
> >
> > My understanding is that the driver is likely borrowed from linux, and
> > (from http://forum.mxlinux.org/viewtopic.php?t=46887) Vega support only
> > started working with linux kernel 1.19. The /var/log/Xorg.0.log file says
> > that the amdgpu module was 'compiled for 1.18.4, module version =
> 18.1.0'.
> > Does the 1.18.4 refer to a linux kernel version? If so, what's my best
> > solution here? Should I just wait until the FreeBSD drivers are updated?
> Is
> > there anything I can do in the meantime?
>
> I believe there may be some previous success running Vega graphics on
> FreeBSD.  Couple things to note:
>
> - If possible run 12.0-RELEASE
>

Already doing that. I also did a 'pkg update ; pkg upgrade' to make sure
everything's shiny. I'm not using any self-built modules.
$ uname -a
FreeBSD bob 12.0-STABLE FreeBSD 12.0-STABLE r343112 GENERIC  amd64



> - install the drm-kmod package, then closely follow the instructions
> printed on your console.  This wiki section should offer some help:
> https://wiki.freebsd.org/Graphics#AMD_Graphics


Instructions followed.


> -- pay special attention to the update the /boot/loader.conf
>

Are you referring to the need to set 'hw.sysconf.disable=1', or is there
something else I'm missing? I didn't see anything else on the wiki page,
except for some debugging options (which I guess I'm going to end up using
soon).


>
> - after you have configured the amdgpu.ko to load on boot verify it is
> able to load the kernel module and your console display looks good.  if
> you have issues loading the kernel module let us know, there are some
> things you can try to setup to get a useful backtrace that will help us
> debug this.
>

This is where I get to. I've removed amdgpu from /etc/rc.conf, so I don't
have to boot single-user mode; when I run kldload amdgpu, the following
happens:

1: the 'kldload amdgpu' process doesn't return immediately, yet the
terminal is responsive; I can hit return, and have the cursor move. The
mouse pointer also moves.
2: something around 5s later, the screen turns off, the keyboard goes
unresponsive (caps lock light doesn't toggle), and the machine no longer
responds to pings.

I see nothing in /var/crash/. /var/log/messages has a bunch of text:

Jan 30 16:52:50 bob kernel: [drm] amdgpu kernel modesetting enabled.
Jan 30 16:52:50 bob kernel: drmn0: <drmn> on vgapci0
Jan 30 16:52:50 bob kernel: vgapci0: child drmn0 requested pci_enable_io
Jan 30 16:52:50 bob syslogd: last message repeated 1 times
Jan 30 16:52:50 bob kernel: [drm] initializing kernel modesetting (RAVEN
0x1002:0x15DD 0x1002:0x15DD 0xC6).
Jan 30 16:52:50 bob kernel: [drm] register mmio base: 0xFE500000
Jan 30 16:52:50 bob kernel: [drm] register mmio size: 524288
Jan 30 16:52:50 bob kernel: [drm] PCI I/O BAR is not found.
Jan 30 16:52:51 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_gpu_info.bin
Jan 30 16:52:51 bob kernel: [drm] probing gen 2 caps for device 1022:15db =
700d03/e
Jan 30 16:52:51 bob kernel: [drm] probing mlw for device 1002:15dd = 400d03
Jan 30 16:52:51 bob kernel: [drm] VCN decode is enabled in VM mode
Jan 30 16:52:51 bob kernel: [drm] VCN encode is enabled in VM mode
Jan 30 16:52:51 bob kernel: pci_is_thunderbolt_attached not implemented --
see your local kernel hacker
Jan 30 16:52:51 bob kernel: [drm] BIOS signature incorrect 0 0
Jan 30 16:52:51 bob kernel: ATOM BIOS: 113-RAVEN-110
Jan 30 16:52:51 bob kernel: [drm] vm size is 262144 GB, 4 levels, block
size is 9-bit, fragment size is 9-bit
Jan 30 16:52:51 bob kernel: drmn0: VRAM: 2048M 0x000000F400000000 -
0x000000F47FFFFFFF (2048M used)
Jan 30 16:52:51 bob kernel: drmn0: GTT: 1024M 0x000000F500000000 -
0x000000F53FFFFFFF
Jan 30 16:52:51 bob kernel: Successfully added WC MTRR for
[0xe0000000-0xefffffff]: 0;
Jan 30 16:52:51 bob kernel: [drm] Detected VRAM RAM=2048M, BAR=256M
Jan 30 16:52:51 bob kernel: [drm] RAM width 64bits UNKNOWN
Jan 30 16:52:51 bob kernel: [TTM] Zone  kernel: Available graphics memory:
7270680 kiB
Jan 30 16:52:51 bob kernel: [TTM] Zone   dma32: Available graphics memory:
2097152 kiB
Jan 30 16:52:51 bob kernel: [TTM] Initializing pool allocator
Jan 30 16:52:51 bob kernel: [drm] amdgpu: 2048M of VRAM memory ready
Jan 30 16:52:51 bob kernel: [drm] amdgpu: 3072M of GTT memory ready.
Jan 30 16:52:51 bob kernel: i_size_write unimplemented
Jan 30 16:52:51 bob kernel: [drm] GART: num cpu pages 262144, num gpu pages
262144
Jan 30 16:52:51 bob kernel: [drm] PCIE GART of 1024M enabled (table at
0x000000F400800000).
Jan 30 16:52:51 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_asd.bin
Jan 30 16:52:52 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_pfp.bin
Jan 30 16:52:52 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_me.bin
Jan 30 16:52:53 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_ce.bin
Jan 30 16:52:53 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_rlc.bin
Jan 30 16:52:54 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_mec.bin
Jan 30 16:52:54 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_mec2.bin
Jan 30 16:52:54 bob kernel: sched_setscheduler not implemented -- see your
local kernel hacker
Jan 30 16:52:54 bob kernel: i_size_write unimplemented
Jan 30 16:52:54 bob syslogd: last message repeated 9 times
Jan 30 16:52:55 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_sdma.bin
Jan 30 16:52:55 bob kernel: [drm] use_doorbell being set to: [true]
Jan 30 16:52:55 bob kernel: i_size_write unimplemented
Jan 30 16:52:55 bob kernel: drmn0: successfully loaded firmware image with
name: amdgpu/raven_vcn.bin
Jan 30 16:52:55 bob kernel: [drm] Found VCN firmware Version: 1.73 Family
ID: 18
Jan 30 16:52:55 bob kernel: i_size_write unimplemented
Jan 30 16:57:15 bob syslogd: kernel boot file is /boot/kernel/kernel   <<<
after a power cycle.


On occasion, this is the last thing in /var/log/messages:

Jan 30 16:42:34 bob kernel: [drm] Display Core initialized with v3.1.27!
Jan 30 16:42:34 bob kernel: [drm] Connector DP-1: get mode from tunables:
Jan 30 16:42:34 bob kernel: [drm]   - kern.vt.fb.modes.DP-1
Jan 30 16:42:34 bob kernel: [drm]   - kern.vt.fb.default_mode
Jan 30 16:42:34 bob kernel: [drm] Connector HDMI-A-1: get mode from
tunables:
Jan 30 16:42:34 bob kernel: [drm]   - kern.vt.fb.modes.HDMI-A-1
Jan 30 16:42:34 bob kernel: [drm]   - kern.vt.fb.default_mode

I suspect /var/log/messages is not being flushed.

[snip]

Thanks,
Phil



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOa8eG597WK3Nc5CDo67oN2CErbbmdDM2hEmbsvq5_XzDoV23Q>