You are not logged in.

#1 2019-09-25 22:54:29

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,434
Website

What is simulating an XF86Display key press when a monitor connects?

edit: Updated title after discovering the cause of the arandr launch, which is that some unknown program is simulating an XF86Display key press when a monitor is connected to the system.

There is something on all of my Arch systems (all running Openbox) that is launching arandr whenever a new monitor is detected. I think that I first noticed this a few months ago but so far I haven't been able to track down the source. Each time I end up giving up after about 5-10 minutes and moving on.

Where I've looked so far (I may have missed something):

  • arandr package files (no udev or acpi rules, nothing that seems related)

  • /etc/udev

  • /etc/acpi

  • journalctl

  • Openbox configuration and log

Does anyone know what it could be?

Last edited by Xyne (2019-09-26 02:02:17)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#2 2019-09-25 23:33:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,163
Website

Re: What is simulating an XF86Display key press when a monitor connects?

No idea, but I'd suggest a divide and conquer approach: try a different WM (or no WM at all, just a terminal started from xinitrc).  Trying another user might be wise, except that this is happening on multiple systems ... you haven't by chance cloned any configs have you (effectively making users on different systems 'pseudoreplicates')?

You might also be able to look at the process tree of the arandr process - what are the parent process(es)?

Last edited by Trilby (2019-09-25 23:35:38)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-09-26 00:42:22

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,434
Website

Re: What is simulating an XF86Display key press when a monitor connects?

Thanks, that helped me track it down to openbox, at least indirectly. I had arandr bound to the XF86Display key in a shared set of key bindings. When a new monitor is detected, openbox or something else seems to be simulating an XF86Display key press. I still don't know what, but at least I can disable the arandr pop-ups and rebind the key to send notifications instead.

I'm still curious about the origin of the simulated key press.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2019-09-26 10:14:27

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 7,299

Re: What is simulating an XF86Display key press when a monitor connects?

Followed some links[1] that brought me to https://cgit.freedesktop.org/xorg/proto … 86keysym.h

#define XF86XK_Display		0x1008FF59   /* Output switch key           */

Combining info from other links[2]  it seems that there are atleast 2 cases that generate an XF86Display event :
- a "display" button on laptops (could be also present on so-called multimedia keyboards)
- X detects a "screen change event"
edit
This is probably a wrong interpretation by me, see post #5 & #6 .
end-of-edit


[1]
https://wiki.archlinux.org/index.php/Xmodmap
http://wiki.linuxquestions.org/wiki/Lis … by_Xmodmap

[2]
https://duckduckgo.com/?q=%22xf86displa … fsb&ia=web

Last edited by Lone_Wolf (2019-09-26 12:30:48)


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#5 2019-09-26 11:58:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,163
Website

Re: What is simulating an XF86Display key press when a monitor connects?

Lone_Wolf wrote:

- X detects a "screen change event"

Which links are a reference for this?  This would definitely be new and (I believe) undocumented behavior of the X server.  I grepped the source code for the xorg-server package for both that constant symbol and value, and neither were present.  I also grepped for all SendEvent calls and could not find any that seemed to serve this function.

Some WMs / DEs would likely want to respond similarly to a press of that key and a screen change event, but I highly doubt the Xorg server simulates a key press in response to a screen change event.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2019-09-26 12:28:59

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 7,299

Re: What is simulating an XF86Display key press when a monitor connects?

https://sites.google.com/site/akohlmey/ … th-presets is what made me write that.

Upon re-reading it, I may have been to hasty.
It does seem the author of that considered XF86Display as "screen change event" .


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#7 2019-09-26 13:19:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,163
Website

Re: What is simulating an XF86Display key press when a monitor connects?

Yes, they are suggesting a user of their tool could configure it to be launched by screen change events or key presses.

Xyne, this may be obvious, but have you disabled the key binding (was it in open box) to confirm that it is indeed a XF86Display key event that is triggering arandr?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2019-10-15 02:18:17

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,434
Website

Re: What is simulating an XF86Display key press when a monitor connects?

Trilby wrote:

Xyne, this may be obvious, but have you disabled the key binding (was it in open box) to confirm that it is indeed a XF86Display key event that is triggering arandr?

Sorry for the late follow-up. Yeah, I rebound the key to send a notification instead, which it does every time a screen is detected.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB