You are not logged in.

#1 2019-08-16 21:49:28

snackattack
Member
Registered: 2017-11-04
Posts: 7

[SOLVED] Thinkpad dock external display broken since linux 5.2

Connecting to an external display through a Thinkpad dock is broken on recent versions of linux. I first noticed this when updating to linux 5.2.5. I just updated to 5.2.8 and it is still broken.

In particular, I can still see and connect to the monitor through xrandr; nothing in the xrandr output indicates anything is wrong. However, the external monitor reports no input and remains blank.

Others on reddit have reported experiencing the same problem: https://www.reddit.com/r/archlinux/comm … ux_update/

I am using a Thinkpad T480 laptop and Thinkpad Ultra Docking Station (US model), but from the reddit thread it appears this issue affects other models as well.

The thinkpad dock works fine on the linux-lts kernel.

I feel like I should make a bug report somewhere, but am not sure whether to do so at the arch linux package, or somewhere upstream.

I have saved some dmesg output here: https://gist.github.com/jackkamm/db9ff0 … 1e54c5a5da
The line that starts with "[  174.329323]" indicates when I plugged in the Thinkpad dock.
The following line in particular looks intriguing/relevant:

[  175.382231] typec_displayport port1-partner.0: failed to enter mode

Last edited by snackattack (2019-09-25 03:29:40)

Offline

#2 2019-08-16 22:56:17

loqs
Member
Registered: 2014-03-06
Posts: 18,047

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

Welcome to the arch linux forums snackattack. In https://bbs.archlinux.org/viewtopic.php … 4#p1857864 I provided instructions to bisect between 5.2.4 and 5.2.5 which coincidentally should also locate the source of your issue.
You can then report the issue upstream to the kernel developers.

Offline

#3 2019-08-18 21:26:01

snackattack
Member
Registered: 2017-11-04
Posts: 7

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

This issue has been fixed in the most recent update to linux-firmware (20190815).

Thanks for the help anyway smile

Offline

#4 2019-08-19 17:47:05

snackattack
Member
Registered: 2017-11-04
Posts: 7

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

Sorry, I was mistaken. When I was debugging at home this weekend, the issue seemed to have been solved by the update, but today in the office it's still broken -- might be related to my office monitor as well as the Thinkpad dock. I will update again when I've had a chance to git bisect the kernel (though having to do it while I'm at work might slow me down a bit...)

Last edited by snackattack (2019-08-19 17:51:15)

Offline

#5 2019-09-04 01:04:15

snackattack
Member
Registered: 2017-11-04
Posts: 7

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

My initial post seems incorrect -- it looks like the external display has been broken since linux 5.2, not 5.2.5. I've updated the title to reflect this.

I've been following loq's directions to compile linux through makepkg, and noticed that all linux versions I tried since 5.2 are broken, but 5.1.16 works.

Not sure how I got confused into think the breakage happened on 5.2.5. It's possible I just didn't update enough to notice. In my /var/cache/pacman/pkg, I have versions 5.1.16, 5.2.3, then 5.2.5, so I definitely missed a few updates. Or perhaps there is some bad interaction with another package going on here.

Should I proceed to git bisect between 5.2 and 5.1.16? The git log graph beneath 5.2 looks a bit daunting, so I'm not sure if this is a reasonable approach -- I've never tried to git bisect such a large graph, and it also takes a while to compile/test each commit.

Offline

#6 2019-09-06 22:06:26

loqs
Member
Registered: 2014-03-06
Posts: 18,047

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

Sorry for the late response,  the following is the modified instructions for between 5.1 and 5.2.
5.1.16 is branched from 5.2 so the bisection would take you up to 5.1 where the branches meet.
Bisecting between 5.1 and 5.2 should save a bisection step of having to build 5.1.16.

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"
$ cd packages/trunk
$ git checkout 752f19a3aeb77684fb3915a8958a8615c64fde37 #5.1.16.arch1-1
$ cd ../..
$ cp -r packages/trunk linux-git
$ rm -rf packages
$ cd linux-git
# Edit replace the PKGBUILD and 90-linux.hook with the ones below
$ makepkg -rsi #This is to confirm 5.1 as built on your system does not have the issue.  Update bootloader for new kernel if needed

$ cd linux-git/src/linux
$ git checkout v5.2
$ cd ../..
$ makepkg -ersi #This is to confirm 5.2 as built on your system does have the issue select the default option for all prompted options

$ cd linux-git/src/linux/
$ git bisect start
$ git bisect good v5.1
$ git bisect bad v5.2
$ cd ../..
$ makepkg -ersif

$ 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

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=5.1.r0.ge93c9c99a629
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=v5.1'
        #'git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=X.X.Y'
  'config'   # 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'
            'd8eac4a183fbc5a6391a21beb9be1c9b24b7ff2deeb3cedb8b4635722ddcede9'
            '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 .config

  # set localversion to git commit
  sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
  sed -i "s|^.*CONFIG_LOCALVERSION_AUTO.*|CONFIG_LOCALVERSION_AUTO=y|" ./.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 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')
  backup=("etc/mkinitcpio.d/${pkgbase}.preset")
  install=linux.install

  cd ${_srcname}

  # get kernel version
  _kernver="$(make kernelrelease)"
  _kernver=${_kernver%-dirty} #https://bbs.archlinux.org/viewtopic.php?id=236702
  _basekernel="$(make kernelversion)"
  _basekernel=${_basekernel%.*}

  mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
  make 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)"

  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/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)"

  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:

