I've been diagnosing my recent lack of HDMI connectivity within X for a few weeks now and have hit many walls. HDMI was functioning correctly until a kernel update (4.9.6-r1), rolling back kernel (4.4.39) did not fix the issue.
I suspect something is causing a premature unplug event when X is running, but honestly have no idea at this point.
I'm looking for an external perspective, how would you diagnose this problem?
Notes:
- enabling udev debug (/etc/conf.d/udev) only creates an empty file (/run/udevdebug.log)
- kernel CMDLINE nvidia-drm.modeset=0 seems has no effect
- kernel is configured with no FB
- No applicable rules present in /etc/udev/rules.d
- External monitor's EDID resolutions appear to be incorrect (see reference below)
From the console
HDMI connection appears to be working normally. Monitor shows 1920x1080 mirror image of eDP1 after a unplug/plug cycle.
$ udevadm monitor --environment --udev
Code:
UDEV [2607.461058] change /devices/pci0000:00/0000:00:02.0/drm/card0 (drm)
ACTION=change
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
DEVTYPE=drm_minor
HOTPLUG=1
ID_PATH=pci-0000:00:02.0
ID_PATH_TAG=pci-0000_00_02_0
MAJOR=226
MINOR=0
SEQNUM=2424
SUBSYSTEM=drm
TAGS=:udev-acl:
USEC_INITIALIZED=4777
/var/log/messages:
Code:
kernel: udevd[2071]: Validate module index
kernel: udevd[2071]: seq 2426 queued, 'change' 'drm'
kernel: udevd[2071]: seq 2426 forked new worker [20059]
kernel: udevd[20059]: seq 2426 running
kernel: udevd[20059]: IMPORT builtin 'path_id' /lib64/udev/rules.d/60-drm.rules:3
kernel: udevd[20059]: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib64/udev/rules.d/70-udev-acl.rules:74
kernel: udevd[20059]: handling device node '/dev/dri/card0', devnum=c226:0, mode=0600, uid=0, gid=0
kernel: udevd[20059]: preserve already existing symlink '/dev/char/226:0' to '../dri/card0'
kernel: udevd[20059]: created db file '/run/udev/data/c226:0' for '/devices/pci0000:00/0000:00:02.0/drm/card0'
kernel: udevd[20060]: starting 'udev-acl --action=change --device=/dev/dri/card0'
root[20063]: ACPI event unhandled: jack/lineout LINEOUT plug
root[20065]: ACPI event unhandled: jack/videoout VIDEOOUT plug
/sys/class/drm/:
Code:
ls card*/status; cat card*/status
card0-DP-1/status card0-eDP-1/status card0-HDMI-A-2/status
card0-DP-2/status card0-HDMI-A-1/status
disconnected
disconnected
connected
connected
disconnected
Within X
The same unplug/plug cycle yields two udev events (plug/unplug?)
$ udevadm monitor --environment --udev
Code:
UDEV [82.623296] change /devices/pci0000:00/0000:00:02.0/drm/card0 (drm)
ACTION=change
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
DEVTYPE=drm_minor
HOTPLUG=1
ID_PATH=pci-0000:00:02.0
ID_PATH_TAG=pci-0000_00_02_0
MAJOR=226
MINOR=0
SEQNUM=2416
SUBSYSTEM=drm
TAGS=:udev-acl:
USEC_INITIALIZED=4777
UDEV [83.377742] change /devices/pci0000:00/0000:00:02.0/drm/card0 (drm)
ACTION=change
DEVNAME=/dev/dri/card0
DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
DEVTYPE=drm_minor
HOTPLUG=1
ID_PATH=pci-0000:00:02.0
ID_PATH_TAG=pci-0000_00_02_0
MAJOR=226
MINOR=0
SEQNUM=2417
SUBSYSTEM=drm
TAGS=:udev-acl:
USEC_INITIALIZED=4777
/var/log/messages (note the lack of acpi log):
Code:
udevd[2071]: Validate module index
udevd[2071]: seq 2418 queued, 'change' 'drm'
udevd[2071]: seq 2418 forked new worker [19811]
udevd[19811]: seq 2418 running
udevd[19811]: IMPORT builtin 'path_id' /lib64/udev/rules.d/60-drm.rules:3
udevd[19811]: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib64/udev/rules.d/70-udev-acl.rules:74
udevd[19811]: handling device node '/dev/dri/card0', devnum=c226:0, mode=0600, uid=0, gid=0
udevd[19811]: preserve already existing symlink '/dev/char/226:0' to '../dri/card0'
udevd[19811]: created db file '/run/udev/data/c226:0' for '/devices/pci0000:00/0000:00:02.0/drm/card0'
udevd[19813]: starting 'udev-acl --action=change --device=/dev/dri/card0'
/sys/class/drm/ and xrandr shows no connection:
Code:
ls card*/status; cat card*/status
card0-DP-1/status card0-eDP-1/status card0-HDMI-A-2/status
card0-DP-2/status card0-HDMI-A-1/status
disconnected
disconnected
connected
disconnected
disconnected
Reference
Packages
Code:
x11-base/xorg-server-1.18.4
x11-drivers/nvidia-drivers-375.26-r3
x11-base/xorg-drivers-1.18-r1
media-libs/mesa-12.0.1
sys-kernel/linux-firmware-20161205
Hardware
Code:
lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
Subsystem: Acer Incorporated [ALI] Device 1039
Kernel driver in use: i915
--
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
Subsystem: Acer Incorporated [ALI] GM107M [GeForce GTX 960M]
Kernel driver in use: nvidia
Monitor's EDID (it is a 4k@30Hz monitor):
Code:
sudo sh -c "get-edid |parse-edid"
This is read-edid version 3.0.1. Prepare for some fun.
Attempting to use i2c interface
No EDID on bus 0
No EDID on bus 2
No EDID on bus 4
No EDID on bus 5
3 potential busses found: 1 3 6
Will scan through until the first EDID is found.
Pass a bus number as an option to this program to go only for that one.
256-byte EDID successfully retrieved from i2c bus 1
If this isn't what you were looking for, consider the other potential busses.
Looks like i2c was successful. Have a good day.
Checksum Correct
Section "Monitor"
Identifier "LG Ultra HD"
ModelName "LG Ultra HD"
VendorName "GSM"
# Monitor Manufactured week 5 of 2016
# EDID version 1.3
# Digital Display
DisplaySize 600 340
Gamma 2.20
Option "DPMS" "true"
Horizsync 30-135
VertRefresh 56-61
# Maximum pixel clock is 300MHz
#Not giving standard mode: 1152x864, 60Hz
#Not giving standard mode: 1280x1024, 60Hz
#Not giving standard mode: 1280x720, 60Hz
#Not giving standard mode: 1600x900, 60Hz
#Not giving standard mode: 1920x1080, 60Hz
#Not giving standard mode: 1280x800, 60Hz
#Extension block found. Parsing...
Modeline "Mode 8" +hsync +vsync
Modeline "Mode 0" +hsync +vsync
Modeline "Mode 1" +hsync +vsync
Modeline "Mode 2" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
Modeline "Mode 3" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
Modeline "Mode 4" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
Modeline "Mode 5" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
Modeline "Mode 6" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
Modeline "Mode 7" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync
Option "PreferredMode" "Mode 8"
EndSection
/etc/X11/xorg.conf.d/30nvidia.conf
Code:
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "1@0:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection