You are not logged in.

#26 2018-02-04 20:13:45

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

R00KIE wrote:

I would remove all kernel options you have added, forget about having the brightness keys working for now. Like seth says disable tlp or laptop mode tools or whatever other power saving daemons or tweaks you may have done.

If say you are using early modesetting, try using late modesetting, if that doesn't work try only with nomodeset, also try blacklisting i915 completely (don't forget to regenerate the initramfs), that should take the gpu driver completely out of the equation.

Try booting with the install media and see if it hangs, if it doesn't there is a good chance that it is some configuration you have changed that is causing trouble.

Make sure you are not trying to start any DE or WM, you don't want anything to be trying to fiddle with system settings.

I tried booting with nomodeset and I also tried late modesetting before, but it didn't work and I didn't want to try that again since it would most likely fail (again).

So I removed all kernel options, blacklisted i915, regenerated initramfs, rebuilt grub, and blocked display manager and plymouth. But still nothing. log

Last edited by momu (2018-02-05 13:49:24)

Offline

#27 2018-02-04 20:28:14

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

Offline

#28 2018-02-04 22:24:40

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

This might be a big clue.

I masked multi-user.target. Screen no longer freezes, but now loads infinitely. Screen would usually freeze at 3/4ths of plymouth loding bar (spinfinity theme), but now loading bar goes normally up to 7/8ths, and then it starts going really slowly. When it reaches the end, nothing happens and spinfinity symbol just keeps rotating indefinitely. Pressing <Esc> reveals the message: "Failed to isolate default target, freezing!" (I guess this is normal without multi-user.target). There is no log.

Last edited by momu (2018-02-05 11:04:18)

Offline

#29 2018-02-05 16:05:18

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

I would suggest bisecting between 4.9 and 4.14 to find the bad commit try applying the patch from the other topic I linked against 4.14 or 4.15 or if 4.13 is affected reverting 9301397a63b3bf1090dffe846c6f1c8efa032236

Offline

#30 2018-02-05 17:42:28

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

loqs wrote:

I would suggest bisecting between 4.9 and 4.14 to find the bad commit try applying the patch from the other topic I linked against 4.14 or 4.15 or if 4.13 is affected reverting 9301397a63b3bf1090dffe846c6f1c8efa032236

I'll try it, and I'll post it here if I find something.

Offline

#31 2018-02-05 19:32:04

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

You may be able to save some time by trying prebuilt 4.10-4.13 kernels from the Arch_Linux_Archive.

Offline

#32 2018-02-06 08:33:45

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

loqs wrote:

You may be able to save some time by trying prebuilt 4.10-4.13 kernels from the Arch_Linux_Archive.

Using binary algorithm on linux and linux-headers from archive I've found the version of kernel in which bug first appears. The bug first appears in kernel 4.11.2. So, this file and this file.

What should I do now?

Last edited by momu (2018-02-06 09:02:52)

Offline

#33 2018-02-06 10:22:21

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

Just to confirm 4.11.1 works successfully?

Offline

#34 2018-02-06 10:40:28

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

loqs wrote:

Just to confirm 4.11.1 works successfully?

I couldn't find 4.11.1 in the archives. I couldn't find some others too, like 4.10.7... I just skipped those I couldn't find... but I'm sure there is definitely no bug up to 4.10.13 since it is the last kernel in the archives that works. And 4.11.2 is the first one with the bug in the archives. If bug is not introduced in 4.11.2 then the only possibilities are 4.11.1 or 4.10.14/15/16...

If you find 4.11.1 or some 4.10.x, where x > 13, please post link so I can test it.

Last edited by momu (2018-02-06 10:58:54)

Offline

#35 2018-02-06 14:53:04

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

The following assumes the base-devel group and git are installed and I recomend enabling Makepkg#Parallel_compilation to reduce build times

