NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.01k stars 13.36k forks source link

Intel i915: *ERROR* failed to enable link training #36392

Open coretemp opened 6 years ago

coretemp commented 6 years ago

Issue description

[150056.612876] [drm:intel_dp_start_link_train [i915]] *ERROR* failed to enable link training

Issue is more widely reported, but I have never seen a fix for it.

Most visible user impact is that the service redshift stopped working.

Steps to reproduce

Unknown, but try to log in and out 3 times in rapid succession from a Plasma5 session.

Technical details

rvolosatovs commented 6 years ago

This started happening to my system on waking up from suspend. I am left with a black screen with reboot being the only option. No possibility to switch to a tty. It does not happen every time, but does very often and is extremely annoying.

wiwie commented 6 years ago

@rvolosatovs same here. sometimes a switch to a tty helps thoughl.

BenSchZA commented 5 years ago

I'm getting the same issue. Any known fixes? This thread has been quiet for a while now.

OS: NixOS 19.03.172463.6e29f22551d (Koi) x86_64 Host: XPS 13 9360 Kernel: 4.9.173 DE: Pantheon WM: Mutter(Gala)

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
jmgrosen commented 3 years ago

Anyone else know anything to help this? I get it all the time, which kills my X session and all its open windows, which is very frustrating.

OS: NixOS 21.03pre252388.069f183f16c (Okapi) x86_64 Host: Thinkpad X1 Yoga Gen 5 Kernel: 5.9.8

dmvianna commented 3 years ago

I'm on OS: NixOS unstable Host: Thinkpad X1 Carbon Gen 6 Kernel: 5.4.96

Upgraded yesterday (23 Mar 2021).

I get this after sleep. The laptop screen goes blank. However the external screens continue to work (I have two). I'm using Wayland (Sway), and the screen arrangement that I set prior to sleep is lost. Switching to a console (Ctrl-Super-Alt-F1) shows me the error, and switching to another console (Ctrl-Super-Alt-F2) works as usual. From there I can kill Sway and everything returns to normal.

dmvianna commented 3 years ago

Seems to be fixed from Kernel 5.11 -- from freedesktop.org.

jmgrosen commented 3 years ago

I still run into this issue on 5.11.8.

Bipul-Harsh commented 3 years ago

I have Ubuntu 20.04 dual booted with Windows 10, I am also facing same issue as on cold boot my laptop screen doesnt display anything not even boot menu, after several force shutdown and boot up it works. And after suspend it takes about 4-5 minutes for screen to display login page.

Following is the error I got in logs software during time period when my screen wasnt displaying anything

i915 0000:00:02.0: [drm] ERROR failed to enable link training

Any help is appreciable.

benmccann commented 3 years ago

I get this as well. There appears to be several open bug for it in the drm issue tracker

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

jmjw commented 2 years ago

Still occurs with Linux xxxxxxxx 5.14.0-1024-oem #26-Ubuntu SMP Thu Feb 17 14:35:50 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Ubuntu 20.04 HP Elitebook 840 G7

eramosr16 commented 2 years ago

Still having this issue in:

seqizz commented 2 years ago

This is happening %80 of the time after undocking my XPS with "some" kernels, I stopped caring and just restarting X. Feels like this is the price of using Linux on desktop after some time..

Even people from other distros writing here because it shows up on google search. I could only suggest reporting issues to upstream or checking the current issues.

eramosr16 commented 2 years ago

Guys I was able to overcome this installing the proprietary driver instead of the community one

seqizz commented 2 years ago

Guys I was able to overcome this installing the proprietary driver instead of the community one

This issue is about intel graphics which uses i915 module. Afaik Intel doesn't provide any proprietary drivers. Of course if you have another card you can use it to not see this issue.

eramosr16 commented 2 years ago

Guys I was able to overcome this installing the proprietary driver instead of the community one

This issue is about intel graphics which uses i915 module. Afaik Intel doesn't provide any proprietary drivers. Of course if you have another card you can use it to not see this issue.

Yeah, I understand and sorry for the lack of details in my first comment, like other people here I was having this very same error, my laptop had an Nvidia graphics card and the Intel chipset, looking for solutions to overcome this I tried installing the nvidia propietary driver replacing the default that came on the installation and that did the trick not sure what happened but my laptop is working properly, the error is gone.

Garionion commented 2 years ago

I have this exact problem too on a XPS 13 Plus

seqizz commented 2 years ago

