Re: Dynamic multimonitor setup question

Milan Obuch <[email protected]>
Newsgroups gmane.os.freebsd.devel.x11
Message-ID <[email protected]>
On Tue, 15 Mar 2022 11:24:51 +0100
Mateusz Piotrowski <[email protected]> wrote:

> On 15/03/2022 03:03, Alexey Dokuchaev wrote:
> > On Mon, Mar 14, 2022 at 10:16:46AM +0100, Milan Obuch wrote:  
> >> I did some searching, googling and similar... a found two ports
> >> already in FreeBSD's port collection, x11/arandr and x11/srandrd.
> >> The former is just a graphical interface to xrandr, easy to
> >> understand and intuitive (similar to the way Windows and MacOS X
> >> does multimonitor setup). The latter should do what I am after,
> >> but it did not work for me :(
> >>
> >> Per 'man srandrd', if started with 'srandrd -v -n some_script', it
> >> should output some debug data (-v), stay in foreground (-n) and
> >> invoke some_script when monitor is being plugged or unplugged. It
> >> does not work for me. Something happens just when I invoke
> >> 'xrandr' in another terminal - I see some debug output, but the
> >> script is not invoked.
> >>
> >> Is anybody here using x11/srandrd? I can debug the script
> >> invocation, but if the event is not detected without external
> >> intervention, it is not really usable for me. And I have no
> >> experience with debugging the issue in graphics stack...  
> 
> I'm using srandrd to recenter my wallpapers when I configure an
> external monitor (I always do it manually with either arandr or
> xrandr).
> 
> I just start srandrd like this:
> 
> srandrd -e -n ~/bin/srandrd-handler
> 
> ~/bin/srandrd-handler is a shell script with an executable bit set
> and it contains only the following:
> 
> #! /bin/sh -
> feh --no-fehbg --bg-center --image-bg 'black' "${HOME}/wallpaper.png"
> 

Thanks for response. Using similar method to start, with full path
pointing to handler, I am getting script called and it does what is
intended... but I have just

---- 8< ------------------------------------------------------------

#! /bin/sh

/usr/bin/env>/home/milan/randr-log-env

---- 8< ------------------------------------------------------------

in my script, so nothing is currently done, just logged.

The main problem, however, still remains - action is done not when
cable is being plugged/unplugged, but xrandr or arandr must be called
manually, then intended action occurs.

What hardware do you have? In my case, graphics device is

---- 8< ------------------------------------------------------------

vgapci0@pci0:0:2:0: class=0x030000 rev=0x06 hdr=0x00 vendor=0x8086 device=0x3185 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Intel Corporation'
    device     = 'GeminiLake [UHD Graphics 600]'
    class      = display
    subclass   = VGA

---- 8< ------------------------------------------------------------

and kernel driver used is i915kms.ko.

Regards,
Milan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.