$ git clone git://git.archlinux.org/svntogit/packages.git --single-branch --branch "packages/linux"
$ cp -r packages/trunk linux-git
$ cd packages/trunk
$ git checkout 5c71cf473dea401ead539c1eb256da4b5416c20e #v4.10.13
$ cp config.x86_64 ../../linux-git
$ cd ../..
$ rm -rf packages
$ cd linux-git
# replace PKGBUILD with the one in this post
$ makepkg -o #this setups up the src directory but does not build the package as a change is needed for gcc7
cd src/linux/
$ git cherry-pick -n 474c90156c8dcc2fa815e6716cc9394d7930cb9c
$ cd ../..
$ makepkg -ersi #this is to confirm 4.10 as built on your system does not have the issue update bootloader for new kernel if needed

$ cd linux-git/src/linux
$ git checkout v4.11
$ cd ../..
$ makepkg -ersi #this is to confirm 4.11 as built on your system has the issue

$ cd linux-git/src/linux/
$ git bisect start
$ git bisect bad v4.11
$ git bisect good v4.10
$ git cherry-pick -n 474c90156c8dcc2fa815e6716cc9394d7930cb9c
$ cd ../..
$ makepkg -ersif #test generated kernel

$ cd linux-git/src/linux/
$ git bisect $result #substitue good or bad here
$ git cherry-pick -n 474c90156c8dcc2fa815e6716cc9394d7930cb9c
$ cd ../..
$ makepkg -ersif #repeat these five lines and test the generated kernel until git has found the bad commit

PKGBUILD

# Maintainer: Boohbah <boohbah at gmail.com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>
# Contributor: Jonathan Chan <jyc@fastmail.fm>
# Contributor: misc <tastky@gmail.com>
# Contributor: NextHendrix <cjones12 at sheffield.ac.uk>

pkgbase=linux-git
_srcname=linux
pkgver=4.10.r0.gc470abd4fde4
pkgrel=1
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
makedepends=('kmod' 'inetutils' 'bc' 'libelf')
options=('!strip')
source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=v4.10'
        #'git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git#tag=vX.X.Y'
  'config.x86_64'   # the main kernel config file
  '60-linux.hook'  # pacman hook for depmod
  '90-linux.hook'  # pacman hook for initramfs regeneration
  'linux.preset'   # standard config files for mkinitcpio ramdisk
)

sha256sums=('SKIP'
            '12a87284e2935cd17e2846a207cc76f1728531416523735d66ef8a0ae690884c'
            'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
            '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
            'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')

_kernelname=${pkgbase#linux}
: ${_kernelname:=-ARCH}

pkgver() {
  cd ${_srcname}

  git describe --long | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g;s/\.rc/rc/'
}

prepare() {
  cd ${_srcname}

  cp -Tf ../config.${CARCH} .config

  # set localversion to git commit
  sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"-${pkgver##*.}\"|g" ./.config
  sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config

  # don't run depmod on 'make install'. We'll do this ourselves in packaging
#  git tracks scripts/depmod.sh so do not change it when using the existing source dir for bisection
#  sed -i '2iexit 0' scripts/depmod.sh

  # get kernel version
  make prepare

  # load configuration
  # Configure the kernel. Replace the line below with one of your choice.
  #make menuconfig # CLI menu for configuration
  #make nconfig # new CLI menu for configuration
  #make xconfig # X-based configuration
  #make oldconfig # using old config from previous kernel version
  make olddefconfig # old config from previous kernel, defaults for new options
  # ... or manually edit .config
}

build() {
  cd ${_srcname}

  make ${MAKEFLAGS} LOCALVERSION= bzImage modules
}

_package() {
  pkgdesc="The Linux kernel and modules (git version)"
  depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
  optdepends=('crda: to set the correct wireless channels of your country')
  provides=('linux')
  backup=("etc/mkinitcpio.d/${pkgbase}.preset")
  install=linux.install

  cd ${_srcname}

  # get kernel version
  _kernver="$(make LOCALVERSION= kernelrelease)"
  _basekernel=${_kernver%%-*}
  _basekernel=${_basekernel%.*}

  mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
  make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
  cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"

  # make room for external modules
  local _extramodules="extramodules-${_basekernel}${_kernelname}"
  ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"

  # add real version for building modules and running depmod from hook
  echo "${_kernver}" |
    install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"

  # remove build and source links
  rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}

  # now we call depmod...
  depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"

  # add vmlinux
  install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux

  # sed expression for following substitutions
  local _subst="
    s|%PKGBASE%|${pkgbase}|g
    s|%KERNVER%|${_kernver}|g
    s|%EXTRAMODULES%|${_extramodules}|g
  "

  # hack to allow specifying an initially nonexisting install file
  sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
  true && install=${install}.pkg

  # install mkinitcpio preset file
  sed "${_subst}" ../linux.preset |
    install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"

  # install pacman hooks
  sed "${_subst}" ../60-linux.hook |
    install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
  sed "${_subst}" ../90-linux.hook |
    install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
}