90-linux.hook

[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/vmlinuz-%PKGBASE%
Target = usr/lib/initcpio/*

[Action]
Description = Updating %PKGBASE% initcpios...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p %PKGBASE%

Last edited by loqs (2019-09-06 22:06:45)

Offline

#7 2019-09-25 03:29:19

snackattack
Member
Registered: 2017-11-04
Posts: 7

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

Issue has been fixed since updating to 5.3.

Offline

#8 2019-09-25 18:03:02

nickl
Member
Registered: 2019-09-25
Posts: 3

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

I have been seeing very similar behavior, and have been trying to track it down. I even started the bisection process. What I finally realized after lots of testing what that the dock works fine if it's connected during boot, but if I connect it later, and/or unplug and replug it, I get the above behavior.  This holds true for all the kernels I've tested, which include 4.19-73-lts, 4.19-75-lts, 5.1, 5.2, and 5.3.

snackattack: Are you sure it's "just working" for you now? Have you tried unplugging and replugging the dock, and/or plugging it in after boot?

Any suggestions here would be much appreciated.

Offline

#9 2019-09-26 12:19:58

wzrdtales
Member
Registered: 2017-03-14
Posts: 62

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

No it is not fixed... . Can report the same problem, just tried on the latest 5.3 kernel, still broken. 4.19.75-1-lts works though.

Last edited by wzrdtales (2019-09-26 12:25:48)

Offline

#10 2019-09-26 18:56:27

nickl
Member
Registered: 2019-09-25
Posts: 3

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

wzrdtales: does it work to unplug/replug it for you in 4.19.75-1? I haven't managed to get that to work on any version at all.

I've asked on the kernel bugtracker here and am going to test out the patch suggested in the final comment there in the next couple of days as soon as I find time.  I'll report back.

Offline

#11 2019-09-26 20:46:39

wzrdtales
Member
Registered: 2017-03-14
Posts: 62

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

Yes, the LTS works perfectly fine. Can unplug and replug as often as I want, it works. This problem also only appeared after I connected a display to the docking station (usb c connected), without the display the replugging worked with the docking perfectly fine as well.

Offline

#12 2019-09-26 20:53:01

snackattack
Member
Registered: 2017-11-04
Posts: 7

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

nickl: Your issue sounds different than the one I originally reported. All the lts kernels and 5.1 worked fine for me. On 5.3, I can confirm that plug/unplug/replug works for me.

wzrdtales: It's certainly possible you have the same issue even though it's not solved for you -- I witnessed inconsistent behavior across different monitors. We might need more details to confirm it indeed is the same issue.

If it is in fact the same issue, I'm not sure whether the correct etiquette is to unmark this thread solved, or whether wzrdtales should start a new issue.

Last edited by snackattack (2019-09-26 20:55:34)

Offline

#13 2019-09-29 10:37:05

wzrdtales
Member
Registered: 2017-03-14
Posts: 62

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

I've had some time today to test it. LTS works fine, however, 5.1. is broken as well for me. I think I will open a new issue.

https://bbs.archlinux.org/viewtopic.php … 4#p1865954

Last edited by wzrdtales (2019-09-29 11:23:32)

Offline

#14 2019-10-08 11:10:17

agrajag24
Member
Registered: 2019-10-08
Posts: 1

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

I've been running into similar issues. All ports on the dock work but for HDMI and display ports. xrandr setup seems fine. Monitors show no input signal though.

linux-lts did not help here either. Would somebody please confirm if their setup is still working on the latest linux-lts 4.19.77-1-lts?

UPDATE: I downgraded to an older linux-lts and displays seem to work now.

The packages I downgraded and their versions are:

linux-lts-4.19.67-1
acpi_call-lts-1.1.0-92
nvidia-lts-1_430.40-3
nvidia-utils-430.40-2

You can find them on the arch linux archive repository

Last edited by agrajag24 (2019-10-08 12:49:27)

Offline

#15 2020-01-27 17:27:12

t638403
Member
Registered: 2020-01-27
Posts: 24

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

I ran into this same issue today, created a post also: https://bbs.archlinux.org/viewtopic.php … 0#p1884950

Last edited by t638403 (2020-01-27 17:27:31)

Offline

#16 2020-02-17 09:59:19

t638403
Member
Registered: 2020-01-27
Posts: 24

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

Since linux lts kernel package is recently upgraded to 5.4 this problem seems to be in LTS to. Anybody else experiencing this?

Last edited by t638403 (2020-02-17 09:59:59)

Offline

#17 2020-03-11 16:43:09

wzrdtales
Member
Registered: 2017-03-14
Posts: 62

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

Yes, see also: https://bbs.archlinux.org/viewtopic.php?id=249553

It got worse with the LTS now, after undocking it gets completely unusable from all points of views. So i am currently forced to shutdown everytime I undock...

Didn't get any new responses to this as well... . Maybe a new thread is needed.

Offline

#18 2020-03-13 08:06:26

wzrdtales
Member
Registered: 2017-03-14
Posts: 62

Re: [SOLVED] Thinkpad dock external display broken since linux 5.2

I just debugged it a bit more. It is broken down to 4.20. 4.19 was the last lts i used that worked. didn't tested with self compiled 4.19 yet. However, the latest non lts 5.5.8 seems to work again. I will see to validate this.

Offline

Board footer

Powered by FluxBB