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 [email protected] 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
    Use a rolling release operation system and custom kernel, see:
    https://www.phoronix.com/forums/foru...in-living-room
    Last edited by debianxfce; 03-18-2017, 12:13 PM.

    Comment


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

      Comment


      • #4
        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


        • #5
          Originally posted by ecth View Post
          For example you linked the oibaf ppa but on the site it clearly says Ubuntu 16.04 and 16.10.
          Ubuntus are made from Debian testing and unstable and Oibaf ppa yakkety version works with Debian testing Xfce that is a stable and easy to use rolling release distribution.

          Comment


          • #6
            Okay, I am following your instruction:

            Debian testing Xfce is the best for all usage. Burn the netinstaller to a cdrw or usb memory:
            https://www.debian.org/devel/debian-installer/
            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


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


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

                Comment


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

                  Comment


                  • #10
                    https://pastebin.com/7G65ugiG

                    (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

                    Working...
                    X