Announcement

Collapse
No announcement yet.

BCLK overclocking on Z170 Skylake chipsets prevents Ubuntu from booting

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

  • BCLK overclocking on Z170 Skylake chipsets prevents Ubuntu from booting

    Several motherboard manufacturers have recently released BIOS updates for a number of their Z170 motherboards that provide significant scope for base clock (BCLK) adjustments to facilitate overclocking on Intel CPUs without the "K" designation. Here is some background and further information:

    http://www.anandtech.com/show/9848/b...rs-coming-soon
    http://www.tomshardware.com/news/sky...ios,30763.html
    http://www.techspot.com/review/1108-...-overclocking/

    The problem (as it relates to Ubuntu specifically anyway, and possibly other distros) is that taking advantage of this new "feature" prevents Ubuntu from booting (here is where it hangs: http://imgur.com/DQudsFe ). The system is at this point completely unresponsive and requires a manual reset/power cycle.

    This is Ubuntu 15.10. It boots just fine at stock speeds. And it doesn't seem to be stability-related because even the most conservative of overclocks triggers this problem. In fact there is a boot performance mode in the BIOS called "Max Battery" which locks the CPU multplier to x8 during boot (which essentially results in an underclock) and even that triggers this problem.

    Knowing that Skylake support in 15.10 is "hacky" I upgraded to Kernel 4.3. Same problem. I also tried a daily build of 16.04. Again, same problem.

    Windows 10 boots just fine no matter what I'm doing with base clock speeds.

    Here are the lines along which I am thinking. Certain things change when the base clock is adjusted (this is by design, for now at least). They are:

    1) the iGPU is disabled (I'm using a dedicated GPU obviously)
    2) Turbo Boost and Intel Speed Step are disabled
    3) c-states are disabled ( http://images.anandtech.com/reviews/...ll/ULT/c10.png )

    In other words: no more onboard graphics, and no more frequency scaling or idle states. So is Ubuntu somehow freaking out about the absence of hardware features that it expects to see? If so, how do we work around it?

    Of course I could be way off base too. I've tried every kernel argument I could find that sounded like it might be remotely related to the problem I am experiencing without success (I should have kept track so I could detail my efforts more comprehensively here but unfortunately I didn't). And yes, I tried disabling the motherboards serial port because of where things hang during boot (although I can't imaging how that could be related anyway).

    I'm flailing around in the dark a little bit here and would love some help.

    I have observed this problem on two different Z170 motherboards with the same CPU (i5-6400).

    Thanks
    Last edited by cainn24; 01-28-2016, 08:32 AM.

  • #2
    Disabling Turbo Boost, Speed Step, and c-states manually, without any BCLK adjustments, allows Ubuntu to boot.

    Could the disabling of the iGPU stop Linux from booting somehow, even though it is disabled when using a dedicated graphics card anyway? Is it disabled in the same way? Is it kinda-still-there when using a dedicated GPU, not totally-not-there-at-all when the motherboard BIOS disables it in order to facilitate BCLK adjustments?

    Just thinking out loud...
    Last edited by cainn24; 01-28-2016, 11:55 AM.

    Comment


    • #3
      Just a few more observations after having tweaked my overclock for the best most stable performance in Windows. Somehow all my playing around has resulted in the system hanging at a slightly different point during boot: http://imgur.com/dOAFE7O

      Interesting. So I'm thinking that maybe this is all about clock sources and whatnot. So I've tried kernel arguments such as notsc, clocksource=hpet and hpet=force but to no avail. I had also previously tried disabling HPET in the BIOS but tried it again anyway. Still no dice.

      Tried some other random things again too:

      Booting with acpi=off gets me to an Ubuntu desktop with a working mouse but a completely unresponsive UI followed shortly thereafter by a complete lockup.
      Booting with acpi=off in combination with disabling HPET in the BIOS gets me to an Ubuntu desktop without a working mouse and an unresponsive UI followed up a complete lockup.

      I have tried combining all those arguments as well and generally just get a black screen and an unresponsive system.

      Comment


      • #4
        More information:

        I think I better understand all the factors that are in play here after having done some additional reading. The mechanism that prevents significant BCLK adjustments with Skylake processors is the Power Control Unit in the CPU itself. So naturally that's what these new BIOS updates target. The PCU is simply disabled. That's obviously why we end up with no power management features.

        So now I'm thinking that any solution here needs to address the fact that we're running a CPU without an active PCU. Windows 10 doesn't seem to care, but apparently Linux does. But why? How do we make it behave in a scenario like this?

        I think I'm sort of on the right track by treating this as an acpi issue, but ultimately I still can't manage to boot to a functional desktop. As mentioned earlier acpi=off gets me to an unresponsive desktop, but that's not exactly awesome. And I don't want to completely disable acpi anyway. I've worked through the following with no success: https://wiki.ubuntu.com/DebuggingACPI

        Are there any acpi troubleshooting strategies I haven't tried?

        Comment


        • #5
          Got bored of all the nonsense, and AsRock just didn't seem to want to provide me with any further technical information about the mechanics behind the BCLK OC "feature" that might have advanced my troubleshooting efforts. Part of me would have liked to have soldiered on toward a solution, even alone, but in the end I just wanted to hit a particular performance target without all the drama. So I've now picked up an i5-6600k instead.

          Comment


          • #6
            Hi.
            I have some problem with i5-6500, Gigabyte ga-z170-hd3, OpenSuse 42.1

            http://imgur.com/W3DDkyH

            But liveusb puppylinux boot perfect.

            Upd. OpenSuse 42.1 boot success, after clean reinstall in overclock mode.
            Last edited by ermito; 03-06-2016, 08:31 AM.

            Comment


            • #7
              There is a solution here: https://www.reddit.com/r/linux_gamin...onk_intel_cpu/

              If you've overclocked a non-K Intel CPU, you may notice that you can boot into Windows but you will get a crash when trying to boot into Linux. First, we need to remove the automatic microcode updates from Intel. To do this in Manjaro/Arch, remove the `intel-ucode` package and run `sudo update-grub`. Then, recompile the kernel with the `intel_idle` config flag set to `n`.

              Compiling Linux:
              -----------------------
              1. Update your kernel to the latest version provided by your distro and ensure you're using open-source GPU drivers
              2. Download a .tar.gz from [here](https://github.com/torvalds/linux/releases) and run `tar xvf file.tar.gz` and cd into the folder.
              3. make localyesconfig (if it asks you for any options, just hold enter to use defaults)
              4. make xconfig: Edit --> Find --> Type "intel_idle" into the search bar and press Search --> Uncheck the box for the "Cpuidle Driver for Intel Processors" --> Save --> Exit
              5. make -j4 (change 4 to the # of cores you have)
              6. sudo make modules_install
              7. sudo make install
              8. sudo mv /boot/vmlinuz /boot/vmlinuz-4.7
              9. sudo mkinitcpio -k 4.7.0-MANJARO -c /etc/mkinitcpio.conf -g /boot/initramfs-4.7.img (4.7.0-MANJARO is the kernel name; kernel names are listed in /lib/modules)
              10. sudo update-grub
              11. reboot

              Once you've tested that it works, I recommend following this tutorial to automate it: https://wiki.archlinux.org/index.php...h_Build_System

              Comment


              • #8
                If you've overclocked a non-K Intel CPU, you may notice that you can boot into Windows but you will get a crash when trying to boot into Linux. First, we need to remove the automatic microcode updates from Intel. To do this in Manjaro/Arch, remove the `intel-ucode` package and run `sudo update-grub`. Then, recompile the kernel with the `intel_idle` config flag set to `n`.

                Compiling Linux:
                -----------------------
                1. Update your kernel to the latest version provided by your distro and ensure you're using open-source GPU drivers
                2. Download a .tar.gz from [here](https://github.com/torvalds/linux/releases) and run `tar xvf file.tar.gz` and cd into the folder.
                3. make localyesconfig (if it asks you for any options, just hold enter to use defaults)
                4. make xconfig: Edit --> Find --> Type "intel_idle" into the search bar and press Search --> Uncheck the box for the "Cpuidle Driver for Intel Processors" --> Save --> Exit
                5. make -j4 (change 4 to the # of cores you have)
                6. sudo make modules_install
                7. sudo make install
                8. sudo mv /boot/vmlinuz /boot/vmlinuz-4.7
                9. sudo mkinitcpio -k 4.7.0-MANJARO -c /etc/mkinitcpio.conf -g /boot/initramfs-4.7.img (4.7.0-MANJARO is the kernel name; kernel names are listed in /lib/modules)
                10. sudo update-grub
                11. reboot

                Once you've tested that it works, I recommend following this tutorial to automate it: https://wiki.archlinux.org/index.php...h_Build_System

                Comment


                • #9
                  The above excerpt was taken from https://www.reddit.com/r/linux_gamin...onk_intel_cpu/

                  Comment


                  • #10
                    EDIT: Forget compiling the kernel, just do the following:

                    1. `sudo nano /etc/default/grub`
                    2. Add `intel_idle.max_cstate=0` to `GRUB_CMDLINE_LINUX_DEFAULT` inside the quotes
                    3. `sudo update-grub`

                    Comment

                    Working...
                    X