You are not logged in.

#76 2020-02-09 03:39:10

Exeat
Member
Registered: 2019-05-28
Posts: 5

Re: Black screen on lid open

Pergravis wrote:

This seems to have fixed the problem on my E485

Offline

#77 2020-02-29 17:31:34

sinatosk
Member
Registered: 2010-11-28
Posts: 107

Re: Black screen on lid open

Using kernel 5.5.0, 5.5.3 5.5.5, 5.5.6 and 5.5.7 hibernation and suspension still works for me

and the error from 5.5.0 and showing in 5.5.3 ( I didn't use 5.5.2 or 5.5.1 )

[drm:dm_helpers_parse_edid_caps [amdgpu]] *ERROR* Couldn't read SADs: -2

is gone since 5.5.5 ( I didn't use 5.5.4 )

Last edited by sinatosk (2020-03-01 09:41:43)

Offline

#78 2020-03-22 18:07:36

Fabi0_Z
Member
Registered: 2019-02-05
Posts: 12

Re: Black screen on lid open

I've the same problem, I'm running a laptop with an AMD A9 APU and a dedicated AMD GPU, kernel 5.5.10-arch1-1

When I resume the laptop from suspension the screen remains black, but I'm still able to login and reboot my laptop from terminal, so I guess it's only a video issue. I've tried various boot parameters combination from the thread but non of them has worked, any suggestions?

Offline

#79 2020-03-22 19:35:41

davc0n
Member
Registered: 2020-02-01
Posts: 64

Re: Black screen on lid open

Hi Fabi0_Z,

Did you try the workaround written here ?

Offline

#80 2020-03-24 11:50:33

Fabi0_Z
Member
Registered: 2019-02-05
Posts: 12

Re: Black screen on lid open

davc0n wrote:

Hi Fabi0_Z,

Did you try the workaround written here ?

If you talk about the early KMS yes, but didn't change anything

I've added

amdgpu

to mkinitcpio.conf and then run

mkinitcpio -p linux

, rebooted but both resume after suspend and hibernation still doesn't work

Offline

#81 2020-03-25 17:48:30

davc0n
Member
Registered: 2020-02-01
Posts: 64

Re: Black screen on lid open

I am talking about switching to another tty before suspend (FYI: with CTRL+ALT+F2 for example). After resume, go back to the previous tty window (eg. CTRL+ALT+F1). It's just a workaround, but it's better than nothing. Dunno about hibernation, works fine here.

Offline

#82 2020-03-28 15:48:34

Fabi0_Z
Member
Registered: 2019-02-05
Posts: 12

Re: Black screen on lid open

davc0n wrote:

I am talking about switching to another tty before suspend (FYI: with CTRL+ALT+F2 for example). After resume, go back to the previous tty window (eg. CTRL+ALT+F1). It's just a workaround, but it's better than nothing. Dunno about hibernation, works fine here.

Tried today, doesn't change anything, same behavior as using the normal sleep button from a gnome session

Offline

#83 2020-04-11 10:22:32

Fabi0_Z
Member
Registered: 2019-02-05
Posts: 12

Re: Black screen on lid open

I've found out that there's a fix for my issue, but I've no idea on how to apply it

https://cgit.freedesktop.org/drm/drm/co … 98c59022a7

Offline

#84 2020-04-11 16:33:07

davc0n
Member
Registered: 2020-02-01
Posts: 64

Re: Black screen on lid open

Fabi0_Z wrote:

I've found out that there's a fix for my issue, but I've no idea on how to apply it

https://cgit.freedesktop.org/drm/drm/co … 98c59022a7

It's already available in linux kernel, no need to apply.

Last edited by davc0n (2020-04-19 17:08:40)

Offline

#85 2020-04-11 18:09:21

Fabi0_Z
Member
Registered: 2019-02-05
Posts: 12

Re: Black screen on lid open

Yeah, I've discovered the hard way, I've built a custom kernel from the linux PKGBUILD including the patch I've mentioned in the last message, everything was working fine, then I've tried to suspend on the stock kernel just to be proud of my hard work, and noticed that was working there too sad

Offline

#86 2020-04-23 12:07:46

Jolt
Member
Registered: 2020-04-23
Posts: 1

Re: Black screen on lid open

Pergravis wrote:

Yeah, thank you very much!

I've searched that for several weeks.
On my Honor MagicBook 14 (a.k.a. Huawei MateBook 14) on Ryzen 3500U works well.

I knew that problem in opengl visual effects, because suspension/hibernation worked well only on xrender. But on xrender i had visual artefacts on watching videos.
Now it's perfect!

Last edited by Jolt (2020-04-23 12:08:23)

Offline

#87 2020-04-29 15:34:00

jonny88
Member
Registered: 2020-04-28
Posts: 2

Re: Black screen on lid open

Hi, I followed this topic here 'cause I had the same problem (screen stays black after suspend / hibernate). After various attempts I was able to solve this issue. So I want to share it with you. My system is a ThinkPad T495 (details see below).

1. I added amdgpu to MODULES in /etc/mkinitcpio.conf to enable KMS
2. I created the xorg config file 20-amdgpu.conf with the following content

$ cat /etc/X11/xorg.conf.d/20-amdgpu.conf
Section "Device"
        Identifier "AMDGPU"
        Driver "amdgpu"
        Option "DRI" "3"
        Option "TearFree" "true"
EndSection

With these settings suspend and hibernate works without problems. Maybe this helps you (please let me know if you need more informations).

Here now the details about my system:

$ uname -srm
Linux 5.6.6-arch1-1 x86_64

$ lspci -k |grep -EA3 'VGA|3D|Display'
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev d1)
        Subsystem: Lenovo Picasso
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

$ sudo dmidecode -t system
System Information
        Manufacturer: LENOVO
        Product Name: 20NJCTO1WW
        Version: ThinkPad T495

$ sudo dmidecode -s processor-version
AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx

Installed package versions:

amd-ucode 20200316.8eb0b28-1
glu 9.0.1-1
libva-mesa-driver 20.0.5-1
mesa 20.0.5-1
mesa-vdpau 20.0.5-1
xf86-video-amdgpu 19.1.0-1

Offline

#88 2020-05-08 19:12:16

plant67
Member
Registered: 2020-05-08
Posts: 1

Re: Black screen on lid open

jonny88 wrote:

Hi, I followed this topic here 'cause I had the same problem (screen stays black after suspend / hibernate). After various attempts I was able to solve this issue. So I want to share it with you. My system is a ThinkPad T495 (details see below).

1. I added amdgpu to MODULES in /etc/mkinitcpio.conf to enable KMS
2. I created the xorg config file 20-amdgpu.conf with the following content

$ cat /etc/X11/xorg.conf.d/20-amdgpu.conf
Section "Device"
        Identifier "AMDGPU"
        Driver "amdgpu"
        Option "DRI" "3"
        Option "TearFree" "true"
EndSection

With these settings suspend and hibernate works without problems. Maybe this helps you (please let me know if you need more informations).

Can confirm that this solution works on my Ryzen 7 3700U E495 running the 5.6.11 kernel. Thank you!

Last edited by plant67 (2020-05-08 19:13:17)

Offline

#89 2020-05-13 20:04:59

jman6495
Member
Registered: 2011-06-10
Posts: 9

Re: Black screen on lid open

Although applying the above modifications does mean the screen actually turns on after resume, it doesn't fix the issue for me. I just get a black screen and cannot move to ttys

preresume i get :

[  165.074817] ACPI: EC: interrupt blocked
[  206.072725] ACPI: EC: interrupt unblocked
[  206.123640] [drm] PCIE GART of 1024M enabled (table at 0x000000F400900000).
[  206.123678] [drm] PSP is resuming...
[  206.143707] [drm] reserve 0x400000 from 0xf47f800000 for PSP TMR
[  206.152597] [drm] psp command (0x5) failed and response status is (0xFFFF0007)
[  206.353058] amdgpu 0000:04:00.0: RAS: optional ras ta ucode is not available
[  206.613368] [drm] kiq ring mec 2 pipe 1 q 0
[  206.848351] amdgpu 0000:04:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring gfx test failed (-110)
[  206.848403] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block <gfx_v9_0> failed -110
[  206.848455] [drm:amdgpu_device_resume [amdgpu]] *ERROR* amdgpu_device_ip_resume failed (-110).
[  206.848460] PM: dpm_run_callback(): pci_pm_resume+0x0/0x80 returns -110
[  206.848461] PM: Device 0000:04:00.0 failed to resume: error -110

meanwhile, on resume dmesg is spammed with :

[  229.515833] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22)
[  229.515844] amdgpu 0000:04:00.0: couldn't schedule ib on ring <sdma0>

