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?

2
  • I have the same issue on Ubuntu 16.04 and 17.04. No solution yet. Any help is very much appreciated.
    – user0815
    May 8, 2017 at 7:42
  • @user0815 Another Ask Ubuntu User had issues with HDMI hot plugging. You might want to review that link and the whole site. You get 100 associated points for just joining the site and will be able to post comments right away. Aug 7, 2017 at 1:35

3 Answers 3

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.

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...

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.

2
  • 1
    In my case the status is never set to connected even though the HDMI cable is plugged in. Thus, I guess the script won't help much.
    – user0815
    Aug 10, 2017 at 7:45
  • @user0815 I've done some googling and there are many bug reports going back a few years with Nvidia hotplugging. Are you using Nvidia? Aug 10, 2017 at 10:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .