You are not logged in.
I'm a little late (and essentially explaining loqs' recipe), but assume tomsk's main problem is to understand (an we probably mindskipped the aspect) that there are 2 stacked git repos.
The one of the package, the other one - inside - of the kernel.
You need to get the outer one (of the package) down to 5.7 because that will provide the proper config file and build instructions for the kernel bisection (but please use the version loqs prepared)
Then you move to the kernel git repo and start the bisect, which will move the kernel repo to a commit between 5.6 and 5.7 - the outer git repo (with the PKGBUILD) will stay at 5.7 all the time.
Using the contemporary config file of the arch package is important, because otherwise you don't reproduce the situation you faced when encountering the error and a differing config option might stash the error - resulting in each and every build, ultimately 5.7, being "good" (despite you know the packag version is bad)
Offline
So I did:
makepkg -rsi
It compiled kernel for me and installed it. Then I run:
grub-mkconfig -o /boot/grub/grub.cfg
Restarted PC and I have black screen with:
Booting 'Arch Linux'
Loading Linux linux-git ...
Loading initial ramdisk ...
_
And nothings happens.
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
It just hangs at that point?
If you press e to edit the linux-git entry in grub and remove quiet if present and add ignore_loglevel is any more output produced?
Offline
Yes it just hangs, there are my grub params:
https://i.imgur.com/iWNURHx.jpg
When I remove quiet and add ignore_loglevel nothing happens, still the same:
https://i.imgur.com/Q50InS2.jpg
Last edited by tomsk (2021-01-11 14:27:49)
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
Please replace the oversized images w/ links.
Can you boot when adding "nomodeset systemd.unit=multi-user.target" as kernel parameters?
Offline
As well as removing quiet and adding ignore_loglevel try removing intel_iommu=on and the vfio-pci option.
Last edited by loqs (2021-01-11 14:25:03)
Offline
Made changes to grub according to seth and loqs and nothing happened, still the same, but when I tried to change kernel to original, then I got bunch of logs on screen, and I got no graphics environment, so I had to change grub commands back to normal using tty.
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
"git bisect skip"
Then "makepkg -ersif" (we're just trying a different random commit between the endpoints)
Offline
Oh why it forgot my bisect from yesterday? Im so confused.
[tomsk@tomsk-PC linux]$ git status
On branch makepkg
nothing to commit, working tree clean
[tomsk@tomsk-PC linux]$ git bisect skip
You need to start by "git bisect start"
Do you want me to do it for you [Y/n]? ^C
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
You seem to run that in the git directory of the package, but the bisection happens in the linux-git/src/linux
Alternatively you did
So I did:
makepkg -rsi
ie. w/o the "-e" which refreshes the sources…
Edit: in the meantime, do you mind trying "i915.enable_psr=0" ? Because https://bbs.archlinux.org/viewtopic.php?id=262561
Last edited by seth (2021-01-11 15:07:35)
Offline
https://i.imgur.com/WSPmiYK.png
Im in linux-git/src/linux
EDIT: "i915.enable_psr=0" into grub commands? I can try it, what it does? Does it decrease performance or something?
EDIT2: Added it like GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet intel_iommu=on vfio-pci.ids=10de:1c03,10de:10f1 i915.enable_psr=0" and didnt help, tried even with compositor turned off.
EDIT3: Gonna try intel_idle.max_cstate=1 and i915.enable_dc=0 according to https://linuxreviews.org/Intel_graphics, didnt help.
Still:
Jan 11 16:49:54 tomsk-PC kernel: i915 0000:00:02.0: [drm] GPU HANG: ecode 7:1:85ddfffd, in UE4Editor [1954]
Jan 11 16:49:54 tomsk-PC kernel: GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
Jan 11 16:49:54 tomsk-PC kernel: Please file a _new_ bug report at https://gitlab.freedesktop.org/drm/intel/issues/new.
Jan 11 16:49:54 tomsk-PC kernel: Please see https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs for details.
Jan 11 16:49:54 tomsk-PC kernel: drm/i915 developers can then reassign to the right component if it's not a kernel issue.
Jan 11 16:49:54 tomsk-PC kernel: The GPU crash dump is required to analyze GPU hangs, so please always attach it.
Jan 11 16:49:54 tomsk-PC kernel: GPU crash dump saved to /sys/class/drm/card0/error
Jan 11 16:49:54 tomsk-PC kernel: i915 0000:00:02.0: [drm] Resetting chip for stopped heartbeat on rcs0
Jan 11 16:49:54 tomsk-PC kernel: i915 0000:00:02.0: [drm] UE4Editor[1954] context reset due to GPU hang
EDIT4: /sys/class/drm/card0/error is empty.
Last edited by tomsk (2021-01-11 15:55:03)
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
I can reproduce the issue with linux 5.6, will try with packages from the ALA from end of March 2020 when 5.6 was initially packaged.
Edit:
That rebuild worked so looks like gcc 10 is the cause.
Edit2:
Install gcc9 and gcc9-libs from the ALA as it is no longer packaged to save building it
pacman -U https://archive.archlinux.org/packages/g/gcc9-libs/gcc9-libs-9.3.0-4-x86_64.pkg.tar.zst https://archive.archlinux.org/packages/g/gcc9/gcc9-9.3.0-4-x86_64.pkg.tar.zst
Update the PKGBUILD to following
# 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=5.6.r0.g7111951b8d49
pkgrel=1
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
makedepends=('kmod' 'bc' 'libelf' 'git' 'gcc9')
options=('!strip')
source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=v5.6'
#'git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=vX.X.Y'
'config' # the main kernel config file
)
sha256sums=('SKIP'
'2a157fdbf3a6396e985db9ae5d11870a786717dca31de78cad09c06eb28761ff')
_kernelname=${pkgbase#linux}
pkgver() {
cd $_srcname
git describe --long | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g;s/\.rc/rc/'
}
prepare() {
mkdir -p bin
cd bin
ln -s /usr/bin/gcc-9 gcc
cd ..
export PATH="$PWD/bin:$PATH"
cd ${_srcname}
cp ../config .config
echo "Setting version..."
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
sed -i "s|^.*CONFIG_LOCALVERSION_AUTO.*|CONFIG_LOCALVERSION_AUTO=y|" ./.config
# prepare for build
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
scripts/config --disable CONFIG_KVM_WERROR
}
build() {
export PATH="$PWD/bin:$PATH"
cd $_srcname
make LOCALVERSION= bzImage modules
}
_package() {
pkgdesc="The Linux kernel and modules (git version)"
depends=('coreutils' 'kmod' 'initramfs')
optdepends=('crda: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices')
cd $_srcname
# get kernel version
_kernver="$(make LOCALVERSION= kernelrelease)"
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
local _modulesdir="$pkgdir/usr/lib/modules/$_kernver"
echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make -s image_name)" "$_modulesdir/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$_modulesdir/pkgbase"
echo "Installing modules..."
make LOCALVERSION= INSTALL_MOD_PATH="$pkgdir/usr" modules_install
# remove build and source links
rm "$_modulesdir"/{source,build}
echo "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}
_package-headers() {
pkgdesc="Header files and scripts for building modules for Linux kernel (git version)"
cd $_srcname
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
echo "Installing build files..."
install -Dt "$_builddir" -m644 .config Makefile Module.symvers System.map vmlinux
install -Dt "$_builddir/kernel" -m644 kernel/Makefile
install -Dt "$_builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$_builddir" -a scripts
# add objtool for external module building and enabled VALIDATION_STACK option
install -Dt "$_builddir/tools/objtool" tools/objtool/objtool
# add xfs and shmem for aufs building
mkdir -p "$_builddir"/{fs/xfs,mm}
echo "Installing headers..."
cp -t "$_builddir" -a include
cp -t "$_builddir/arch/x86" -a arch/x86/include
install -Dt "$_builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
install -Dt "$_builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$_builddir/net/mac80211" -m644 net/mac80211/*.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
echo "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$_builddir/{}" \;
echo "Removing unneeded architectures..."
local _arch
for _arch in "$_builddir"/arch/*/; do
[[ ${_arch} == */x86/ ]] && continue
echo "Removing $(basename "$_arch")"
rm -r "$_arch"
done
echo "Removing documentation..."
rm -r "$_builddir/Documentation"
echo "Removing broken symlinks..."
find -L "$_builddir" -type l -printf 'Removing %P\n' -delete
echo "Removing loose objects..."
find "$_builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
echo "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -bi "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
strip -v $STRIP_STATIC "$file" ;;
application/x-executable\;*) # Binaries
strip -v $STRIP_BINARIES "$file" ;;
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
done < <(find "$_builddir" -type f -perm -u+x ! -name vmlinux -print0)
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "_$builddir" "$pkgdir/usr/src/$pkgbase"
echo "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}
pkgname=("$pkgbase" "$pkgbase-headers")
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:
Easiest options then would be
makepkg -Crsi
To clean the source directory and start over.
Last edited by loqs (2021-01-11 22:21:05)
Offline
It worked, so now Im in:
[tomsk@tomsk-PC ~]$ uname -r
5.6.0-git
And Unreal Engine works, so now can I follow these steps? Or do I need to change some commands?
$ cd linux-git/src/linux
$ git checkout v5.7
$ cd ../..
$ makepkg -ersi #This is to confirm 5.7 as built on your system does have the issue, select the default option for all prompted options
Start bisection
$ cd linux-git/src/linux/
$ git bisect start
$ git bisect good v5.6
$ git bisect bad v5.7
$ cd ../..
$ makepkg -ersif
Bisection loop
$ cd linux-git/src/linux/
$ git bisect $result #Substitue good or bad here
$ cd ../..
$ makepkg -ersif #Repeat these four lines and test the generated kernel until git has found the bad commit
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
Yes you can follow the above now. Glad that worked for you.
Offline
Ah again I got these questions:
[tomsk@tomsk-PC linux-git]$ cd src/linux/
[tomsk@tomsk-PC linux]$ git checkout v5.7
Updating files: 100% (11591/11591), done.
Note: switching to 'v5.7'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 3d77e6a8804a Linux 5.7
[tomsk@tomsk-PC linux]$ git branch
* (HEAD detached at v5.7)
makepkg
master
[tomsk@tomsk-PC linux]$ cd ../..
[tomsk@tomsk-PC linux-git]$ makepkg -ersi
==> Making package: linux-git 5.6.r0.g7111951b8d49-1 (Tue 12 Jan 2021 12:55:31 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Updated version: linux-git 5.7.r0.g3d77e6a8804a-1
==> Removing existing $pkgdir/ directory...
==> Starting build()...
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/symbol.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --syncconfig Kconfig
*
* Restart config...
*
*
* CPU/Task time and stats accounting
*
Cputime accounting
> 1. Simple tick based cputime accounting (TICK_CPU_ACCOUNTING)
2. Full dynticks CPU time accounting (VIRT_CPU_ACCOUNTING_GEN)
choice[1-2?]: 1
Fine granularity task level IRQ time accounting (IRQ_TIME_ACCOUNTING) [Y/n/?] y
Enable periodic averaging of thermal pressure (SCHED_THERMAL_PRESSURE) [N/y/?] (NEW)
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
Press enter to select the default option for each choice.
Offline
Im compiling 5.6 was fine, 5.7 was bad, now Im in 50a5de895dbe
But compiling takes lot of time, because it uses only one core, why?
I already did:
export MAKEFLAGS="-j$(nproc)"
and if I run:
[tomsk@tomsk-PC ~]$ printenv | grep "MAKE"
MAKEFLAGS=-j4
You can see that MAKEFLAGS are in env variable.
Last edited by tomsk (2021-01-12 15:43:18)
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
You have to set MAKEFLAGS in makepkg.conf when you use makepkg.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Thank you
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
So I got it after whole day , this is my log:
v5.6 good
v5.7 bad
5.6.0-git-07482-g50a5de895dbe bad
5.6.0-git-03277-g56a451b78067 good
5.6.0-git-02103-gfd77be7bd43c good
5.6.0-rc2-git-01052-g33abcb1f5a17 good
5.6.0-git-01567-g59e7a8cc2dcf bad
5.6.0-rc2-git-00778-g217a485c8399 bad
5.6.0-rc2-git-00670-g9b234d264369 good
5.6.0-rc2-git-00724-gd191832d8136 bad
5.6.0-rc2-git-00697-gee2413eeed76 good
5.6.0-rc2-git-00710-ge3e7aeec3281 bad
5.6.0-rc2-git-00703-gef398881d27d bad
5.6.0-rc2-git-00700-g2920516b2f71 bad
5.6.0-rc2-git-00699-g64dc802aa5ac bad
5.6.0-rc2-git-00698-g47f8253d2b89 bad
And this is message from bisect:
47f8253d2b8947d79fd3196bf96c1959c0f25f20 is the first bad commit
commit 47f8253d2b8947d79fd3196bf96c1959c0f25f20
Author: Prathap Kumar Valsan <prathap.kumar.valsan@intel.com>
Date: Fri Mar 6 00:09:57 2020 +0000
drm/i915/gen7: Clear all EU/L3 residual contexts
On gen7 and gen7.5 devices, there could be leftover data residuals in
EU/L3 from the retiring context. This patch introduces workaround to clear
that residual contexts, by submitting a batch buffer with dedicated HW
context to the GPU with ring allocation for each context switching.
This security mitigation changes does not triggers any performance
regression. Performance is on par with current drm-tips.
v2: Add igt generated header file for CB kernel assembled with Mesa tool
and addressed use of Kernel macro for ptr_align comment.
v3: Resolve Sparse warnings with newly generated, and imported CB
kernel.
v4: Include new igt generated CB kernel for gen7 and gen7.5. Also
add code formatting and compiler warnings changes (Chris Wilson)
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Prathap Kumar Valsan <prathap.kumar.valsan@intel.com>
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Cc: Chris Wilson <chris.p.wilson@intel.com>
Cc: Balestrieri Francesco <francesco.balestrieri@intel.com>
Cc: Bloomfield Jon <jon.bloomfield@intel.com>
Cc: Dutt Sudeep <sudeep.dutt@intel.com>
Acked-by: Chris Wilson <chris@chris-wilso.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200306000957.2836150-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/Makefile | 1 +
drivers/gpu/drm/i915/gt/gen7_renderclear.c | 402 ++++++++++++++++++++++++
drivers/gpu/drm/i915/gt/gen7_renderclear.h | 15 +
drivers/gpu/drm/i915/gt/hsw_clear_kernel.c | 61 ++++
drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 17 +-
drivers/gpu/drm/i915/gt/intel_ring_submission.c | 3 +-
drivers/gpu/drm/i915/gt/ivb_clear_kernel.c | 61 ++++
7 files changed, 556 insertions(+), 4 deletions(-)
create mode 100644 drivers/gpu/drm/i915/gt/gen7_renderclear.c
create mode 100644 drivers/gpu/drm/i915/gt/gen7_renderclear.h
create mode 100644 drivers/gpu/drm/i915/gt/hsw_clear_kernel.c
create mode 100644 drivers/gpu/drm/i915/gt/ivb_clear_kernel.c
And I found out that during testing that Unreal Engine works even on newest kernel, but GPU hangs when Unreal Engine is maximized, or when I maximize / minimize it, if I run Unreal Engine even on newest kernel in windowed mode it works.
Last edited by tomsk (2021-01-13 00:09:32)
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
If you build 5.7 with just the bad commit reverted can you reproduce the issue?
git checkout v5.7
git revert -n 47f8253d2b8947d79fd3196bf96c1959c0f25f20
Last edited by loqs (2021-01-13 02:26:39)
Offline
If you build 5.7 with just the bad commit reverted can you reproduce the issue?
git checkout v5.7 git revert -n 47f8253d2b8947d79fd3196bf96c1959c0f25f20
It works on v5.7 without that commit.
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
Offline
So if I understand correctly Intel knows about this issue since November 2020 and there is still no update?
I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint
Offline
You can try this patch: https://lore.kernel.org/lkml/2020110717 … 11@rfwz62/
It has landed in drm-tip yesterday: https://github.com/freedesktop/drm-tip/ … 0f83cd4b47, so it is most likely on its way for one of the next kernel versions. (I'd guess 5.12 or 5.13)
Last edited by progandy (2021-01-13 15:20:49)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline