Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Commands for switching monitor?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
scruffyeagle
Posts: 73
Joined: 2011-09-06 19:11

Commands for switching monitor?

#1 Post by scruffyeagle »

First, let's get this out of the way: I'm accessing the Debian User Forums via a very old Toshiba Satellite laptop that has Ubuntu v10, Kernel v2, and Firefox v20. The online search engines and most of the reference websites have been converted into HTML5, and there are no common encryption algorithms. For example, debian.org is only accessible via secure mode, so therefore not at all for me. I consider myself lucky, that this site here is still available via this old Toshiba.

I have a major problem. The screen on my usual laptop (Dell 9400) died, I'm sure this is a hardware problem, because there's a portion of the booting process in Debian 10, which simultaneously streams output to both the laptop screen and my VGA output (which I have daisy chained as HDMI input into my TV). During that very short portion of the booting, I see the streaming boot process on the TV, but not on the laptop's screen. I get to see the login screen of D10, and I can log in - whereupon, the TV display loses signal & goes blank. The laptop's display stays jet black blank, the entire time. I can't even see the Dell logo displayed during initial power-up.

This coronavirus has shut down the local library, so I can't go use their computers. Also, there's nobody i can go to, for borrowing use of their machine - so, I seem to be on my own with this problem. Losing that old Dell is almost like losing a faithful old dog. Sure, it's got missing key caps, some key caps fall off repeatedly while typing, broken microphone, and a broken optical drive - but, I'm used to it. And, I get some satisfaction out of keeping it going. So, even though it's old, obsolete, and crippled, I hate to see it go. If I could reset the default display from laptop screen to VGA output, I could extend the useful life of that old Dell laptop a little longer...

Judging by the results of my search on Google, I'm fairly sure the X11 monitor selection can be reset from the command line. (I can use Google, but the results pointed to are inaccessible.) I can't tell whether this would be a single assignment command, or the editing of a configuration file. But, this is almost a moot point, given that there are only 2 small windows of visibility, where the display is being also routed to the external monitor (VGA/HDMI/TV).

1) Are there any parameters I could add into the Grub boot line, to re-route the display to the secondary output?
2) Is there a command for resetting the X11/Mate display from laptop screen to VGA output?
Last edited by scruffyeagle on 2021-03-21 03:39, edited 1 time in total.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Commands for switching monitor?

#2 Post by Head_on_a_Stick »

The xrandr command can be used to change the displays. An X.Org configuration file can be used to make any changes permanent but that won't work under Wayland (for obvious reasons).

Disclaimer: I couldn't be bothered wading through your text. Do you have a tl;dr summary?
deadbang

scruffyeagle
Posts: 73
Joined: 2011-09-06 19:11

Re: Commands for switching monitor?

#3 Post by scruffyeagle »

Head_on_a_Stick wrote:The xrandr command can be used to change the displays. An X.Org configuration file can be used to make any changes permanent but that won't work under Wayland (for obvious reasons).

Disclaimer: I couldn't be bothered wading through your text. Do you have a tl;dr summary?
I don't know what "tl;dr" means, but nothing on the Dell laptop is currently accessible. I'm sure there's a way to get into maintenance mode - but, it would require a command included as a boot parameter to route the display to the VGA output. (Can "xrandr" be used in that manner?)

Anyway, thanks for the advice (xrandr). That gives me someplace accessible to start working on a solution (the man pages on the Ubuntu v10 system).
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.

scruffyeagle
Posts: 73
Joined: 2011-09-06 19:11

Re: Commands for switching monitor?

#4 Post by scruffyeagle »

Head_on_a_Stick wrote:The xrandr command can be used to change the displays. An X.Org configuration file can be used to make any changes permanent but that won't work under Wayland (for obvious reasons).

Disclaimer: I couldn't be bothered wading through your text. Do you have a tl;dr summary?
Thanks for your reply, but never mind. It just hit me, that even a command at boot time won't work, because the Grub screen & everything associated with it isn't visible.

If I was to reinstall the Debian 10 OS, is it possible to set the VGA (NOT the laptop's built-in screen) as the primary video output during the installation process? Of course, this would be dependent on the installation program including VGA output the moment it started up.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.

peer
Posts: 450
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 22 times

Re: Commands for switching monitor?

#5 Post by peer »

I use the following script to change monitors from VGA-1 to HDMI-1 and back
#!/bin/bash

#This script is ment for the ACER PC
#This script checks which monitor is active (VGA-1 or HDMI-1) and then switches to the other monitor

if xrandr --listmonitors | grep "VGA-1"; then
xrandr --output "VGA-1" --off --output "HDMI-1" --auto
else
if xrandr --listmonitors | grep "HDMI-1"; then
xrandr --output "HDMI-1" --off --output "VGA-1" --auto
fi
fi

Post Reply