[mythtv-users] Display weirdness

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Sep 14 02:42:49 UTC 2020

On Sun, 13 Sep 2020 14:47:39 -0700, you wrote:

>On Sun, Sep 13, 2020 at 1:56 PM DryHeat122 <dryheat122 at gmail.com> wrote:
>> On Sun, Sep 13, 2020 at 8:27 AM alain <alain at alain.homeunix.org> wrote:
>>> Hi,
>>> I've had this problem on two different system in the past and currently
>>> on my main mythfrontend.
>>> Do ssh back to your computer and check the output of xrandr. In
>>> particular, the display being used.
>>> After blanking the screen, when restoring the display, on some
>>> driver/hardware/software version, the X output is reconnected to the wrong
>>> screen. If you have more than one interface on your graphic card, the odds
>>> are that this is your problem.
>>> You can verify by either connecting a display on the other port or by
>>> using xrandr to switch to another screen.
>>> I've written a script which monitors the output of xrandr and fixes the
>>> problem when it detects the problem.
>>> Alain
>> For the black screen problem, when I tried from the SSH terminal xrandr
>> returns "Can't open display"
>I figured out the proper command is xrandr -d :0, which resulted in a
>listing of two outputs (DVI-I-1 and VGA), and a whole bunch of size
>options for the former.

To get xrandr to work from ssh, there are two things needed.  You need
to tell it which display (-d :0 as you discovered).  But you also need
to run xrandr as the same user as the desktop is running under.  So if
your ssh login does not match, you have to do something like:

sudo -u <desktop user> xrandr -d :0

>I rebooted and it booted to a black screen, again
>and again.  So I searched on the error and wound-up here
>I followed the advice about adding nomodeset to the grub config.  Now it
>will boot, but the resolution is 1280 x 1024 and the display app won't
>allow setting to any other resolution.  xrandr -d :0 returns:
>xrandr: Failed to get size of gamma for output default
>Screen 0: minimum 1280 x 1024, current 1280 x 1024, maximum 1280 x 1024
>default connected primary 1280x1024+0+0 0mm x 0mm
>   1280x1024     77.00*
>Whereas before it listed the monitor name "Samsung TV" and as I said a
>whole bunch of possible resolutions and the DVI and VGA outputs on the
>video card.  I looked up this issue and somebody said to make sure you
>don't have nomodeset in the grub config!

I have never used nomodeset, but this seems to explain what it does:


That page is pretty old now, so things have likely changed since then.

So what all this implies is that you have graphics driver problems,
which I think you already know.  Using nomodeset may get you to be
able to see a GUI screen, but it is not a long term solution as it is
likely that the kernel modesetting code is now used by all video
drivers and you will not get anything except the most basic
unaccellerated video modes without it.  The mode that it is using is a
bit strange too.  It is 77.0 Hz, which reads like a text mode rather
than a graphics one.  I am guessing that it is the mode provided by
the VESA code in the BIOS that has the highest clock rate.  I think
you are lucky that your screen actually supports that mode, as it
appears that using nomodeset means that the video drivers do not probe
the hardware at all to find out what might match.

What is the video card?  What drivers are you using for it?  Is there
a PPA you can install to get later drivers?  Can you install an older
version of the graphics drivers and get it to work?

From the command line, the ubuntu-drivers command can be used to
select which video drivers are installed.  As I have the Nvidia PPA
installed, I get a lot of options to choose from with my Nvidia GT1030

root at mypvr:/etc/X11# ubuntu-drivers list
root at mypvr:/etc/X11# ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001D01sv00001043sd000085F4bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP108 [GeForce GT 1030]
driver   : nvidia-driver-415 - third-party free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-450 - third-party free recommended
driver   : nvidia-driver-435 - distro non-free
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-410 - third-party free
driver   : xserver-xorg-video-nouveau - distro free builtin

If you have an Nvidia card, to update to the latest PPA versions, just
add the PPA:


sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update

and then run:

sudo ubuntu-drivers install

You can also use apt install to select specific versions of the video
driver packages.

I am currently running the 450 drivers as they seem better than the
earlier ones (slightly less buggy).  I have been getting video lockups
where the screen freezes but the rest of the system is still running
fine.  Occasionally I was able to get Ctrl-Alt-Backspace to restart X
and recover from the freezes, but mostly I needed to wait until I was
not recording and then reboot as nothing else worked.  I have not been
on the 450 series drivers long enough to know if they fix this as the
freezes were only once or twice a week and seemed to happen when a
screen mode change was done.  Since I have now changed all my mode
setup to prevent the use of interlaced modes, that may also be

More information about the mythtv-users mailing list