Gentoo Archives: gentoo-user

From: Bill Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] semi OT: Displayport
Date: Wed, 30 May 2018 03:19:26
Message-Id: f2e3a30a-98ef-a7ae-2285-2e46d4909518@iinet.net.au
In Reply to: Re: [gentoo-user] semi OT: Displayport by Andrew Udvare
1 Thanks for the link, looks like its going to be "fun" :) - I think using
2 an inotify file watcher might be the best/low resource way to detect the
3 event.
4
5
6 BillK
7
8
9
10 On 05/30/18 10:23, Andrew Udvare wrote:
11 >
12 >> On 2018-05-29, at 22:03, Bill Kenworthy <billk@×××××××××.au> wrote:
13 >>
14 >> Can anyone suggest a way to detect when the displayport adapter is
15 >> plugged in?
16 >>
17 > The event is provided by the driver(s) and if there is no event at all then you have to use a script that loops forever querying to see if something has changed. You could try grep'ing `xquery -q` every few seconds.
18 >
19 > This post says there might be something in /proc to track:
20 >
21 > https://unix.stackexchange.com/questions/13746/how-can-i-detect-when-a-monitor-is-plugged-in-or-unplugged
22 >
23 > Andrew