Just wanted to check in, I didn't see this problem for a while (or it was too rare that I didn't care). My current config is:

    kernelPackages = unstable.linuxPackages_latest;
    kernelParams = [
      "i915.enable_fbc=1"
      "i915.enable_guc=2"
      "i915.modeset=1"
      "video=eDP-1:1920x1200@60"
    ];

YMMV of course, looks like stars needs to be aligned correctly for one to be lucky.

// Edit: Nevermind looks like I jinxed it, now it started again 🤡

mhgue commented 2 years ago

Same issue with black screen and a single line ending on [drm] *ERROR* failed to enable link training on a LENOVO Ideapad S530 running Ubuntu 22.04.1 LTS with Kernel 5.15.0-46-generic. Occurred during a restart caused by system update. See

Seems to be a common problem under different boundary conditions.

fabrizioschiano commented 1 year ago

Same problem here.

OS: Ubuntu 22.04
Kernel: 5.15.0-58-generic
Nvidia driver: 520.61.05

I noticed that this happens (supposedly) more often when I suspend the laptop and it is connected to a docking station and suspended. Then, on wake up I got this problem.

LANopop commented 1 year ago

Same issue for me

Laptop: XPS 15 9520
OS: Ubuntu 22.10
Kernel: 5.19.0-23-generic
Nvidia driver: 525.78.01

my machine almost always does not come out of sleep and usb c connection to the monitor is not always working

error messages i see are

i915 0000:00:02.0: [drm] *ERROR* [ENCODER:271:DDI TC2/PHY TC2][DPRX] Failed to enable link training
i915 0000:00:02.0: [drm] *ERROR* failed to allocate vcpi

and

i915 0000:00:02.0: [drm] *ERROR* Got unknown reply 0x00 (GET_MSG_TRANSACTION_VERSION)

hadley8899 commented 1 year ago

Also getting this issue, Randomly the external screen (Connect via USB C to DP) will go blank and disconnect then I have to wait a few minutes and it will reconnect its self. Very annoying

(Dell XPS 9520)

KenMacD commented 1 year ago

I've had issues with laptop + multiple external monitors for years. My workaround is that I now always switch to a text virtual console. I switch to ctrl+alt+F2, plug in my dock, give things a few seconds to settle, then switch back to my normal one. I do the same before I unplug.

I also do not use any automatic layout program. I did use kanshi before, but I find it more likely to expose issues that I expect are race conditions in setting up and moving two external monitors at the same time.

Jack-Chou-HZ commented 1 year ago

I have the same issue, with Ubuntu 22.04.1 LTS, HP ZBook, Intel + Nvidia display card. I can't resume from suspend, it's very annoying.

benstockil commented 1 year ago

Same black screen after suspend issue here (HP Spectre X360, Linux 6.1.12, NixOS unstable channel). Can't enter virtual TTYs, plugging in external monitors doesn't work either.

webst2r commented 1 year ago

Same issue in 2023. HP Victus (i5 12500H, Ubuntu 22.04.1 LTS)

amitniz commented 1 year ago

Same issue. Lenovo thinkpad T14 (i7 1260P, Archlinux). Occurs when disconnecting from the docking station.

LANopop commented 1 year ago

not sure if related, but saw some new errors popping up when connecting usb c stuff

[Do Mär  9 18:43:09 2023] i915 0000:00:02.0: [drm] *ERROR* Failed to get ACT after 3000ms, last status: 00

[Do Mär  9 18:43:25 2023] i915 0000:00:02.0: [drm] *ERROR* [ENCODER:271:DDI TC2/PHY TC2][DPRX] Failed to enable link training
[Do Mär  9 18:43:26 2023] i915 0000:00:02.0: [drm] *ERROR* failed to allocate vcpi
[Do Mär  9 18:43:34 2023] i915 0000:00:02.0: [drm] *ERROR* [ENCODER:271:DDI TC2/PHY TC2][DPRX] Failed to enable link training
[Do Mär  9 18:43:35 2023] i915 0000:00:02.0: [drm] *ERROR* failed to allocate vcpi

