Announcement

Collapse
No announcement yet.

R600 + Radeon SI switchable graphics on Ubuntu 16.04+

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

  • R600 + Radeon SI switchable graphics on Ubuntu 16.04+

    Hi there!

    I wanted to set up an up-to-date Ubuntu MATE on my notebook. So I installed the most recent stable 16.10 and then realized that the AMD driver support has been dramatically messed up Still I don't want to give up, so I am asking the community ^^

    The Notebook is an MSI GX60 3AE with an A10 5750m APU with an integrated 8650g (VLIW4, r600) and a dedicated 7970m (GCN1.0, radeonsi).

    First I installed Ubuntu 16.10 and actually it is the best version. The newer kernel and drivers seem to work best. 16.04 feels old once I touched 16.10, 17.04 doesn't have the driver support yet D:
    With the basic drivers the iGPU gets fully supported. I can watch videos up to 1080@60 or even 1440p, I can start heavy Steam games with VERY LOW settings or something like Minecraft with usual 40-60 fps. So here the opensource drivers work fine
    But I can not switch to the dGPU =/ With the basic drivers DRI_PRiME=1 just does nothing. glxgears seems to lose the vsync and renders like hell, but the dGPU is off. On my notebook there is an LED that lights up, when the dGPU is powered. Also I can only read its temps when the LED is lit. But DRI_PRIME=1 simply doesn't start the GPU.

    Then I installed this driver:
    https://launchpad.net/~paulo-miguel-...ve/ubuntu/mesa (THIS didn't support 17.04 yet..)

    Overall performance feels better but the main difference ist that DRI_PRIME=1 did start my dGPU but failed. Also when I add radeon.modeset=1 or radeon.dpm=0 I can manage the dGPU to stay on but still it fails running.
    My last attempt was: I installed Ubuntu 16.04, saw no difference, installed the padoka driver and then updated to 16.10. So now I am on Ubuntu 16.10, have full support for my iGPU but no support for my dGPU.

    Also sometimes on boot I see this:
    Code:
    radeon 0000:01:00.0: failed VCE resume (-22).
    [drm:r600_ring_test [radeon]] *ERROR* radeon: ring 0 test failed (scratch(0x850C)=0xCAFEDEAD)
    radeon 0000:01:00.0 disabling GPU acceleration
    [drm:si_dpm_set_power_state [radeon]] *ERROR* si_upload_sw_state failed
    Sometimes it doesn't boot properly but hangs with dGPU on. When I start the safe mode and then instantly resume in all menus the hardware acceleration is completely stopped and it renders all on CPU (even Steam games. Fun to see Payday2 with ~0.5 fps!)

    Where do I start? What else can I try to get the 7970m working?
    Also I have terrible tearing everywhere. The last time I tried to fix it I locked myself out of the gui and had to reinstall packages to fix stuff...

  • #2
    What exactly am I looking for? It's a long thread..

    Comment


    • #3
      Okay, now that you edited your post:
      I'm sorry to say that, but the linked thread is mostly flame war... Hard to find much information beside "nvidia sucks" - "no amd sucks" ...

      Is there a way to start updating kernel and stuff from Ubuntu? Or which other distributions would you recommend?
      For example you linked the oibaf ppa but on the site it clearly says Ubuntu 16.04 and 16.10. That's why i couldn't stay with 17.04 though it has a newer kernel and a newer mesa driver from the beginning.

      Comment


      • #4
        Okay, I am following your instruction:

        Debian testing Xfce is the best for all usage. Burn the netinstaller to a cdrw or usb memory:

        Choose Debian Desktop and Xfce in the installer. Use the Whisker menu plugin along with the Weather plugin and remove the original applications menu. You can configure Xfce freely, so make it suitable for your liking.

        Install Amd firmware:
        https://packages.debian.org/stretch/...e-amd-graphics
        With Synaptic install Gdebi. With Gdebi you can install downloaded .deb packages easily. Give the root password when asked. Latest firmware for polaris:
        https://people.freedesktop.org/~agd5...ucode/polaris/

        wine-staging gives fps boost with the help of the cpu.
        https://github.com/wine-compholio/wi...ssiestretchsid


        Latest mesa:
        Oibaf PPA:
        https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

        To remove ppa drivers, get apt-purge from ubuntu and type: sudo ppa-purge repository_name

        PPAs with Debian, use case B:
        http://www.webupd8.org/2014/10/how-t...ebian-via.html


        Latest Amdgpu kernel driver
        https://cgit.freedesktop.org/~agd5f/...-next-4.12-wip

        Use the command: git clone -b drm-next-4.12-wip git://people.freedesktop.org/~agd5f/linux

        The kernel configuration file of Debian Official kernel are available in /boot, named after the kernel release. Copy the .config file to the linux directory. Connect all your devices and run the command: make localmodconfig. You can use the command make defconfig too for creating initial .config file.

        Use the command: make xconfig and check that you have enabled: Reroute Broken IRQ, Virtualization KVM and 300Hz CPU timer, I also disabled Swap, Kernel Debug, CPU Freq scaling , Cpu handling in Acpi, Used Bios to control CPU and devices. In the drivers->graphics->amdgpu enable cik support for a gcn 1.1 gpu and si support for a gcn 1.0 gpu.

        Create debian kernel package:
        export CONCURRENCY_LEVEL=4
        fakeroot make-kpkg --initrd kernel_image

        Install the kernel package with Gdebi. To make a custom kernel to boot, add a line to /etc/initramfs-tools/modules:
        unix
        And run: sudo update-initramfs
        Reboot.
        (copied to have it in this thread)

        Just to understand:
        - Install AMD firmware, optionally for polaris, optionally with wine fix
        - Install latest mesa driver
        - Git clone amdgpu kernel driver.
        - Get your own config gile to that cloned repository <- here I am right now
        - Configure the kernel and build it
        - Apply the new kernel
        - reboot

        Is this the sequence?

        For the step with the config: The kernel is 4.12-wip. My current kernel is the stable 4.10.4. Can I take my config or do I need a more recent one?
        Do I need a newer version of xorg?

        Comment


        • #5
          Okay, now, you said rolling release - I'm on Arch Linux now. The latest stable kernel is 4.10.8, the flag for AMDGPU SouthernIsland support is activated, the driver installed.
          But still it boots the radeon driver and fails starting the 7970m. When I blacklist the radeon driver the system fails to boot. I guess it is because the amdgpu driver fails to deal with the VLIV4 (pre-GCN) 8650g iGPU... :/
          Can I blacklist a driver for certain hardware? Or force the amdgpu somehow to start with the dGPU only?
          Why does the radeon driver fail? That should actually work with GCN1.0 cards as well?

          Comment


          • #6
            Felix is working on logic to selectively disable HW generations in radeon when they are enabled on amdgpu, avoiding the need for blacklisting:

            https://lists.freedesktop.org/archiv...il/007510.html
            Test signature

            Comment


            • #7
              This looks great! Can I apply this patch somehow? Or can I only wait for the next release?

              Comment


              • #8
                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.


                (sorry for the pastebin link, Phoronix doesn't let me post this without a "JSON token error", I'm tired of trying to tweak the text, nothing I tried worked)

                Comment


                • #9
                  @Azultra: Now that sounds promising :> I was hoping that someone with a GX60/GX70 has already fixed it xD Do you use the AMGDPU driver at all? Or only radeon? I'll try it today!

                  @debianxfce: Do you have a similar setup with pre-GCN APU and GCN GPU? Basically your help led me to a nice system and I am very thankful. But the special case with two different GPU architectures seems to be a bit more complicated than "just" getting the GPUs work. Right now my APU is working great on Arch Linux. Easy games like Minecraft or Hotline Miami work just as on Windows.

                  @bridgman: Is the fix included in any new driver already? I'd try the beta stuff if it works already :>

                  Comment


                  • #10
                    Okay, buying a new notebook is not an option right now. With the current configuration the overall performance is still quite descent (though it's ~3-4 years old now). And I'd like to keep using both GPUs. I could disable the iGPU in Windows via Registry but that is not the solution I was looking for. That is how I came to linux (again)

                    I'll try Azultra's solution right now, after posting this. If it doesn't work I'll stay with the current setup and maybe try some beta mesa drivers hoping that they've added the fix mentioned before...

                    [ edit ]

                    Do you have the radeon.runpm=0 as a flag in the built kernel or as a boot option in grub?
                    With this line:
                    Code:
                    GRUB_CMDLINE_LINUX_DEFAULT="quiet radeon.runpm=0 acpi_backlight=video"
                    I get this when I try to use DRI_PRIME=1:
                    Code:
                    DRI_PRIME=1 glxgears
                    radeon: Failed to allocate virtual address for buffer:
                    radeon:    size      : 65536 bytes
                    radeon:    alignment : 4096 bytes
                    radeon:    domains   : 4
                    radeon:    va        : 0x0000000000800000
                    radeon: Failed to deallocate virtual address for buffer:
                    radeon:    size      : 65536 bytes
                    radeon:    va        : 0x800000
                    radeon: Failed to allocate virtual address for buffer:
                    radeon:    size      : 65536 bytes
                    radeon:    alignment : 4096 bytes
                    radeon:    domains   : 4
                    radeon:    va        : 0x0000000000800000
                    radeon: Failed to deallocate virtual address for buffer:
                    radeon:    size      : 65536 bytes
                    radeon:    va        : 0x800000
                    radeonsi: Failed to create a context.
                    Speicherzugriffsfehler (Speicherabzug geschrieben)
                    This is basically the same as without the option. The only difference is that the dGPU is on all the time and the orange LED is lit.

                    Funfact: somehow my acpi backlight started working. I had the acpi_backlight flag set but now it works

                    What exactly does radeon.modeset=0 or =1 or nomodeset? I had radeon.modeset=0 but I don't see much difference.... oô
                    Last edited by ecth; 28 April 2017, 12:09 PM. Reason: Added new information

                    Comment

                    Working...
                    X