4

I am using elementaryOS Loki (OS based on Ubuntu) on Dell Inspiron 15 Gaming 7566. Althought HDMI connection is working for both my screen and TV, it works only when I reboot the computer with HDMI connected and device on (so I need to reboot every time I connect new device).

I am not using any additional drivers except those preinstalled on the system. So is there something I can do about that or is it just a hardware "problem" of my laptop?

3 Answers3

1

Just solved this on Ubuntu 16.04 LTS on Dell Inspiron 13 with intel+nvidia graphics. Took me over a year.

I only installed HWE kernel and HWE X-server as instructed here: https://wiki.ubuntu.com/Kernel/LTSEnablementStack

sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

No more restarts to connect a second monitor.

janci
  • 11
  • 1
0

I am on Arch and have the same problem on Dell 7566. A workaround that works for me is to:

  • boot with (any) display connected (without this, the next step doesn't work),
  • I can unplug a display and when I connect it (or another one) back, I just put my notebook to sleep (when it's not already) and wake it up and the display works!

This scenario works for my two HDMI displays at home and at work. However, it doesn't work for an old display connected via HDMI-VGA reduction (it works only after reboot) and that drives me crazy...

majlan
  • 11
0

Here is the hotplugtv bash script I wrote for Ubuntu 16.04. It is reported to work with Ubuntu 17.04 as well.

#!/bin/bash

# NAME: hotplugtv
# PATH: /home/$USER/bin
# DESC: Update pulseaudio output device when HDMI TV plugged / unplugged
# CALL: called from /etc/udev/rules.d/99-hotplugtv.rules 
#       and /home/$USER/bin/lock-screen-timer
# DATE: Created Nov 26, 2016.
# NOTE: logs output using log-file
# UPDT: Dec 14, 2016 - Sometimes /sys/class/drm/card0 & sometimes /sys/class/drm/card1
#       so use /sys/class/dmcard* instead.
#       Dec 21, 2016 - Relocated to /home/$USER/bin for calling by lock-screen-timer
#       Aug 06, 2017 - Convert from home grown log-file to universal logger command.

if [[ $(cat /sys/class/drm/card*-HDMI-A-1/status | grep -Ec "^connected") -eq 1 ]]; then
        logger -t /home/rick/bin/log-hotplugtv "HDMI TV connected"
        /bin/sleep 2;
        export PULSE_RUNTIME_PATH="/run/user/1000/pulse/";
        sudo -u rick -E pacmd set-card-profile 0 output:hdmi-stereo;
else
        logger -t /home/rick/bin/log-hotplugtv "HDMI TV disconnected"
        export PULSE_RUNTIME_PATH="/run/user/1000/pulse/";
        sudo -u rick -E pacmd set-card-profile 0 output:analog-stereo;
fi

exit 0

IMPORTANT: Change the user name "rick" to your user name.

In order to call this script from udev during hot-plug events create the file /etc/udev/rules.d/99-hotplugtv.rules containing:

ACTION=="change", SUBSYSTEM=="drm", ENV{HOTPLUG}=="1", RUN+="/home/rick/bin/hotplugtv"

Change /home/rick/bin/ to the path where you placed hotplugtv script.