================================================================================
[Do Mär  9 18:44:07 2023] UBSAN: invalid-load in /build/linux-hwe-5.19-BHK0qz/linux-hwe-5.19-5.19.0/drivers/gpu/drm/display/drm_dp_mst_topology.c:2423:10
[Do Mär  9 18:44:07 2023] load of value 33 is not a valid value for type '_Bool'
[Do Mär  9 18:44:07 2023] CPU: 3 PID: 44985 Comm: kworker/3:0 Tainted: P           OE     5.19.0-35-generic #36~22.04.1-Ubuntu
[Do Mär  9 18:44:07 2023] Hardware name: Dell Inc. XPS 15 9520/xxxxxx, BIOS 1.10.0 12/14/2022
[Do Mär  9 18:44:07 2023] Workqueue: events_long drm_dp_mst_link_probe_work [drm_display_helper]
[Do Mär  9 18:44:07 2023] Call Trace:
[Do Mär  9 18:44:07 2023]  <TASK>
[Do Mär  9 18:44:07 2023]  show_stack+0x52/0x69
[Do Mär  9 18:44:07 2023]  dump_stack_lvl+0x49/0x6d
[Do Mär  9 18:44:07 2023]  dump_stack+0x10/0x18
[Do Mär  9 18:44:07 2023]  ubsan_epilogue+0x9/0x43
[Do Mär  9 18:44:07 2023]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
[Do Mär  9 18:44:07 2023]  ? drm_dp_mst_add_port+0xd1/0x110 [drm_display_helper]
[Do Mär  9 18:44:07 2023]  drm_dp_mst_handle_link_address_port.cold+0x283/0x32d [drm_display_helper]
[Do Mär  9 18:44:07 2023]  drm_dp_send_link_address+0x261/0x460 [drm_display_helper]
[Do Mär  9 18:44:07 2023]  drm_dp_check_and_send_link_address+0xe3/0x110 [drm_display_helper]
[Do Mär  9 18:44:07 2023]  drm_dp_mst_link_probe_work+0x131/0x1a0 [drm_display_helper]
[Do Mär  9 18:44:07 2023]  process_one_work+0x21c/0x400
[Do Mär  9 18:44:07 2023]  worker_thread+0x50/0x3f0
[Do Mär  9 18:44:07 2023]  ? rescuer_thread+0x3a0/0x3a0
[Do Mär  9 18:44:07 2023]  kthread+0xeb/0x120
[Do Mär  9 18:44:07 2023]  ? kthread_complete_and_exit+0x20/0x20
[Do Mär  9 18:44:07 2023]  ret_from_fork+0x1f/0x30
[Do Mär  9 18:44:07 2023]  </TASK>
[Do Mär  9 18:44:07 2023] ================================================================================

[Do Mär  9 18:44:35 2023] ================================================================================
[Do Mär  9 18:44:35 2023] UBSAN: shift-out-of-bounds in /build/linux-hwe-5.19-BHK0qz/linux-hwe-5.19-5.19.0/drivers/gpu/drm/display/drm_dp_mst_topology.c:3014:19
[Do Mär  9 18:44:35 2023] shift exponent 117 is too large for 64-bit type 'long unsigned int'
[Do Mär  9 18:44:35 2023] CPU: 3 PID: 44985 Comm: kworker/3:0 Tainted: P           OE     5.19.0-35-generic #36~22.04.1-Ubuntu
[Do Mär  9 18:44:35 2023] Hardware name: Dell Inc. XPS 15 9520/xxxxxx, BIOS 1.10.0 12/14/2022
[Do Mär  9 18:44:35 2023] Workqueue: events_long drm_dp_mst_link_probe_work [drm_display_helper]
[Do Mär  9 18:44:35 2023] Call Trace:
[Do Mär  9 18:44:35 2023]  <TASK>
[Do Mär  9 18:44:35 2023]  show_stack+0x52/0x69
[Do Mär  9 18:44:35 2023]  dump_stack_lvl+0x49/0x6d
[Do Mär  9 18:44:35 2023]  dump_stack+0x10/0x18
[Do Mär  9 18:44:35 2023]  ubsan_epilogue+0x9/0x43
[Do Mär  9 18:44:35 2023]  __ubsan_handle_shift_out_of_bounds.cold+0x61/0xef
[Do Mär  9 18:44:35 2023]  ? drm_dp_mst_topology_put_port+0x3d/0xb0 [drm_display_helper]
[Do Mär  9 18:44:35 2023]  ? drm_dp_mst_handle_link_address_port+0x2e4/0x5c0 [drm_display_helper]
[Do Mär  9 18:44:35 2023]  drm_dp_send_link_address.cold+0x175/0x1f8 [drm_display_helper]
[Do Mär  9 18:44:35 2023]  drm_dp_check_and_send_link_address+0xe3/0x110 [drm_display_helper]
[Do Mär  9 18:44:35 2023]  drm_dp_mst_link_probe_work+0x131/0x1a0 [drm_display_helper]
[Do Mär  9 18:44:35 2023]  process_one_work+0x21c/0x400
[Do Mär  9 18:44:35 2023]  worker_thread+0x50/0x3f0
[Do Mär  9 18:44:35 2023]  ? rescuer_thread+0x3a0/0x3a0
[Do Mär  9 18:44:35 2023]  kthread+0xeb/0x120
[Do Mär  9 18:44:35 2023]  ? kthread_complete_and_exit+0x20/0x20
[Do Mär  9 18:44:35 2023]  ret_from_fork+0x1f/0x30
[Do Mär  9 18:44:35 2023]  </TASK>
[Do Mär  9 18:44:35 2023] ================================================================================
wapcrazut commented 1 year ago