On a HP Envy x360 13, Ryzen 3500U

Offline

#90 2020-05-16 18:56:02

aleixsr
Member
Registered: 2020-05-16
Posts: 1

Re: Black screen on lid open

I'm exactly on same situation. Also tried several linux versions and distros, still no luck

On a Redmibook Ryzen Edition.

jman6495 wrote:

Although applying the above modifications does mean the screen actually turns on after resume, it doesn't fix the issue for me. I just get a black screen and cannot move to ttys

preresume i get :

[  165.074817] ACPI: EC: interrupt blocked
[  206.072725] ACPI: EC: interrupt unblocked
[  206.123640] [drm] PCIE GART of 1024M enabled (table at 0x000000F400900000).
[  206.123678] [drm] PSP is resuming...
[  206.143707] [drm] reserve 0x400000 from 0xf47f800000 for PSP TMR
[  206.152597] [drm] psp command (0x5) failed and response status is (0xFFFF0007)
[  206.353058] amdgpu 0000:04:00.0: RAS: optional ras ta ucode is not available
[  206.613368] [drm] kiq ring mec 2 pipe 1 q 0
[  206.848351] amdgpu 0000:04:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring gfx test failed (-110)
[  206.848403] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block <gfx_v9_0> failed -110
[  206.848455] [drm:amdgpu_device_resume [amdgpu]] *ERROR* amdgpu_device_ip_resume failed (-110).
[  206.848460] PM: dpm_run_callback(): pci_pm_resume+0x0/0x80 returns -110
[  206.848461] PM: Device 0000:04:00.0 failed to resume: error -110

