You are not logged in.

#1 2022-03-16 23:45:44

ArcticStag
Member
Registered: 2020-09-14
Posts: 46

Lenovo T14 AMD + Lenovo ThinkPad USB-C Dock Gen2 Docking Issues

Hey there,

So I have some questions about my setup which is a Lenovo T14 Gen 1 AMD paired with a Lenovo ThinkPad USB-C Dock Gen2.

Basic functionality of the dock and the laptop work pretty much fine, I am still tweaking some things but for the most party it has been pretty plug and play for the most part. My main questions are as follows, Should the Lenovo ThinkPad USB-C Dock Gen2 work with the dockd deamon as discussed in this documentation here https://wiki.archlinux.org/title/ThinkPad_docks. I have installed and setup some hooks for the dock and undock function of the dockd daemon.

When I plug-in or unplug the Lenovo ThinkPad USB-C Dock Gen2 nothing really happens on the system, in the dock and undock hooks currently I have a simple xrandr that is supposed to turn off the laptop display and then on the ultra-wide and vice versa. This doesn't seem to happen. With regards to docking, this may be due to the dock adding a new Displayport option in the xrandr, so I may need to work out how to determin which Displayport option is the currently connected option though a shell script, however, in reverse I don't see a reason this will not work.

Also, does anyone know why when plugging or unplugging the device it will add a new Displayport in xrandr?

Thanks hooks are below

/etc/dockd/dock.hook

#!/bin/bash

# This hook is executed when the laptop is docked into a dockd.
# Here you can do stuff such as disabling WiFi, switching input profiles,
# switching keyboard layouts etc.
# SCRIPT EXECUTES AS NON ROOT!
xrandr --output eDP --off --output HDMI-A-0 --off --output DisplayPort-4 --primary --mode 3840x1080 --pos 0x0 --rotate normal --output DisplayPort-1 --off

exit

/etc/dockd/undock.hook

#!/bin/bash

# This is the shell script that gets executed on docking
# do whatever you want here when the laptop is undocked, like
# enabling WiFi, turning touchpads on or off etc.
# THIS SCRIPT EXECUTES AS NON-ROOT!
xrandr --output eDP --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --off --output DisplayPort-0  --off --output DisplayPort-1 --off

exit

Offline

Board footer

Powered by FluxBB