XPS

Last reply by 06-28-2018 Solved
Start a Discussion
2 Bronze
2 Bronze

XPS 9370 blank screen on wakeup after TB16 unplug

I bought a new Dell XPS 9730 (Intel UHD Graphics 620) along with Dell TB16 docking station, and everything works perfectly, only when I disconnect it from TB16 docking station while in hibernation - when I wake it up, laptop turns on, but the built-in screen stays dark.

When connected to dock, laptop lid is closed at all times and output is shown to 2 external Dell monitors (1920x1200 and 1920x1080). But when disconnected from port, the output should be shown only to built-in display of course. When I wake system up from hibernation without changing output source, everything works fine. Also if I restart the laptop after unplugging, everything works fine. I get the same behavior on 16.04 and 18.04.

Xrandr specs (xrandr -q): link to image

I was playing a little with hibernate post script like /lib/systemd/system-sleep/update-displays (..bin/sh start left out here, since message wont save otherwise):

# Reset monitors in case laptop was detached

set -e

echo "Checking enabled monitors"

if [ "$2" = "hibernate" ] || [ "$2" = "hybrid-sleep" ]; then
    case "$1" in
        post)
        if [xrandr -q|grep DP-1-2|egrep -v disconnected] && [xrandr -q|grep DP-2-2|egrep -v disconnected]; then
        echo "Enabling built-in monitor"
        xrandr --output eDP-1 --auto
        fi
            ;;
    esac
fi

But without success... Maybe some mistakes in the scripts? I suspect that xrandr doesn't refresh on wakeup and it uses "old" configuration still. Is there any other way to refresh it? Or to adjust previous post script somehow?

Everything else works perfectly and I like the laptop a lot, only this issue is a little frustrating, since I have to restart the system everytime I plug/unplug it from dock.

Any help would be greatly appreciated, thanks!

Solution (1)

Accepted Solutions
2 Bronze
2 Bronze

Solved it.. I had wrong event filter on $2 parameter (hibernate or hybrid-sleep). I also simplified the script in case anyone else finds it handy (omitting ..bin/sh at start again):

# Reset xrandr at wakeup in case any display setup change was made

case "$2" in
  hibernate|suspend)
    case "$1" in
      post)
        xrandr --auto
        echo "System waking up from -$2- at $(date '+%d/%m/%Y %H:%M:%S')" >> /tmp/update-displays.txt
      ;;
    esac
  ;;
esac

In Ubuntu 18.04 put in /lib/systemd/system-sleep i.e. /lib/systemd/system-sleep/update-displays and set correct permissions (mine was 755).

View solution in original post

Community Accepted Solution
Reply (1)
2 Bronze
2 Bronze

Solved it.. I had wrong event filter on $2 parameter (hibernate or hybrid-sleep). I also simplified the script in case anyone else finds it handy (omitting ..bin/sh at start again):

# Reset xrandr at wakeup in case any display setup change was made

case "$2" in
  hibernate|suspend)
    case "$1" in
      post)
        xrandr --auto
        echo "System waking up from -$2- at $(date '+%d/%m/%Y %H:%M:%S')" >> /tmp/update-displays.txt
      ;;
    esac
  ;;
esac

In Ubuntu 18.04 put in /lib/systemd/system-sleep i.e. /lib/systemd/system-sleep/update-displays and set correct permissions (mine was 755).

Community Accepted Solution
Top Contributor
Latest Solutions