Announcement

Collapse
No announcement yet.

Building amdgpu in the kernel instead of a module causing problems?

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

  • Building amdgpu in the kernel instead of a module causing problems?

    Hi guys, brief intro. I'm finally compiling my own kernels and kicking serious ass. Applying patches, making my own script, all that good stuff.

    I noticed one thing. When amdgpu is built-in (not as a module), I get major problems. The most obvious is multi-monitor support no longer works and it's just an half-ass experience. In GNOME's Settings, it'll say Unknown Monitor. There could be other issues, but that's the glaring one.

    Recompiling the kernel and changing it back to a module (instead of built-in), and everything is back to normal. Happens on both the latest 4.17 kernel (4.17.11) and 4.18 (-rc7).

    Any ideas? bridgman, have you experienced this by any chance? Thanks again. I have an AMD RX 480 for reference.

    EDIT: Sorry, meant to put this in Open-Source AMD Linux.
    Last edited by perpetually high; 30 July 2018, 06:55 PM.

  • #2
    Originally posted by debianxfce View Post
    Mainline kernels do have partially implemented amdgpu driver, compare diff column at kernel.org and these:

    Freesync kernel: https://cgit.freedesktop.org/~agd5f/...aging-drm-next
    Wip kernel: https://cgit.freedesktop.org/~agd5f/...-next-4.19-wip

    Use Mesa git too, like Oibaf ppa Mesa. Gnome is buggy, use Xfce. You can try my distribution too: https://www.youtube.com/watch?v=fKJ-IatUfis
    Does your kernel have amdgpu built-in or are you using it as a module?

    I'm upset I didn't build a kernel earlier that was *exactly* custom tailored to my machine. I'm using the 1000Hz, all debug off, PREEMPT, march=native optimizations, all the good stuff. Machine is seriously flying now; not a placebo either.

    I'm using oibaf PPA right now and everything is great. I feel it's a bit more stable than Padoka right now, don't see my self changing. Also getting wine-staging from a PPA that depends on oibaf.

    You should see my GNOME. It's flawless. Granted it's heavily customized, but each their own. I know you like Xfce. Great DE, but not my go-to at the moment.

    Right now my base kernel is 4.18-rc7, I'm gonna experiment the FreeSync kernel and the Wip kernel for fun. (I'm kinda over FreeSync, and I'm loving TearFree). Other than that, I just need to chill. My machine is near perfect right now, made a clonezilla backup right now too. I feel invincible.

    Comment


    • #3
      debianxfce - I'm really liking both amd-staging-drm-next and and wip-next. Any way to get FreeSync support on wip-next? Do you know why that's excluded?

      Also, it doesn't appear that FreeSync _actually_ works. I verified it with:

      $ DISPLAY=:0 xrandr --prop|grep freesync

      and it shows both capable and on after I flipped the bit, but trying out Rocket League it doesn't show it changing (verifying it with the OSD on my monitor, how I've verified FreeSync a while back).
      Last edited by perpetually high; 31 July 2018, 12:55 AM.

      Comment


      • #4
        This has nothing to do with partial implementation or kernel bugs.

        If amdgpu is built-in, then you also need to have the necessary firmware built-in. This is done by setting CONFIG_EXTRA_FIRMWARE and CONFIG_EXTRA_FIRMWARE_DIR in your kernel config. Else you will see in dmesg that firmware loading failed and amdgpu will not initialize properly.

        See Gentoo Wiki for details: https://wiki.gentoo.org/wiki/AMDGPU#...ating_firmware

        Comment


        • #5
          Originally posted by chithanh View Post
          This has nothing to do with partial implementation or kernel bugs.

          If amdgpu is built-in, then you also need to have the necessary firmware built-in. This is done by setting CONFIG_EXTRA_FIRMWARE and CONFIG_EXTRA_FIRMWARE_DIR in your kernel config. Else you will see in dmesg that firmware loading failed and amdgpu will not initialize properly.

          See Gentoo Wiki for details: https://wiki.gentoo.org/wiki/AMDGPU#...ating_firmware
          Thanks so much. That was exactly what I was looking for. Everything's working great now.

          PS: I see why it makes more sense now to use it as a module since the firmware files don't need to be baked into the kernel, which then allows for easier updating by placing them in /lib/firmware. But I guess it's a moot point since a new kernel comes out every week.

          Comment


          • #6
            Originally posted by debianxfce View Post

            No need to have AMD firmware files in the kernel. /lib/firmware/amdgpu/ is the directory for firmware files and latest files you find from https://git.kernel.org/pub/scm/linux...it/tree/amdgpu
            Yes, but you need to include those files as a string. as chithanh's link mentioned.

            Once I added:

            amdgpu/polaris10_ce_2.bin amdgpu/polaris10_ce.bin amdgpu/polaris10_k_smc.bin amdgpu/polaris10_mc.bin amdgpu/polaris10_me_2.bin amdgpu/polaris10_me.bin amdgpu/polaris10_mec2_2.bin amdgpu/polaris10_mec_2.bin amdgpu/polaris10_mec2.bin amdgpu/polaris10_mec.bin amdgpu/polaris10_pfp_2.bin amdgpu/polaris10_pfp.bin amdgpu/polaris10_rlc.bin amdgpu/polaris10_sdma1.bin amdgpu/polaris10_sdma.bin amdgpu/polaris10_smc.bin amdgpu/polaris10_smc_sk.bin amdgpu/polaris10_uvd.bin amdgpu/polaris10_vce.bin

            to the correct place in the kernel configuration, all was well. So, the answer I got was luckily exactly what I was looking for. If you haven't added that string in, I'm not sure your kernel is being built correctly, unless Debian is different, but I can't imagine it varies that much from Ubuntu on this.

            Comment


            • #7
              Originally posted by debianxfce View Post
              No need to have AMD firmware files in the kernel when the amdgpu driver is built-in.
              If you have amdgpu built-in, it will initialize before your root filesystem is mounted.

              Comment


              • #8
                Originally posted by debianxfce View Post

                See your dmesg, the amdgpu is initialised almost latest.

                Code:
                [ 2.460513] [drm] Initialized amdgpu 3.27.0 20150101 for 0000:08:00.0
                m.2 ssd is mounted one second earlier:

                Code:
                [ 1.663134] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
                Maybe you have a slow hard drive.
                Pretty sure you're misinterpreting that... amdgpu gets initialized way before that. The line you referenced is likely saying initialization is done.

                [ 0.430837] [drm] amdgpu kernel modesetting enabled.
                [ 0.430848] fb: switching to amdgpudrmfb from VESA VGA

                Happens way before. Either way debianxfce, he answered my question, and I can say with full confidence the string list of the files needs to be included in the kernel. It can't infer (as far as I can tell) just because they're comfortably sitting in /lib/firmware/amdgpu. I'm not sure why you enjoy being difficult.

                Comment


                • #9
                  Originally posted by debianxfce View Post

                  Code:
                  [ 2.134340] [drm] amdgpu kernel modesetting enabled.
                  [ 2.152432] [drm] initializing kernel modesetting (POLARIS11 0x1002:0x67FF 0x1043:0x052D 0xCF).
                  Your kernel is configured different than mine.

                  $ dmesg|grep -i drm
                  [ 0.429016] [drm] amdgpu kernel modesetting enabled.
                  [ 0.429027] fb: switching to amdgpudrmfb from VESA VGA
                  [ 0.429233] [drm] initializing kernel modesetting (POLARIS10 0x1002:0x67DF 0x1462:0x3413 0xC7).

                  Happens way earlier on my machine. Sounds like mine is baked into the kernel, yours isn't

                  Comment


                  • #10
                    Originally posted by debianxfce View Post

                    Why there is this package if firmware files must be in the kernel;-) https://packages.debian.org/stretch/...e-amd-graphics
                    I'm semi just busting your chops.. debian might handle this a bit differently (they have the firmware-amd-graphics package, ubuntu doesn't). So it could be possible for the sake of arguing that we are both right here, so I'm just glad I'm able to compile the kernel with the module baked in.

                    Comment

                    Working...
                    X