<div dir="ltr"><div dir="ltr"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 13, 2020 at 7:43 PM Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, 13 Sep 2020 14:47:39 -0700, you wrote:<br>
<br>
>On Sun, Sep 13, 2020 at 1:56 PM DryHeat122 <<a href="mailto:dryheat122@gmail.com" target="_blank">dryheat122@gmail.com</a>> wrote:<br>
><br>
>><br>
>> On Sun, Sep 13, 2020 at 8:27 AM alain <<a href="mailto:alain@alain.homeunix.org" target="_blank">alain@alain.homeunix.org</a>> wrote:<br>
>><br>
>>> Hi,<br>
>>><br>
>>> I've had this problem on two different system in the past and currently<br>
>>> on my main mythfrontend.<br>
>>> Do ssh back to your computer and check the output of xrandr. In<br>
>>> particular, the display being used.<br>
>>> After blanking the screen, when restoring the display, on some<br>
>>> driver/hardware/software version, the X output is reconnected to the wrong<br>
>>> screen. If you have more than one interface on your graphic card, the odds<br>
>>> are that this is your problem.<br>
>>> You can verify by either connecting a display on the other port or by<br>
>>> using xrandr to switch to another screen.<br>
>>> I've written a script which monitors the output of xrandr and fixes the<br>
>>> problem when it detects the problem.<br>
>>><br>
>>> Alain<br>
>>><br>
>><br>
>> For the black screen problem, when I tried from the SSH terminal xrandr<br>
>> returns "Can't open display"<br>
>><br>
>I figured out the proper command is xrandr -d :0, which resulted in a<br>
>listing of two outputs (DVI-I-1 and VGA), and a whole bunch of size<br>
>options for the former.<br>
<br>
To get xrandr to work from ssh, there are two things needed.  You need<br>
to tell it which display (-d :0 as you discovered).  But you also need<br>
to run xrandr as the same user as the desktop is running under.  So if<br>
your ssh login does not match, you have to do something like:<br>
<br>
sudo -u <desktop user> xrandr -d :0<br>
<br>
>I rebooted and it booted to a black screen, again<br>
>and again.  So I searched on the error and wound-up here<br>
><<a href="https://www.stephenwagner.com/2019/05/05/ubuntu-linux-black-screen-frozen-system-after-upgrade-install/#:~:text=After%20upgrading%20a%20computer%20from,and%20the%20system%20becomes%20frozen.&text=This%20is%20due%20to%20a,system%20to%20halt%20or%20freeze" rel="noreferrer" target="_blank">https://www.stephenwagner.com/2019/05/05/ubuntu-linux-black-screen-frozen-system-after-upgrade-install/#:~:text=After%20upgrading%20a%20computer%20from,and%20the%20system%20becomes%20frozen.&text=This%20is%20due%20to%20a,system%20to%20halt%20or%20freeze</a>.>.<br>
>I followed the advice about adding nomodeset to the grub config.  Now it<br>
>will boot, but the resolution is 1280 x 1024 and the display app won't<br>
>allow setting to any other resolution.  xrandr -d :0 returns:<br>
><br>
>xrandr: Failed to get size of gamma for output default<br>
>Screen 0: minimum 1280 x 1024, current 1280 x 1024, maximum 1280 x 1024<br>
>default connected primary 1280x1024+0+0 0mm x 0mm<br>
>   1280x1024     77.00*<br>
><br>
>Whereas before it listed the monitor name "Samsung TV" and as I said a<br>
>whole bunch of possible resolutions and the DVI and VGA outputs on the<br>
>video card.  I looked up this issue and somebody said to make sure you<br>
>don't have nomodeset in the grub config!<br>
<br>
I have never used nomodeset, but this seems to explain what it does:<br>
<br>
<a href="https://askubuntu.com/questions/207175/what-does-nomodeset-do" rel="noreferrer" target="_blank">https://askubuntu.com/questions/207175/what-does-nomodeset-do</a><br>
<br>
That page is pretty old now, so things have likely changed since then.<br>
<br>
So what all this implies is that you have graphics driver problems,<br>
which I think you already know.  Using nomodeset may get you to be<br>
able to see a GUI screen, but it is not a long term solution as it is<br>
likely that the kernel modesetting code is now used by all video<br>
drivers and you will not get anything except the most basic<br>
unaccellerated video modes without it.  The mode that it is using is a<br>
bit strange too.  It is 77.0 Hz, which reads like a text mode rather<br>
than a graphics one.  I am guessing that it is the mode provided by<br>
the VESA code in the BIOS that has the highest clock rate.  I think<br>
you are lucky that your screen actually supports that mode, as it<br>
appears that using nomodeset means that the video drivers do not probe<br>
the hardware at all to find out what might match.<br>
<br>
What is the video card?  What drivers are you using for it?  Is there<br>
a PPA you can install to get later drivers?  Can you install an older<br>
version of the graphics drivers and get it to work?<br>
<br>
>From the command line, the ubuntu-drivers command can be used to<br>
select which video drivers are installed.  As I have the Nvidia PPA<br>
installed, I get a lot of options to choose from with my Nvidia GT1030<br>
card:<br>
<br>
root@mypvr:/etc/X11# ubuntu-drivers list<br>
nvidia-driver-410<br>
nvidia-driver-450<br>
nvidia-driver-415<br>
nvidia-driver-440-server<br>
nvidia-driver-418-server<br>
nvidia-driver-390<br>
nvidia-driver-435<br>
root@mypvr:/etc/X11# ubuntu-drivers devices<br>
== /sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0 ==<br>
modalias : pci:v000010DEd00001D01sv00001043sd000085F4bc03sc00i00<br>
vendor   : NVIDIA Corporation<br>
model    : GP108 [GeForce GT 1030]<br>
driver   : nvidia-driver-415 - third-party free<br>
driver   : nvidia-driver-390 - distro non-free<br>
driver   : nvidia-driver-418-server - distro non-free<br>
driver   : nvidia-driver-450 - third-party free recommended<br>
driver   : nvidia-driver-435 - distro non-free<br>
driver   : nvidia-driver-440-server - distro non-free<br>
driver   : nvidia-driver-410 - third-party free<br>
driver   : xserver-xorg-video-nouveau - distro free builtin<br>
<br>
If you have an Nvidia card, to update to the latest PPA versions, just<br>
add the PPA:<br>
<br>
<a href="https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa" rel="noreferrer" target="_blank">https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa</a><br>
<br>
sudo add-apt-repository ppa:graphics-drivers/ppa<br>
sudo apt update<br>
<br>
and then run:<br>
<br>
sudo ubuntu-drivers install<br>
<br>
You can also use apt install to select specific versions of the video<br>
driver packages.<br>
<br>
I am currently running the 450 drivers as they seem better than the<br>
earlier ones (slightly less buggy).  I have been getting video lockups<br>
where the screen freezes but the rest of the system is still running<br>
fine.  Occasionally I was able to get Ctrl-Alt-Backspace to restart X<br>
and recover from the freezes, but mostly I needed to wait until I was<br>
not recording and then reboot as nothing else worked.  I have not been<br>
on the 450 series drivers long enough to know if they fix this as the<br>
freezes were only once or twice a week and seemed to happen when a<br>
screen mode change was done.  Since I have now changed all my mode<br>
setup to prevent the use of interlaced modes, that may also be<br>
helping.<br></blockquote><div><br></div><div><div class="gmail_quote"><div><br></div><div>My drivers are as follows:</div><div><br></div>steve@steve-EP45-UD3P:~$ ubuntu-drivers devices<br>== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==<br>modalias : pci:v000010DEd000006E4sv00003842sd0000C725bc03sc00i00<br>vendor   : NVIDIA Corporation<br>model    : G98 [GeForce 8400 GS Rev. 2]<br>driver   : nvidia-340 - distro non-free recommended<br>driver   : xserver-xorg-video-nouveau - distro free builtin</div><div class="gmail_quote"><br></div><div class="gmail_quote"><div>I updated the nvidia drivers, something was definitely installed, and the same driver is shown.  I got rid of the nomodeset argument to grub. Now it boots to the normal screen at the normal resolution.  Going back to an earlier recommendation of yours, I check the X11 conf file and it had DMPS set to false already.  So I set it to true and added the section setting the timings to zero.  So far, I've not had the black screen problem again.</div></div></div></div></div>