_package-headers() {
  pkgdesc="Header files and scripts for building modules for Linux kernel (git version)"
  provides=('linux-headers')

  cd ${_srcname}
  local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"

  install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
  install -Dt "${_builddir}/kernel" -m644 kernel/Makefile

  mkdir "${_builddir}/.tmp_versions"

  cp -t "${_builddir}" -a include scripts

  install -Dt "${_builddir}/arch/x86" -m644 arch/x86/Makefile
  install -Dt "${_builddir}/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s

  cp -t "${_builddir}/arch/x86" -a arch/x86/include

  install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
  install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h

  # http://bugs.archlinux.org/task/9912
  install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.h

  # http://bugs.archlinux.org/task/13146
  install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h

  # http://bugs.archlinux.org/task/20402
  install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
  install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
  install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h

  # add xfs and shmem for aufs building
  mkdir -p "${_builddir}"/{fs/xfs,mm}

  # copy in Kconfig files
  find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;

  # add objtool for external module building and enabled VALIDATION_STACK option
  install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool

  # remove unneeded architectures
  local _arch
  for _arch in "${_builddir}"/arch/*/; do
    [[ ${_arch} == */x86/ ]] && continue
    rm -r "${_arch}"
  done

  # remove files already in linux-docs package
  rm -r "${_builddir}/Documentation"

  # remove now broken symlinks
  find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete

  # Fix permissions
  chmod -R u=rwX,go=rX "${_builddir}"

  # strip scripts directory
  local _binary _strip
  while read -rd '' _binary; do
    case "$(file -bi "${_binary}")" in
      *application/x-sharedlib*)  _strip="${STRIP_SHARED}"   ;; # Libraries (.so)
      *application/x-archive*)    _strip="${STRIP_STATIC}"   ;; # Libraries (.a)
      *application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
      *) continue ;;
    esac
    /usr/bin/strip ${_strip} "${_binary}"
  done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
}

_package-docs() {
  pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel (git version)"
  provides=('linux-docs')

  cd ${_srcname}
  local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"

  mkdir -p "${_builddir}"
  cp -t "${_builddir}" -a Documentation

  # Fix permissions
  chmod -R u=rwX,go=rX "${_builddir}"
}

pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")
for _p in ${pkgname[@]}; do
  eval "package_${_p}() {
    $(declare -f "_package${_p#${pkgbase}}")
    _package${_p#${pkgbase}}
  }"
done

# vim:set ts=8 sts=2 sw=2 et:

Offline

#36 2018-02-07 00:12:29

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

I succesfully built 4.10, but when I tried to install it this is what I got...
I am not supposed to install it, right? I'll continue when I get the answer, it's safer that way.

Offline

#37 2018-02-07 00:23:01

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

You were following the instructions correctly installing the packages.  I missed 4.10 includes firmware that needs to be removed, please add these lines on line 102

  # remove the firmware
  rm -rf "${pkgdir}/lib/firmware"

So the section becomes

  # remove build and source links
  rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
  
  # remove the firmware
  rm -rf "${pkgdir}/lib/firmware"

  # now we call depmod...
  depmod -b "${pkgdir}/usr" -F System.map "${_kernver}

