From nobody Mon Feb 28 08:39:51 2022 X-Original-To: freebsd-x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EC80519E9D35 for ; Mon, 28 Feb 2022 08:40:02 +0000 (UTC) (envelope-from freebsd-x11@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4K6YjF6xkQz4lMh for ; Mon, 28 Feb 2022 08:40:01 +0000 (UTC) (envelope-from freebsd-x11@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by mailhost.netlabit.sk with ESMTPSA; Mon, 28 Feb 2022 09:39:52 +0100 id 00DD6037.621C8A58.00009357 Date: Mon, 28 Feb 2022 09:39:51 +0100 From: Milan Obuch To: freebsd-x11@freebsd.org Subject: Dynamic multimonitor setup question Message-ID: <20220228093951.30914524@zeta.dino.sk> X-Mailer: Claws Mail 3.18.0git333 (GTK+ 2.24.33; i386-portbld-freebsd11.4) List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4K6YjF6xkQz4lMh X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-x11@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-x11@dino.sk X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dino.sk]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-x11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5578, ipnet:84.245.64.0/18, country:SK]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, for some time I am using various PCs with multiple video outputs, either Intel or AMD built-in graphics (i915kms or radeonkms). It is quite common for such setup presenting more video outputs, which allows more displays to be connected. For some time, I am using some manually started scripts to modify the setup, kind of --- 8< ----------------------------------------------------------------- #! /bin/sh xrandr --output DVI-D-1 --auto xrandr --output VGA-1 --auto xrandr --output VGA-1 --left-of DVI-D-1 --- 8< ----------------------------------------------------------------- to activate monitors to be used independently as larger working area. If such setup is static box, not moved, everything is OK, no need to make any change later. Recently, I've got a GPD's MicroPC for mobile usage, which changes the play. There is internal display with resolution 720x1280 (this needs rotation right in order to be used normally, not breaking one's neck and having usual corelation mouse to screen), with HDMI output available to attach a monitor, possible larger (up to 4K works well, tested). I can manually switch the second display on, set resolution as required (using --auto is the simplest way), start some program and use it on additional monitor etc. What I'd like to achieve is some dynamic setup, ideally ability to launch some script when monitor is detected on HDMI output (connect/disconnect event). Has anybody some hints for me? As all notebooks and similar devices probably have additional video output, this functionality is, I think, really desired. Regards, Milan