Same issue here, it happens after suspending the laptop for more than some hours.

Software

Hardware

As a side note, this started to happen once I switched to the proprietary Nvidia driver, with the X.Org X server this does not happen.

joho1001 commented 1 year ago

@KenMacD: Your workaround stops the flickering
It also works to unplug, wait for setteling and plug again.

I've had issues with laptop + multiple external monitors for years. My workaround is that I now always switch to a text virtual console. I switch to ctrl+alt+F2, plug in my dock, give things a few seconds to settle, then switch back to my normal one. I do the same before I unplug.

Same issue with

vale981 commented 1 year ago

I've got the same issue with an XPS 13 pro after connecting a USB-C dock. Additionally, the CTRL and SHIFT keys seem to be logically stuck.

ElectricRCAircraftGuy commented 1 year ago

Possible fix: see bullet 2 from my answer here: Ask Ubuntu: ucsi_acpi PPM init failed (-110)

I just tried bullet 1 so far, and it seems to not have fixed it.

chriswininger commented 1 year ago

Yep seeing much the same as others. I'm on popos with nvidia and intel. As others have mentioned this mostly happens if I suspend while connected to usbc monitor

ned2 commented 1 year ago

Happens for me when suspending while connected to a USB-C monitor for me also. Same behaviour on two different XPS models a few years apart.

ElectricRCAircraftGuy commented 1 year ago

As a result of the USB-C monitor issue which I was also experiencing, I wrote bullet 5 on my website article here: Common ways to fix video driver (and related) issues in Linux Ubuntu.

I think it's related to the fact that USB-C to USB-C cables can provide power from your monitor to your computer at the same time as they laptop provides video signal through the same cable from your computer to your monitor. This can be disabled by using a USB-C to DP cable, or in the BIOS.

Here is bullet 5 from my website:

  1. Use a USB-C to DP (Display Port) [best], or USB-C to HDMI [ok] video cable, rather than a USB-C to USB-C cable to your monitor.

    USB-C to USB-C video/monitor cables may be trying to provide power into your laptop (to charge your laptop) at the same time as they are providing a video signal out of your laptop, to the monitor. This new double-feature seems to have problems on other OSs (like Windows) too, not just on Linux. So, disabling this "charge while displaying" type feature can help.

    There are frequently two ways to disable it:

    1. Via a setting in the BIOS, or
    2. By using a cable that doesn't support charging at the same time. Ex: a USB-C to DP (Display Port) or USB-C to HDMI cable.
      1. Of those two types of cables, I'd choose USB-C to DP if given the option, because the older versions of HDMI cannot support 4k signals at 60 Hz, but DP can. See my answer here: Ask Ubuntu: No 60Hz Refresh Rate option on my 32" 4k external monitor in Ubuntu 20.04.
cleanclaims-dev commented 1 month ago

In My case -66.322286] 72.3274171 1915 0000:00:02.0: [drm] ERROR Failed to write source OUI 1915 0000:00:02.0: [drm] 77.4575431 1915 0000:00:02.0: [drm] ERROR [CONNECTOR:236:eDP-1]CENCODER:235:DDI A/PHY AJIDPRX] Failed to enable link training 83.8821501 1915 0000:00:02.0: [drm] ERROR Failed to read DPCD register 0x92 ERROR Failed to write source OUT 89.8812971 1915 0000:00:02.0: [drm] ERROR 94.154488] 1915 0000:00:02.0: [drm] [CONNECTOR:236: eDP-11 CENCODER:235:DDI A/PHY AJIDPRX] Failed to enable link training ERROR [CRTC:80:pipe Al mismatch in has_psr (expected yes, found no)