Monitors go black

rrussell.john

New Member
Joined
Aug 31, 2022
Messages
8
Reaction score
7
Credits
128
System has 3 monitors installed on integrated outputs, Two are HDMI and one VGA. It runs 24x7 with the monitors turned off at night.
Dell, OptiPlex 7010
Intel I&-3770 CPU @ 3.4 Ghz x 8
Mesa Intel HD Graphics 4000(IVB-GT2)
Disk 250 GB
Ubuntu 22.04.1 LTS installed to hard drive
64 bit GNOME 42.2
Windowing System Wayland
Have been running Ubuntu for several years. Always update when offered. My skills and understanding of Linus are limited. Usually able to find solutions online for problems.

Before the upgrade, monitors did not turn black and settings could be saved.
After update to Ubuntu 20.4.1, the monitors came up in wrong order. Any change caused two of them to black out. Reboot or log off and log back in to recover, but monitors still in wrong order.
Turning the monitors off and back on causes the two monitors to be blacked out.

While troubleshooting, I turned off two monitors in settings. There was no option to turn them back on or to discover them. Not detected on reboot.
Finally deleted monitors.xml. The monitors came back up after a reboot.

Changed cables to get them in the right order. Notice that no settings changes are being saved.
For instance, Double-Click speed is much too fast. I have to change the Double-Click Delay in Accessibility after each login.

When screens are blacked out, dragging the mouse across a screen will leave a white tail that reveals the applications still in place below. Cannot tell if still running or not.
This page would not accept the system log attachment.
 


You can share your logs with a paste service, if they won't fit here. I have one set up, but it mostly just gets spam, so I may someday just take it offline as nobody uses it.


There are countless other paste services out there, some even integrating with the 'paste' command in the terminal. You just need to configure the address, I'm pretty sure.

As you're relatively new, when you share a URL it needs to be approved by a moderator. That restriction goes away quickly and is a defense against spam - of which we would get a ton without this system in place. You're probably just a couple of posts away from having that restriction lifted.
 
L-T Paste -- first I've heard of it, @KGIII
 
After update to Ubuntu 20.4.1,

Should that be 22.04.1?

Or did you update a 20.04 install to 22.04, and that is when the problems began?

I don't suppose you have Timeshift installed? We can talk more about that later.

For the moment, if you have not already tried this - boot your Ubuntu, and when you get to the login screen, type in your password but don't press Enter.

Bottom right of the password field is a cog where if you click it, it will offer you the opportunity to launch Ubuntu under Xorg.

Choose that and then press Enter to launch your session, and tell us if the problems remain.

Cheers

Wiz
 
Thank you for the assistance!

You are right, of course. It was 22.04.1. I guess I fat-fingered it.

There was a new software popup and it included the ugrade to 22.04.1. Indeed that is when the problem started.

I never paid any attention to that cog on the login screen before, but Xorg did boot the system.
I thought not at first, but after about five minutes, the screens finally came up. A few minutes later, the mouse started working. There is a delay between a mouse click and anything happening, but it does work normally inside an application. Here in this forum, for example.
If I click on an icon or the power button in the corner, it freezes up for quite awhile. Once that happens the mouse moves only short distances at a time and freezes again. I just clicked the power button in the corner and had to move the mouse in very short steps to get down to the setting option. Once I clicked on that and the setting app opened up, the mouse started behaving normally after a considerable time delay. In fact, when any app is started, the mouse disappears for a few minutes. Once it reappears, it behaves normally as long as I am working inside an app.

I tried to move the monitors around and clicked the button to apply. Everything froze up. I was not able to select that option to keep or discard the changes. After a minute or so, it times out and the settings went back. The mouse started working again.
Dragging a window has to be done in small steps. Everything freezes up for brief periods while dragging. Minimizing or maximizing a window causes a brief freeze.

I can now turn the monitors off and everything is good when I turn them back on.

I guess I still have problems, but it is a little better. At least now the Black screens are not happening.

I don't believe there ever was an option in settings to discover monitors or show their locations from the time Ubuntu was first loaded on this system.
 
Well, it sounds as if some progress is being made, perhaps stick with Xorg for now?

It's been years since I used more than one monitor, but does

Settings - Display

reveal the existence of multiple monitors?

If not, you have a command in your system called

xrandr

and typing and entering that in Terminal will provide some output.

xrandr has a graphical (GUI) front end called

arandr

and you can install that with

Code:
sudo apt-get -y install arandr

With the mouse erratic behaviour -

Do the monitors have a touch screen functionality enabled?

There is a command known as

xinput

you have already installed, and it can be used to change the devices from point A to point B and see if they work.

The best time to have performed a Timeshift snapshot would have been when you were on 20.04 and before you upgraded to 22.04, and then you could rollback, but not to worry.

If you want to (and that is your call), you could install Timeshift from your Ubuntu's repositories through the software centre or from terminal (making sure that Universe repository is checked), and take a snapshot now. That way if anything goes wrong with monkeying with monitor device settings you can at least rollback to where you are now.

If you have questions on Timeshift, I provide the following snippet for those new to it


The bottom link is where I can help you further.

Wizard
 
Thanks so much for your assistance. This is the best online support that I have ever received.

I did try logging in without Xorg and the system behaves exactly the same as far as I can tell
However, I will take the advice and use Xorg for the present.

I have never worried about going back to previous versions. There is an external drive that I use to copy my important files to. Originally when I moved to Ubuntu, I was prompted to set up a backup, and it runs regularly, but I have no idea how to restore. A reinstall is easy so I have not been concerned.

Settings, Display does show all three monitors. However, there is no option to discover or to display on the monitors which is which. When I turned off a monitor, it disappeared and I had to delete the monitors.xml file for it to be found again.

The monitors do not have touchscreen functionality. In Settings, I moved the Mouse Speed slider all the way to the right and that does help. The mouse still lags, but not as long. Dragging a window, the window jumps instead of moving smoothly. I see that the settings for Mouse speed and Double-click delay are now persistent. That is progress!

I was able to change the monitor placement using arandr and it worked fine. However the change was not persistent.
At the risk of making this posting too long, here are outputs from xinput and xrand.
Output from xinput:
johnny@Millie:~$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Optical Mouse id=9 [slave pointer (2)]
⎜ ↳ LogoTech Mechanical Keyboard Consumer Control id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ LogoTech Mechanical Keyboard id=10 [slave keyboard (3)]
↳ LogoTech Mechanical Keyboard System Control id=12 [slave keyboard (3)]
↳ LogoTech Mechanical Keyboard id=13 [slave keyboard (3)]
↳ Dell WMI hotkeys id=14 [slave keyboard (3)]
↳ LogoTech Mechanical Keyboard Consumer Control id=15 [slave keyboard (3)]


Output from xrandr:
johnny@Millie:~$ xrandr
Screen 0: minimum 320 x 200, current 5760 x 1080, maximum 16384 x 16384
VGA-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.00*+ 74.97
1600x900 60.00
1280x1024 75.02 60.02
1440x900 59.89
1280x960 60.00
1366x768 59.79
1280x800 59.81
1280x720 60.00
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 59.94
720x400 70.08
HDMI-1 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.00*+ 50.00 59.94
1920x1080i 60.00 50.00 59.94
1680x1050 59.88
1280x1024 75.02 60.02
1440x900 59.90
1280x960 60.00
1280x720 60.00 50.00 59.94
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.00*+ 50.00 59.94
1920x1080i 60.00 50.00 59.94
1680x1050 59.88
1280x1024 75.02 60.02
1440x900 59.90
1280x960 60.00
1280x720 60.00 50.00 59.94
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08
DP-2 disconnected (normal left inverted right x axis y axis)
 
MONITORS

OK, I've got the persistence ironed out, I believe.

I just need you to tell me whether the xrandr output you provided is generated from the way you like the monitors.

That is,

HDMI-2 is your primary monitor and it is on the left
VGA-1 is in the middle and
HDMI-1 is on the right

Is that correct?

If so, I can write a small script for you containing the necessary parts (not all of) from the lines featuring the word

connected

We make a folder for you under your Home called /bin/ , make the saved script executable and once that is done, we go to your

Show Applications and in the search field start to type in

startup

We open Startup Applications, and add an entry to that, featuring the script, save that and reboot and you should be good with the persistence.

MOUSE


Likely can't help you a lot there, it may be better to start a separate Thread in Hardware and Peripherals, after we've got the monitors right, and see if someone can take meeces to pieces.

REINSTALLING A 20.04

If, after all this, you choose to reinstall a 20.04, I would let you know that Canonical have just released

20.04.5

and you can get it from them, or from DistroWatch - by using it, it would reduce how many updates you need to perform when first installed.

Before installing those updates, I would install Timeshift and run a snapshot.

Cheers, c u 2morrow

Wizard
 
Thanks Wizard.