meanwhile, on resume dmesg is spammed with :

[  229.515833] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22)
[  229.515844] amdgpu 0000:04:00.0: couldn't schedule ib on ring <sdma0>

On a HP Envy x360 13, Ryzen 3500U

Offline

#91 2020-05-17 10:23:06

davc0n
Member
Registered: 2020-02-01
Posts: 64

Re: Black screen on lid open

As of today, on a thinkpad t495, both suspend and hibernate are working fine without any workaround (kernel 5.6.13-arch1-1)

Last edited by davc0n (2021-06-08 21:22:11)

Offline

#92 2020-08-30 12:18:48

PanodGO
Member
Registered: 2020-03-21
Posts: 16

Re: Black screen on lid open

plant67 wrote:
jonny88 wrote:

Hi, I followed this topic here 'cause I had the same problem (screen stays black after suspend / hibernate). After various attempts I was able to solve this issue. So I want to share it with you. My system is a ThinkPad T495 (details see below).

1. I added amdgpu to MODULES in /etc/mkinitcpio.conf to enable KMS
2. I created the xorg config file 20-amdgpu.conf with the following content

$ cat /etc/X11/xorg.conf.d/20-amdgpu.conf
Section "Device"
        Identifier "AMDGPU"
        Driver "amdgpu"
        Option "DRI" "3"
        Option "TearFree" "true"
EndSection

With these settings suspend and hibernate works without problems. Maybe this helps you (please let me know if you need more informations).

Can confirm that this solution works on my Ryzen 7 3700U E495 running the 5.6.11 kernel. Thank you!

Yes I can confirm as well! My problem was even harder cos it wen't black just after boot on my Thinkpad t495s. There must be something due to graphics on latest kernel.

You solution worked like a charm though. Thanks a lot!!

Offline

#93 2021-05-06 15:21:07

4internetanonymity
Member
Registered: 2009-07-09
Posts: 51

Re: Black screen on lid open

I've tried lots of kernels & fixes, including amd_iommu=off, to no avail. When I add the amdgpu.dc=0 flag, I can't even boot; I just get a blank screen.
This is the most exhaustive thread on this issue, and hoping they come up with something soon: https://gitlab.freedesktop.org/drm/amd/-/issues/1230

Offline

#94 2021-06-08 13:37:53

gofree
Member
From: Slovakia
Registered: 2008-07-26
Posts: 50

Re: Black screen on lid open