Then `makepkg --repackage` see if that works any better.
Edit:
Fix the code snippet

Last edited by loqs (2018-02-07 00:39:07)

Offline

#38 2018-02-07 01:44:22

theonlylawislove
Member
Registered: 2015-01-05
Posts: 38

Re: [SOLVED]Kernel 4.14 freezes during boot

I have a script the continuously builds me a new image. My image started to fail to boot with kernel 4.15. When Xorg starts, I get this:

[    45.424] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 28 paused 0
[    45.424] (**) Eee PC WMI hotkeys: always reports core events
[    45.424] (**) Option "Device" "/dev/input/event5"
[    45.424] (**) Option "_source" "server/udev"
[    45.424] (II) event5  - (II) Eee PC WMI hotkeys: (II) is tagged by udev as: Keyboard
[    45.424] (II) event5  - (II) Eee PC WMI hotkeys: (II) device is a keyboard
[    45.424] (II) event5  - (II) Eee PC WMI hotkeys: (II) device removed
[    45.424] (**) Option "config_info" "udev:/sys/devices/platform/eeepc-wmi/input/input5/event5"
[    45.424] (II) XINPUT: Adding extended input device "Eee PC WMI hotkeys" (type: KEYBOARD, id 12)
[    45.424] (II) event5  - (II) Eee PC WMI hotkeys: (II) is tagged by udev as: Keyboard
[    45.424] (II) event5  - (II) Eee PC WMI hotkeys: (II) device is a keyboard
[    45.430] (EE) intel(0): failed to set mode: Invalid argument [22]
[    45.529] (EE) intel(0): failed to set mode: Invalid argument [22]

My entire system will freeze. I can't switch tty's either. Does this sound related?

Offline

#39 2018-02-07 01:48:46

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

@theonlylawislove see comment #34 this issue seems to originate between 4.10 and 4.11.

Offline

#40 2018-02-07 07:44:19

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

loqs wrote:

You were following the instructions correctly installing the packages.  I missed 4.10 includes firmware that needs to be removed, please add these lines on line 102

  # remove the firmware
  rm -rf "${pkgdir}/lib/firmware"

So the section becomes

  # remove build and source links
  rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
  
  # remove the firmware
  rm -rf "${pkgdir}/lib/firmware"

  # now we call depmod...
  depmod -b "${pkgdir}/usr" -F System.map "${_kernver}

Then `makepkg --repackage` see if that works any better.
Edit:
Fix the code snippet

Unfortunately, no. The same message appears when I try to install linux-git.

Offline

#41 2018-02-07 11:37:50

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

Change

  rm -rf "${pkgdir}/lib/firmware"

to

  rm -rf "${pkgdir}/usr/lib/firmware"

Checked installs here.

Offline

#42 2018-02-07 12:21:06

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

4.10  built and installed succesfully.

But how can I test it? I don't see linux-git option in GRUB menu.

Offline

#43 2018-02-07 12:26:34

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED]Kernel 4.14 freezes during boot

I think you need to rerun GRUB#Generate_the_main_configuration_file.

Offline

#44 2018-02-07 12:43:52

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

loqs wrote:

Thanks.

4.10 boots and works with no problem. The only difference between 4.9 and 4.10 is that 4.10 slows down a little bit when approaching the end of a loading bar, so it boots one second later (I'm mentioning this because when I tested kernels from the archive, starting form 4.10.1, the later the version was, the slower it booted, until 4.11.2 which freezes). But otherwise it's fine.

I'll now move to 4.11.

Offline

#45 2018-02-07 20:32:36

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

4.11 has the bug.

Now moving on to the main part: bisecting. This is gonna take a while.

Offline

#46 2018-02-10 21:52:46

momu
Member
Registered: 2017-10-14
Posts: 137

Re: [SOLVED]Kernel 4.14 freezes during boot

The issue is fixed in 4.15.2.

Thanks to everyone who tried to help.

Offline

Board footer

Powered by FluxBB