You are not logged in.
Hi,
I've recently installed Arch on my Thinkpad T460S, and using it together with i3.
I'm running with a docked setup, where I have two external screens attached to a Lenovo Ultradock (DP2-1 & DP2-2)
When I undock the laptop, I run the following xrandr command to change the screen setup:
xrandr --output VIRTUAL1 --off --output eDP1 --mode 2560x1440 --pos 0x0 --rotate normal --primary --off --output HDMI2 --off --output HDMI1 --off --output DP2-1 --off --output DP2-2 --off
When re-docking, I run the following code:
xrandr --output DP2-1 --mode 1920x1200 --pos 0x0 --rotate normal --primary --output DP2-2 --mode 1920x1200 --pos 1920x0 --rotate left --right-of DP2-1 --output eDP1 --mode 2560x1440 --pos 3840x0 --rotate normal --left-of DP2-1 --output HDMI2 --off --output HDMI1 --off --output VIRTUAL1 --off --output DP2 --off
When I dock the laptop after booting up, the last xrandr code works perfectly (doesn't matter if it's docked when booted or if I boot it outside the dock and then boot), however if I undock it, run the first script and then redock, runs the last script, the external screens don't wake from sleep. It seems like some kind of wake command is not sent to them.
Looking at the xrandr output when docked originally and when re-docked, they're exactly the same, so xrandr has picked them up:
Screen 0: minimum 8 x 8, current 5680 x 1920, maximum 32767 x 32767
eDP1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
2560x1440 60.00*+ 48.00
1920x1440 60.00
1856x1392 60.01
1792x1344 60.01
2048x1152 60.00
1920x1080 60.00
1600x1200 60.00
1400x1050 59.98
1600x900 60.00
1280x1024 60.02
1280x960 60.00
1368x768 60.00
1280x720 60.00
1024x768 60.00
1024x576 60.00
960x540 60.00
800x600 60.32 56.25
864x486 60.00
640x480 59.94
720x405 60.00
640x360 60.00
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP2-1 connected primary 1920x1200+2560+0 (normal left inverted right x axis y axis) 520mm x 320mm
1920x1200 59.95*+
1920x1080 60.00
1600x1200 60.00
1680x1050 59.95
1280x1024 60.02
1280x960 60.00
1024x768 60.00
800x600 60.32
640x480 59.94
720x400 70.08
DP2-2 connected 1200x1920+4480+0 left (normal left inverted right x axis y axis) 520mm x 320mm
1920x1200 59.95*+
1920x1080 60.00
1600x1200 60.00
1680x1050 59.88
1280x1024 60.02
1280x960 60.00
1024x768 60.00
800x600 60.32
640x480 59.94
720x400 70.08
DP2-3 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
The only way to get them turned on, is to reboot the computers. Even restarting X doesn't work.
I've browsed the web to see if I could find some kind of way to wake the screens from sleep, but to no availability.
Any ideas on how to get around this?
It should be said that it worked without issues in both Ubuntu 14.04 & 16.04. The latter with the 4.8.4 kernel.
---------------------------
Update: Check #21 & #22 for the solution. Running a kernel 4.8.11+ will work
Last edited by danthedane (2016-12-21 21:43:34)
Offline
Try to eliminate variables - do the outputs wakeup if you do not run the first script?
What if you scratch the noop HDMI switches and don't use explicit modes but --auto?
Can you run your scripts successfully if you do NOT detach the dock?
Offline
Hi Seth,
thanks for the suggestions.
#1: do the outputs wakeup if you do not run the first script?
No.
#2 What if you scratch the noop HDMI switches and don't use explicit modes but --auto?
I'm unsure what you mean with scratching the noop switches, but using auto doesn't make any difference.
#3: Can you run your scripts successfully if you do NOT detach the dock?
Yes, running the scripts without detaching works fine.
I just ran an xrandr after undocking, and I can see that xrandr still believe that the outputs are connecte. It also adds some details for the Virtual1, which otherwise are always reported as disconnected:
Screen 0: minimum 8 x 8, current 5680 x 1920, maximum 32767 x 32767
eDP1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
2560x1440 60.00*+ 48.00
1920x1440 60.00
1856x1392 60.01
1792x1344 60.01
2048x1152 60.00
1920x1080 60.00
1600x1200 60.00
1400x1050 59.98
1600x900 60.00
1280x1024 60.02
1280x960 60.00
1368x768 60.00
1280x720 60.00
1024x768 60.00
1024x576 60.00
960x540 60.00
800x600 60.32 56.25
864x486 60.00
640x480 59.94
720x405 60.00
640x360 60.00
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP2-1 connected primary 1920x1200+2560+0 (normal left inverted right x axis y axis) 520mm x 320mm
1024x768 60.00
800x600 60.32 56.25
848x480 60.00
640x480 59.94
DP2-2 connected 1200x1920+4480+0 left (normal left inverted right x axis y axis) 520mm x 320mm
1024x768 60.00
800x600 60.32 56.25
848x480 60.00
640x480 59.94
DP2-3 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
1920x1200 (0x13c) 154.000MHz +HSync -VSync
h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 74.04KHz
v: height 1200 start 1203 end 1209 total 1235 clock 59.95Hz
Offline
Did you try to pass them an extra invitation?
xset dpms force off; sleep 5; xset dpms force on
(you can try to lower or raise the delay)
Offline
Hi Seth,
that unfortunately had no effect on the external screens (the laptop screen turned off and on, so have verified that the command itself works).
I tried to raise it to 10 sec, which didn't change the effect.
Based on the output when it's un-docked and still see the external monitors as connected, I suspect that the root cause is probably related to that, and that the screens don't turn on when re-docked is a side-effect of this.
Offline
probably - is it the intel or nvidia variant?
in case of intel: do you use xf86-video-intel or the modesetting driver? you might require the patched kernel https://aur.archlinux.org/packages/linux-think/ although i belive the relevant patches are part of the kernel since 3.17
edit: see https://bugs.freedesktop.org/show_bug.cgi?id=96436
edit on edit: if the bug reporter is correct, the linux-lts kernel should still work.
Last edited by seth (2016-11-16 14:09:07)
Offline
It's the intel only variant.
I haven't installed the intel driver, so must be the modesetting driver. Reading up on the intel driver indicates that it's causing several issues (e.g. https://www.reddit.com/r/archlinux/comm … deointel/)
The kernel I'm running is 4.8.7, so the patched version shouldn't be relevant:
Linux thinkpad 4.8.7-1-ARCH #1 SMP PREEMPT Thu Nov 10 17:22:48 CET 2016 x86_64 GNU/Linux
Offline
hI'm having a similar issue on a T460s with intel integrated card on an ultradock. Before undocking, xrandr correctly identifies the single external display (connected via VGA which the dock maps to the DP).
DP2-3 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 520mm x 320mm
1920x1200 59.95*+
1600x1200 60.00
1680x1050 59.95
1280x1024 75.02 60.02
1440x900 59.89
1280x800 59.81
1152x864 75.00
1152x720 59.97
1024x768 75.03 60.00
832x624 74.55
800x600 75.00 60.32
640x480 75.00 59.94
720x400 70.08
After undocking, it shows the following:
DP2-3 connected (normal left inverted right x axis y axis)
1024x768 60.00
800x600 60.32 56.25
848x480 60.00
640x480 59.94
After redocking, it shows the original output again (without the *) and after activating the output the star appears but the screen stays off. I'm using the intel driver on 4.8.7-1-ARCH.
I can even activate the ghost output while undocked, giving
DP2-3 connected 1024x768+0+0 (normal left inverted right x axis y axis) 520mm x 320mm
1024x768 60.00*
800x600 60.32 56.25
848x480 60.00
640x480 59.94
which persists on redocking.
There appears to be a new firmware version for this dock. I will try installing the update with a friends Thinkpad over the weekend (as I don't have windows on my machine) and report back then.
edit: I just noticed that I can reconnect to the external screen when putting the undocked laptop to sleep (suspend to ram) and waking it up again. Redocking it afterwards, the external screen works like before. So its probably not an dock-firmware problem.
Last edited by maze (2016-11-16 17:22:29)
Offline
I haven't tried putting it to sleep prior. I will test that tomorrow.
If it was a dock firmware issue I should only affect displays while docked, but since we can see odd behavior while undocked, I'm more suspecting that it's the driver itself that gets confused...
Offline
I have the same Problem with a T450s
Tried updating the BIOS as well as the Dock-Firmware which didn't solve it.
I also have the two external monitors shown as still connected. Is there anyway I can force a disconnect of a monitor in xrandr?
Offline
No, and I doubt that would help you anything. The issue seems in the kernel, maybe the xorg driver.
You may try installing the linux-lts package (and boot that) as well as the intel instead of the modesetting driver (in case you're using the latter)
https://bbs.archlinux.org/viewtopic.php … 3#p1669923 suggests that an STR/wakeup cycle triggers whatever is required to reset the state. I'd verify that by looking into dmesg and also check whether there's an interesting script in /usr/lib/systemd/system-sleep/ that might cause this.
Offline
I just attempted the sleep before re-docking and can confirm that works.
I will try to look further at the suggestion from Seth
Offline
Yes I can also confirm that putting the computer to sleep helps. I have no scripts in system-sleep.
Will check the LTS kernel as well as what dmesg says on Monday when I am back at my docking station
Offline
Hi,
I just checked with the LTS-kernel: it runs fine. The additional screens disappear as soon as I undock.
Last edited by ibutra (2016-11-21 16:55:09)
Offline
I'm unfortunately not that lucky.
I will boot fine, but as soon as I run my xrandr script to activate the external screens, the whole system freezes. I don't see any traces of the freeze in logs either, which probably means some kind of kernel panic.
I will attempt with the intel driver, and see how that pans out
Offline
Been playing around with it a bit further.
I found out that I was actually already using the intel driver. I tried to uninstall that and use the modesetting driver instead.
When using this X crashed after login when executing the xrandr script to activate all screens.
I could however also conclude that the outputs are still listed as connected with this driver. So could indicate that it's not the intel driver that's at fault, but something with the kernel, especially considering that ibutra has it working on the lts.
I have reverted to the intel setup currently. The workaround of sleeping the laptop prior to docking does work, but I regularly experience that X then crashes as soon as it's docked. Here's the relevant part from the Xorg log when crashing:
[ 2494.333] (II) intel(0): Enabled output DP2-1
[ 2494.382] (EE)
[ 2494.382] (EE) Backtrace:
[ 2494.383] (EE) 0: /usr/lib/xorg-server/Xorg (OsLookupColor+0x139) [0x59cd49]
[ 2494.385] (EE) 1: /usr/lib/libc.so.6 (__restore_rt+0x0) [0x7f4fdba050af]
[ 2494.386] (EE) 2: /usr/lib/libc.so.6 (readdir+0x29) [0x7f4fdba857e9]
[ 2494.387] (EE) 3: /usr/lib/xorg/modules/drivers/intel_drv.so (_init+0x638d8) [0x7f4fd707b5b8]
[ 2494.388] (EE) 4: /usr/lib/xorg/modules/drivers/intel_drv.so (_init+0x661eb) [0x7f4fd7080f8b]
[ 2494.389] (EE) 5: /usr/lib/xorg/modules/drivers/intel_drv.so (_init+0x6d855) [0x7f4fd708fd65]
[ 2494.390] (EE) 6: /usr/lib/xorg-server/Xorg (xf86Wakeup+0x197) [0x479697]
[ 2494.390] (EE) 7: /usr/lib/xorg-server/Xorg (WakeupHandler+0x6d) [0x43b2dd]
[ 2494.391] (EE) 8: /usr/lib/xorg-server/Xorg (WaitForSomething+0x1e9) [0x5954f9]
[ 2494.391] (EE) 9: /usr/lib/xorg-server/Xorg (SendErrorToClient+0x10e) [0x4365ee]
[ 2494.392] (EE) 10: /usr/lib/xorg-server/Xorg (remove_fs_handlers+0x463) [0x43a7f3]
[ 2494.393] (EE) 11: /usr/lib/libc.so.6 (__libc_start_main+0xf1) [0x7f4fdb9f2291]
[ 2494.394] (EE) 12: /usr/lib/xorg-server/Xorg (_start+0x29) [0x4246e9]
[ 2494.395] (EE) 13: ? (?+0x29) [0x29]
[ 2494.396] (EE)
[ 2494.396] (EE) Segmentation fault at address 0x4
[ 2494.396] (EE)
Fatal server error:
[ 2494.396] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 2494.396] (EE)
[ 2494.396] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 2494.396] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 2494.396] (EE)
[ 2494.396] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 2495.959] (EE) Server terminated with error (1). Closing log file.
I also tried to dig into systemd, to see if I could find some kind of script that is executed when resuming from sleep, to find what triggers the update of outputs, but to no availability
Offline
Hi,
I am also using the intel driver. Just to make sure because I missed it at first: when you installed the LTS driver you also switched the bootloader configuration right?
If you want I can tell you more about my system, maybe we can find out together what makes it work for me and what doesn't for you. Just tell me what info you need.
Offline
Got the same problem with a Dell laptop and dock on Skylake with integrated Intel graphics. This started happening around 4.7 => 4.8 kernel update.
Checklist:
linux-lts kernel works (but has other unrelated issues so it's a no-go for me)
External screens remain attached and used in X and xrandr output after undocking but won't re-engage if re-docked, i.e. xrandr still says they're connected but in fact they aren't
Must manually disable external screens after undocking
Workaround of putting laptop to sleep before docking works
Laptop won't go to sleep when undocked until I disable all external screen manually via xrandr interface
Driver doesn't seem to matter - same with both Intel (xf86-video-intel) and modeset driver
No errors or warnings in Xorg.log, no apparent log entries in dmesg
Using linux-ck-skylake kernel, but tested with vanilla with no difference
Switching to VT and back does not help and it takes unusually long (tens of seconds)
When manually disabling [already physically disconnected/undocked] screens, it sometimes takes tens of seconds for integrated display/screen to settle
Random freezes, untested but before reading this thread I was inclined to believe they were related to power management issues (sleep and/or overheating).
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
I think it's pretty clear that this is a regression in the i915 kernel module and https://github.com/torvalds/linux/commi … _hotplug.c shows suspicious commits this summer, so I'd suggest somebody affected files a bug upstream (for they will much better know what and why could have broken it, which patch to revert etcetc.)
Offline
The problem seems to be fixed in kernel 4.8.11-ck. At least for me (again, a skylake-based Dell Latitude).
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
The problem seems to be fixed in kernel 4.8.11-ck. At least for me (again, a skylake-based Dell Latitude).
For me update to kernel 4.8.11 also fixed the problem, ThinkPad E450 with ThinkPad OneLink Pro Dock.
Last edited by ivan.masich (2016-11-29 10:21:45)
Offline
Sorry for the super late reply on this.
I can confirm that 4.8.11+ seems to solve it (currently running 4.8.13) and has not experienced any major since then. It's not rock solid (had one time X freezing and one where it still saw one of the two external displays connected), but could easily be due to other issues.
I will mark it as solved.
Thanks all for the help, and especially seth for spending time in trying to help locating the issue!
Offline