Announcement

Collapse
No announcement yet.

Getting AMDGPU to work on Ryzen 5 2400G + B350

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting AMDGPU to work on Ryzen 5 2400G + B350

    Hi everyone,

    For about a month I have been trying to get my workstation to boot with amdgpu without success. I am on Fedora 27/28. I am a bit desperate by now.

    With amdgpu, the boot keeps hanging or boots with a corrupted display. So far I have been able to boot only with nomodeset. I tried several 4.15+ kernels without any success (up to 4.15.10). After learning 4.16 has more complete support, I upgraded to Fedora 28 beta release, but that hasn't helped either. Then I tried booting with amdgpu.dc=1, the only improvement was the screen corruption was reduced but was still unusable (it went from 1/4 of the screen to 1/2 of the screen being rendered correctly). The mouse pointer movement also seems sluggish.

    I have filed a Fedora bug report (bug #1548961), but I'm unable to add any useful information other than my hardware configuration, and screenshots.

    Hardware: Ryzen 5 2400G + Gigabyte AB350M Gaming 3
    Distro: Fedora 28 (beta)
    Kernels: 4.16.0-0.rc5.git0.2.fc28.x86_64, 4.16.0-0.rc4.git0.1.fc28.x86_64

    If someone could suggest something, that would really great.

  • #2
    Make sure the following are set in the .config for your kernel:
    CONFIG_DRM_AMD_DC=y
    CONFIG_DRM_AMD_DC_DCN1_0=y

    You can also try our latest staging kernel:

    Comment


    • #3
      I hope that you dont mind that I am "hijacking" this thread but the OP is in a very similiar situation, maybe this can help him too.

      I am in the same situation, apart that I am using Debian 9. B350 chipset on an Asus b350-prime board and a ryzen 3 2200G.
      I am even unsure if I am picking the proper kernel source from ~agd5f/linux by using:
      git clone -b amd-staging-drm-next git://people.freedesktop.org/~agd5f/linux
      uanme states it is 4.16.0-rc1-custom

      During boot, I get bunch of error messages regarding ACPI failures and the CPU getting into rcu_shed self-detected stall followed up by:
      Fatal error during GPU init
      Failed to load gpu_info firmware "amdgpu/raven_gpu_info.bin" though it resides in /lib/firmware/amdgpu and set int the kernel menuconfig.

      Besides that I am using standard debian stable packages. It would be really helpful if someone could post a guide to make the new ryzens work with Debian, there is so much information out there very hard to cope with as a novice user.

      @debianxfce:
      Your distribution looks promising - is it usable like Debian stable - I mean does it use the debian mirrors for package updating ? I really consider giving it a try. But foremost, some howto would be really great.

      Comment


      • #4
        Originally posted by agd5f View Post
        Make sure the following are set in the .config for your kernel:
        CONFIG_DRM_AMD_DC=y
        CONFIG_DRM_AMD_DC_DCN1_0=y

        You can also try our latest staging kernel:
        https://cgit.freedesktop.org/~agd5f/...aging-drm-next
        I'm actually using this kernel. Most DC/DCN related patches have improved the perceived stability of the system.

        I have a Ryzen 5 2400G + MSI B350 Tomahawk

        Comment


        • #5
          Originally posted by agd5f View Post
          Make sure the following are set in the .config for your kernel:
          CONFIG_DRM_AMD_DC=y
          CONFIG_DRM_AMD_DC_DCN1_0=y
          I don't know how I can confirm that from a running system, so I looked up the F28 kernel package source repo. They seem to have those set: CONFIG_DRM_AMD_DC, CONFIG_DRM_AMD_DC_DCN1_0.

          When I boot with amdgpu I can see DC is set to auto (thankfully I can get to a terminal despite the screen corruption):
          Code:
          # systool -v -m amdgpu | grep dc
              dc                  = "-1"
              dc_log              = "0"
          So I turned on logging for DC with amdgpu.dc_log=1. After doing so, I see tracebacks from amdgpu in my journal:
          Code:
          Mar 22 08:31:08 karna kernel: WARNING: CPU: 2 PID: 1064 at drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:607 dcn10_verify_allow_pstate_change_high+0x1c/0x20 [amdgpu]
          Mar 22 08:31:08 karna kernel: Modules linked in: ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_raw iptable_security ebtable_filter ebtables ip6table_filter ip6_tables sunrpc btrfs xor zstd_compress edac_mce_amd kvm_amd ccp wmi_bmof ppdev kvm snd_hda_codec_realtek irqbypass snd_hda_codec_generic snd_hda_codec_hdmi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec raid6_pq zstd_decompress snd_hda_core xxhash snd_hwdep joydev snd_seq snd_seq_device snd_pcm snd_timer snd soundcore sp5100_tco i2c_piix4 shpchp wmi parport_pc
          Mar 22 08:31:08 karna kernel:  parport video acpi_cpufreq amdgpu hid_logitech_hidpp chash i2c_algo_bit gpu_sched drm_kms_helper ttm crc32c_intel drm r8169 hid_logitech_dj mii uas usb_storage
          Mar 22 08:31:08 karna kernel: CPU: 2 PID: 1064 Comm: Xorg Tainted: G        W        4.16.0-0.rc6.git0.2.fc28.x86_64 #1
          Mar 22 08:31:08 karna kernel: Hardware name: Gigabyte Technology Co., Ltd. AB350M-Gaming 3/AB350M-Gaming 3-CF, BIOS F22b 02/13/2018
          Mar 22 08:31:08 karna kernel: RIP: 0010:dcn10_verify_allow_pstate_change_high+0x1c/0x20 [amdgpu]
          Mar 22 08:31:08 karna kernel: RSP: 0018:ffff9e1a02fa7748 EFLAGS: 00010246
          Mar 22 08:31:08 karna kernel: RAX: 0000000000000000 RBX: ffff919d435d8000 RCX: ffff9e1a02fa7338
          Mar 22 08:31:08 karna kernel: RDX: ffffffffc040bd91 RSI: 0000000000000004 RDI: ffff9e1a02fa7300
          Mar 22 08:31:08 karna kernel: RBP: ffff9e1a02fa7848 R08: 0000000000000007 R09: ffff9e1a02fa7250
          Mar 22 08:31:08 karna kernel: R10: 000000000000000f R11: ffff9e1a02fa735a R12: 0000000000000004
          Mar 22 08:31:08 karna kernel: R13: ffff919d27b551f0 R14: 0000000000000001 R15: ffff919d27b54000
          Mar 22 08:31:08 karna kernel: FS:  00007fed5777cac0(0000) GS:ffff919d5ec80000(0000) knlGS:0000000000000000
          Mar 22 08:31:08 karna kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
          Mar 22 08:31:08 karna kernel: CR2: 0000000002626028 CR3: 00000003ebcf0000 CR4: 00000000003406e0
          Mar 22 08:31:08 karna kernel: Call Trace:
          Mar 22 08:31:08 karna kernel:  dcn10_apply_ctx_for_surface+0x134b/0x13f0 [amdgpu]
          Mar 22 08:31:08 karna kernel:  ? hubbub1_verify_allow_pstate_change_high+0xc0/0x1c0 [amdgpu]
          Mar 22 08:31:08 karna kernel:  dc_commit_updates_for_stream+0x22a/0x530 [amdgpu]
          Mar 22 08:31:08 karna kernel:  dc_commit_planes_to_stream+0x367/0x420 [amdgpu]
          Mar 22 08:31:08 karna kernel:  amdgpu_dm_atomic_commit_tail+0x77d/0xd90 [amdgpu]
          Mar 22 08:31:08 karna kernel:  ? wait_for_completion_interruptible+0x35/0x1d0
          Mar 22 08:31:08 karna kernel:  commit_tail+0x3d/0x70 [drm_kms_helper]
          Mar 22 08:31:08 karna kernel:  drm_atomic_helper_commit+0x103/0x110 [drm_kms_helper]
          Mar 22 08:31:08 karna kernel:  drm_atomic_helper_disable_plane+0x90/0xc0 [drm_kms_helper]
          Mar 22 08:31:08 karna kernel:  __setplane_internal+0x214/0x290 [drm]
          Mar 22 08:31:08 karna kernel:  drm_mode_cursor_universal+0x1b7/0x1f0 [drm]
          Mar 22 08:31:08 karna kernel:  drm_mode_cursor_common+0x18b/0x200 [drm]
          Mar 22 08:31:08 karna kernel:  ? update_load_avg+0x75/0x520
          Mar 22 08:31:08 karna kernel:  ? drm_mode_setplane+0x240/0x240 [drm]
          Mar 22 08:31:08 karna kernel:  drm_mode_cursor_ioctl+0x4d/0x70 [drm]
          Mar 22 08:31:08 karna kernel:  drm_ioctl_kernel+0x5b/0xb0 [drm]
          Mar 22 08:31:08 karna kernel:  drm_ioctl+0x1c0/0x380 [drm]
          Mar 22 08:31:08 karna kernel:  ? drm_mode_setplane+0x240/0x240 [drm]
          Mar 22 08:31:08 karna kernel:  ? touch_atime+0xd6/0xe0
          Mar 22 08:31:08 karna kernel:  amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
          Mar 22 08:31:08 karna kernel:  do_vfs_ioctl+0xa4/0x610
          Mar 22 08:31:08 karna kernel:  SyS_ioctl+0x74/0x80
          Mar 22 08:31:08 karna kernel:  do_syscall_64+0x74/0x180
          Mar 22 08:31:08 karna kernel:  ? entry_SYSCALL_64_after_hwframe+0x3d/0xa2
          Mar 22 08:31:08 karna kernel: Code: 0e fc ff eb 88 e8 95 c2 d7 c5 0f 1f 44 00 00 0f 1f 44 00 00 48 8b 87 08 01 00 00 48 8b b8 b0 01 00 00 e8 28 e6 00 00 84 c0 75 02 <0f> 0b c3 90 0f 1f 44 00 00 41 56 49 89 f6 41 55 49 89 fd 41 54
          Mar 22 08:31:08 karna kernel: ---[ end trace bd5f5897972e49f6 ]---
          You can find the more detailed journal (with unrelated messages deleted) on pastebin. Please note, Fedora released a newer kernel (rc6) in the testing repo, I'm running this now.

          Originally posted by agd5f View Post
          You can also try our latest staging kernel:
          https://cgit.freedesktop.org/~agd5f/...aging-drm-next
          I have never compiled upstream kernels, it will require a bit of effort on my part to try this route.

          Comment


          • #6
            Originally posted by debianxfce View Post
            You can try my distribution: https://www.youtube.com/watch?v=fKJ-IatUfis
            Looks interesting . But I have been a Fedora user for almost 10 years, switching distros on my primary workstation would be too disruptive for me. Thanks a lot for the response.

            Comment


            • #7
              @debianxfce:
              Is there a place to report bugs with your distribution, because I have run into 2 problems.
              1) If running in non UEFI mode, the screen gets heavily distorted and is unusable after chosing graphical/install
              2) In UEFI mode it seems to run fine, but it does not allow to manually run partitioning. If I chose manual, it just refreshes the page and does not load the partition program, so I get stuck there

              Comment


              • #8
                Originally posted by debianxfce View Post

                The installer uses entire disk. You can install it to a fast usb stick.
                I have installed it on an USB stick and then later moved the whole partition to a free space on my SSD. At first boot I had graphic glitches, but on the second boot after doing an apt-get dist-upgrade, it works like a charm. Impressive, thanks.

                Comment


                • #9
                  Maybe you could also consider including dm-crypt in the next kernel release you are doing. I still get a small CPU sleep due to rcu_shed during boot. Besides that, I can declare it working for my combination: Ryzen 3 2200G on an Asus Prime B350-Plus board.

                  Comment


                  • #10
                    Originally posted by debianxfce View Post

                    Any ideas how to fix this with kernel configuration? Ryzen 5 1600 needs it.
                    The kernel needs this patch and this line in grub GRUB_CMDLINE_LINUX_DEFAULT="rcu_nocbs=0-11 mem_encrypt=off"
                    This explains the rcu_nocbs comand https://lime-technology.com/forums/t...ryzen-freezes/
                    legacy name with info to new name. Contribute to graysky2/kernel_gcc_patch development by creating an account on GitHub.


                    This is the patch needed just save as enable_additional_cpu_optimizations_for_gcc_v4.9%2 B_kernel_v4.13%2B.patch or change the extension. if you have ryzen 7 change the 11 to 15 ryzen 3 to 3,I have a ryzen 5 an this works for me.

                    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
                    Last edited by blisbell; 02 April 2018, 02:55 PM.

                    Comment

                    Working...
                    X