Skip to content

Instantly share code, notes, and snippets.

@colejhudson
Last active February 13, 2019 19:00
Show Gist options
  • Save colejhudson/95ec25929ca2641367e2a6f3c36eda52 to your computer and use it in GitHub Desktop.
Save colejhudson/95ec25929ca2641367e2a6f3c36eda52 to your computer and use it in GitHub Desktop.
Ubuntu Graphics/HDMI Issues Log

The Problem

Started having issues on Ubuntu with the HDMI output. I hit the power button with my foot and caused the computer to restart. After, the screen was blank, save for its default message indicating to 'Check the video cable' I had tried switching the display, restarting, a different HDMI cabel, etc. I have a Gigabyte motherboard, an intel CPU, an AMD graphics card is installed, but has been broken for quite some while.

Log

uname -a
# Linux dev 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Via Stack Overflow I found that you can switch between graphics driver, hence

sudo prime-select intel
# Info: the current GL alternatives in use are: ['mesa', 'nvidia-390']
# Info: the current EGL alternatives in use are: ['mesa-egl', 'nvidia-390']
# Info: selecting nvidia-390-prime for the intel profile
# update-alternatives: using /usr/lib/nvidia-390-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux- gnu_gl_conf) in manual mode
# update-alternatives: using /usr/lib/nvidia-390-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
# update-alternatives: using /usr/lib/nvidia-390-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
# update-alternatives: using /usr/lib/nvidia-390-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in manual mode

xrandr and wmctrl both output Cannot open display.

Listing the hardware interfaces, specifically for video devices, yields:

sudo lshw -C display
 # *-display UNCLAIMED     
 #      description: VGA compatible controller
 #      product: Advanced Micro Devices, Inc. [AMD/ATI]
 #      vendor: Advanced Micro Devices, Inc. [AMD/ATI]
 #      physical id: 0
 #      bus info: pci@0000:01:00.0
 #      version: c7
 #      width: 64 bits
 #      clock: 33MHz
 #      capabilities: pm pciexpress msi vga_controller bus_master cap_list
 #      configuration: latency=0
 #      resources: memory:c0000000-cfffffff memory:d0000000-d01fffff ioport:e000(size=256) memory:dfe00000-dfe3ffff memory:dfe40000-dfe5ffff

Checking whether lightdm is running via service indicates that it is. Curiouslly checking /tmp yields no unix domain socket for X11 IPC. So far as I understand lightdm requires, and manages itself, X11. Upon further inspection this doesn't seem to be the case.

The Solution

Next I googled 'disable graphics card ubuntu command line' having run sudo lshw -c video again and noticing the it was listing 'Advanced Micro Devices, Inc.' as the product. Given that my GPU is an AMD, and that it's broken. I searched for a means to disable the GPUI such that the onboard graphics on my CPU is used by default.

Hence I found this Stack Overflow post which suggests you edit /etc/default/grub as such:

Add radeon.modeset=0 to this line -> GRUB_CMDLINE_LINUX_DEFAULT="quiet splash""
so that it reads -> GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.modeset=0"

Subsequently, running sudo update-grub updates the GRUB config and rebooting the system via sudo reboot caused the restarted computer to use the onboard graphics by default and fixing everything!

@colejhudson
Copy link
Author

Some questions:

  • I didn't restart the computer after every change I made so it's possible it was something else that caused the problem to fix
  • Why did the computer start using the AMD graphics card given that previously I had not been using it, I had specifically set the
    BIOS to use the Intel onboard graphics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment