2

This issue showed up in 17.04, and followed into 17.10 when I upgraded. It happens when booting Xorg, Unity, Ubuntu setups.

The problem is that although my desktop monitor, a Samsung 22" SVGA monitor, is selected as #1, and is set as the primary display, when the computer is rebooted, the boot sequence is shown on both monitors for some reason, and the SIGN IN dialog shows up on #2 monitor...a Vizio 32" TV that's 25 feet away from my desk. When that TV is OFF (but plugged into the HDMI cable from the computer), it's sometimes difficult to enter the password.

When boot sequence is finished, after I've entered the boot password 'blind', it does boot to the desktop on #1 monitor.

Why isn't the Primary Display used during boot as config'ed in Settings? Is there a way to force Grub to only display on #1 monitor during boot by editing Grub? How?

Mobo: ASUS F2A85M PRO Quad core BIOS: AM 5109 CPU: AMD A10-5800K APU: Radeon HD Graphics Graphics: AMD Trinity, Radeon HD 7660D

Thanks!

On edit, Jan. 30th: Doesn't anyone have any clue to why this happens? It's annoying and there's other related glitchy stuff I didn't mention that happens as well. It this a bug? Worthy of a bug report?

On Edit: In answer to emk2203 below.

Xorg is shown on both monitors during boot but it doesn't stay, on my setup. I get a reddish blank screen on the monitor eventually, and the boot sequence ONLY on the TV if it's on. I don't have a graphics card and swapping the cables would not help as I can't, they are different types...the monitor, a traditional computer monitor, is connected via a SVGA cable to the mobo's VGA connector. The TV is connected with a HDMI cable. Both of these outputs are hardwired and part of the mobo. There is nothing in BIOS that tells me which one is primary but with all mobos I'm familiar with, Port #1 for video is always the SVGA or DVI port. There's no way to set boot to port #2 that I can find, so it boots to #1. Which is what I want of course, #1 is the computer monitor after all. It's 17.10 that doesn't seem to be able to handle which is which and throws up the login boot screen to #2. On the desktop, Ubuntu occasionally and randomly opens an app on the #2 screen for some reason. I double click an app, and it never shows up, eventually I find it over on the TV when I turn it on?? Or when I go into Settings and turn off #2. Sorry, can't say it's any particular app as it's random. It's happened to Grsync, Google Earth, just to name a couple.

I will try your script and let you know. Thanks!

Here's the Xrandr output: xrandr

Screen 0: minimum 320 x 200, current 3600 x 1080, maximum 16384 x 16384

DisplayPort-0 disconnected (normal left inverted right x axis y axis)

VGA-0 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050     59.88*+
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.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-0 connected 1920x1080+1680+0 (normal left inverted right x axis y axis) 698mm x 393mm
   1920x1080     60.00*+  60.00    59.94    24.00    23.98  
   1920x1080i    60.00    59.94  
   1280x720      60.00    59.94  
   1024x768      75.03    70.07    60.00  
   800x600       72.19    75.00    60.32  
   720x480       60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08

Edit Feb. 16 this is the script I used. Could not figure out how to use VIM so used Nano. This script didn't change anything, nor did changing all the 'PRIMARY' to 'SECONDARY' or visa versa. However, I have no idea if the script even ran:

PRIMARY="VGA-0"
SECONDARY="HDMI-0"

xrandr | grep $SECONDARY | grep " connected "

if [ $? -eq 0 ]; then

xrandr --output $SECONDARY --auto --output $PRIMARY --primary

else

xrandr --output $SECONDARY --off --output $PRIMARY --primary

fi
  • Not a solution, of course, but so you know, you don't have to type it "blindly", just move the mouse/touchpad. – user692175 Jan 19 '18 at 19:40
  • I've moved the mouse hundreds of times over the months....doesn't work. This is a desktop, I have no mousepad. What I do is press 'Enter', that brings focus to the password area, than I blind type the password in. – user464356 Jan 19 '18 at 22:18
  • Same issue on a Acer Aspire 5750G laptop with NVIDIA GT540M and Ubuntu 19.10. Started with upgrade to 19.10, remained even after a clean install. One solution I found is to open nvidia-settings in terminal and switching from Ndidia-performance to Nvidia-on-demand and reboot. Probably this gave control back to the onboard Intel graphic-card during boot resolving the VGA(laptop screen)/HDMI(external monitor) mess. – dr mat Feb 13 at 9:03
  • I experienced the exact same issue with an Nvidia card, so my post is pertinent, even if the question poster has a different card. I solved the problem in the way described and even if my approach may not be viable in the questioneer's setting it might provide helpful to other Nvidia owners with this problem that landed on this thread looking for an answer like happened to me – dr mat Feb 16 at 9:39
0

The settings you made in Xorg are session-specific, and apply to the session after you have logged in.

The default Xorg setup for the login screen, however, sees the #2 monitor as primary, and shows the login there on #2. System messages during boot appear on both monitors.

A shortcut can be to just swap the cables on the graphics card outputs and make the desired primary monitor the default primary monitor as well.

A software solution would be to switch the primary and secondary off during startup of Xorg.

The details of that depend very much on your specific setup. Run xrandr within X in a terminal, it will give you an overview of your output ports, their names and if anything is connected or not.

Let's assume that your outputs are named DVI-D-0, the TV, and DVI-D-1, the monitor. Also, the monitor being off implies xrandr not showing connected. The last assumption might be untrue, please check with your system. Modify accordingly.

Make a script in /etc/X11/Xsession.d and name it 45custom_xrandr-settings.

PRIMARY="DVI-D-1"
SECONDARY="DVI-D-0"

xrandr | grep $SECONDARY | grep " connected "
if [ $? -eq 0 ]; then
    xrandr --output $SECONDARY --auto --output $PRIMARY --primary 
else
    xrandr --output $SECONDARY --off --output $PRIMARY --primary
fi

This should make the desired primary monitor the primary also for login and switch off the second monitor for Xorg as well (so no wandering with the mouse in a 'black hole' when the monitor is not there, for example).

|improve this answer|||||
  • OK, took several days to find time, and then at least 6 hours learning how to write a script for this. And it did nothing different. Still ends up with the login dialog box on the SECONDARY instead of the PRIMARY. Like I said earlier, this is not just about logging in, occasionally, when I try to open an app, it will show up on the TV! – user464356 Feb 15 '18 at 21:14
  • After two years, and after changing over to 18.04. I've always installed updates as they came along and one thing has changed. There are still numerous problems with the Ubuntu/Cinnamon handling of dual monitors that are still evident. Very frustrating to have to deal with it randomly but often. – user464356 Feb 14 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.