Yes the monitors are fine the way they are now. I switched the cables to get them that way. If you will provide that script and let me know how to implement it, I will be happy to do so.

I am able to work with things the way they are, so I will stay with version 22.04.1 and start a separate thread for the mouse issue.

An automatic backup runs daily, but I have not learned how to restore from backup. I will see about finding that information online and do a restore so I can more easily address problems in the future.

I have been running Linux for about 7 years and been much happier without MS Windows. At least most problems are well documented and explicit instructions are provided.
 
OK, thanks for that. You did not answer, exactly, my question

That is,

HDMI-2 is your primary monitor and it is on the left
VGA-1 is in the middle and
HDMI-1 is on the right

Is that correct?

So I will assume it is, and the below reflects that. Read all of this Post before you commence.

The content of the script will contain one long string that you should copy and paste

Code:
xrandr --output HDMI-2 --primary --mode 1920x1080 --rate 60.00 --output VGA-1 --mode 1920x1080 --rate 60.00 --right-of HDMI-2 --output HDMI-1 --mode 1920x1080 --rate 60.00 --right-of VGA-1

Note that you may need to scroll to the right to get all of that.

Note also that preceding each of the words output, primary, rate and right-of is a double dash -- in case font differences make it look like a long dash.

The full script will look as below. The bit at the top is called a Shebang and tells our Shell that a bash script is following.

Code:
#!/bin/sh

xrandr --output HDMI-2 --primary --mode 1920x1080 --rate 60.00 --output VGA-1 --mode 1920x1080 --rate 60.00 --right-of HDMI-2 --output HDMI-1 --mode 1920x1080 --rate 60.00 --right-of VGA-1

So when you are ready

STEP 1 - MAKE A HOME FOR THE SCRIPT - I'll call it "3monitors"

1. Open a fresh instance of Terminal and type and enter the following commands one at a time

Code:
mkdir bin

cd ~/bin

touch 3monitors.sh

The Tilde ~ in the 2nd command means the same as /home/johnny/ for you, but if used in scripting best practice is to use the full path including /home/johnny/

The touch command creates the empty file 3monitors.sh which we will edit next.

STEP 2 - COMPILE THE SCRIPT

Here you can use what you are comfortable with - either console-based (Terminal) command nano, or GUI-based (graphical) gedit, so either of

1.

Code:
nano 3monitors.sh

OR

gedit 3monitors.sh

2. Copy and paste the script content

Code:
#!/bin/sh


xrandr --output HDMI-2 --primary --mode 1920x1080 --rate 60.00 --output VGA-1 --mode 1920x1080 --rate 60.00 --right-of HDMI-2 --output HDMI-1 --mode 1920x1080 --rate 60.00 --right-of VGA-1

3. Save and exit the file.

4. Make the file executable, with

Code:
sudo chmod +x 3monitors.sh

STEP 3 - TEST THE SCRIPT OPERATION

We want to see that the script content actually works before we commit it to our Startup Applications, so simply type and enter the following to check the path shows our new folder in it, and execute the command string

1.

Code:
echo $PATH

xrandr --output HDMI-2 --primary --mode 1920x1080 --rate 60.00 --output VGA-1 --mode 1920x1080 --rate 60.00 --right-of HDMI-2 --output HDMI-1 --mode 1920x1080 --rate 60.00 --right-of VGA-1

The Path output should show /home/johnny/bin perhaps at the beginning, and the xrandr string execution may or may not cause a flicker with your 3 screens but as long as nothing goes weird we know we are on track.

If something DOES go awry, come back here and we will investigate if not, proceed to the final Step.

STEP 4 - PLACE AN ENTRY FOR THE SCRIPT IN STARTUP APPLICATIONS

1. Go to the Show Applications (9 dots in a square shape) and start to type in Startup Applications and click it. There may be one or more entries already listed there.

2. Choose Add and you should have a window like this

uFeJhQ0.png


For Command you should enter

/home/johnny/bin/3monitors.sh

For name and comment you can choose what is meaningful to you, mine I used the other day to change screen resolution, looks like this

NgZPFoN.png


although mine has Edit because it already exists, and my entry point to Startup Applications looks like this

z0IirsF.png


Once saved and exited, you should be able to reboot and the changes will be persistent. Let us know how you go.

BTW (by the way) the xrandr command relies on an Xorg environment, Wayland uses a different set of protocols. If this goes OK, I advocate sticking with Xorg until you learn about Wayland.

Cheers

Wizard
 

Members online


Latest posts

Top