Im trying to kinda compile my first kernel applying these 8 patches mentioned in https://gitlab.freedesktop.org/drm/amd/-/issues/1230


very crude PKGBUILD based on linux-zen anyone wants to check and improve ? build in progress.....so no results yet

# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgbase=linux-zen
pkgver=5.12.9.zen1
pkgrel=1
pkgdesc='Linux ZEN'
_srctag=v${pkgver%.*}-${pkgver##*.}
url="https://github.com/zen-kernel/zen-kernel/commits/$_srctag"
arch=(x86_64)
license=(GPL2)
makedepends=(
  bc kmod libelf pahole cpio perl tar xz
  xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick
  git
)
options=('!strip')
_srcname=zen-kernel
source=(
  "$_srcname::git+https://github.com/zen-kernel/zen-kernel?signed#tag=$_srctag"
  config         # the main kernel config file
  '0001-ACPI: processor idle: Fix up C-state latency if not ordered.patch'
  '0002-v5-usb-pci-quirks-disable-D3cold-on-xhci-suspend-for-s2idle-on-AMD-Renoir.diff'
  '0003-PCI-quirks-Quirk-PCI-d3hot-delay-for-AMD-xhci.diff'
  '0004-nvme-pci_look_for_StorageD3Enable_on_companion_ACPI_device_instead.patch'
  '0005-v5-1-2-acpi-PM-Move-check-for-_DSD-StorageD3Enable-property-to-acpi.diff'
  '0006-v5-2-2-acpi-PM-Add-quirks-for-AMD-Renoir-Lucienne-CPUs-to-force-the-D3-hint.diff'
  '0007-ACPI_PM_s2idle_Add_missing_LPS0_functions_for_AMD.patch'
  '0008-2-2-V2-platform-x86-force-LPS0-functions-for-AMD.diff'
)
validpgpkeys=(
  'ABAF11C65A2970B130ABE3C479BE3E4300411886'  # Linus Torvalds
  '647F28654894E3BD457199BE38DBBDC86092693E'  # Greg Kroah-Hartman
  'A2FF3A36AAA56654109064AB19802F8B0D70FC30'  # Jan Alexander Steffens (heftig)
)
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"

prepare() {
  cd $_srcname

  echo "Setting version..."
  scripts/setlocalversion --save-scmversion
  echo "-$pkgrel" > localversion.10-pkgrel
  echo "${pkgbase#linux}" > localversion.20-pkgname

  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = *.patch ]] || continue
    echo "Applying patch $src..."
    patch -Np1 < "../$src"
  done

  echo "Setting config..."
  cp ../config .config
  make olddefconfig

  make -s kernelrelease > version
  echo "Prepared $pkgbase version $(<version)"
}

build() {
  cd $_srcname
  make all
  make modules
  make htmldocs
}

_package() {
  pkgdesc="The $pkgdesc kernel and modules"
  depends=(coreutils kmod initramfs)
  optdepends=('crda: to set the correct wireless channels of your country'
              'linux-firmware: firmware images needed for some devices')
  provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE VHBA-MODULE)
  replaces=()

  cd $_srcname
  local kernver="$(<version)"
  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 INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install

  # remove build and source links
  rm "$modulesdir"/{source,build}
}

_package-headers() {
  pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
  depends=(pahole)

  cd $_srcname
  local builddir="$pkgdir/usr/lib/modules/$(<version)/build"

  echo "Installing build files..."
  install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
    localversion.* version 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 "Stripping vmlinux..."
  strip -v $STRIP_STATIC "$builddir/vmlinux"

  echo "Adding symlink..."
  mkdir -p "$pkgdir/usr/src"
  ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
}

_package-docs() {
  pkgdesc="Documentation for the $pkgdesc kernel"

  cd $_srcname
  local builddir="$pkgdir/usr/lib/modules/$(<version)/build"

  echo "Installing documentation..."
  local src dst
  while read -rd '' src; do
    dst="${src#Documentation/}"
    dst="$builddir/Documentation/${dst#output/}"
    install -Dm644 "$src" "$dst"
  done < <(find Documentation -name '.*' -prune -o ! -type d -print0)

  echo "Adding symlink..."
  mkdir -p "$pkgdir/usr/share/doc"
  ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
}

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:

Last edited by gofree (2021-06-08 14:25:15)

Offline

Board footer

Powered by FluxBB