I've used disper -l
for many generations of ubuntu in order to determine which monitor I'm attached to, and whether an external monitor with either vga or hdmi is attached. Having now upgraded to 18.04, I find that this command is generating a segmentation fault. The problem seems to be around for a while, as reported in this bug report but nobody seems to be doing anything about it. Is there another program that has the same functionality? I've looked at xdpyinfo
which has a lot of information, but not what I need, which is enough resolution information to distinguish between monitors, plus information about whether multiple monitors are attached, and by what connection.
Thanks!
I can confirm this bug 1655275, it seems to be caused by some anti-Meltdown or anti-Spectre fixes (or something similar as CVE-2017-1000364 with Scilab) since my apport crash log in comment #9 contains strange lines:
I have never used
disper
, but I can recommendxrandr
as alternative.I can confirm the bug, too.
But good news! This seems extraordinarily easy to fix.
I generated a patched version (available on Github if interested),
But please don't unconditionally trust random sources (e.g. me).
Read below for a complete guide on how to do this for yourself, instead!
Cherry picking AUR into debian upstream
Cloning and adding remote
Clone the Debian source (source here),
Add AUR upstream as remote,
[output]
Yes, they're different repositories -- not merely different branches -- but for this cherry-picking patch it's surprisingly convenient to just pretend, for a while.
Just don't merge the "branches" unless you have a good reason, lest you cause an unecessary mess.
Checking out the
master
's"Rename" (create new branches) their respective
master
(for your own record),[output]
Sanity check on that,
[output]
Seems good!
You can explore and view the differences like so,
Identifying new commits
What we're interested in is that this,
[output]
does not include the recent patch here,
[output]
Three (3) new commits! The second one is the fixing patch.
Cherry-picking (what we want)
Switch to
debian-master
and branch a local version (to not confuse the merge with the upstreams),[output]
Of course we expected a merge conflict...
But did you really expect it to be only
README
? Let's fix it!I merged in the nice new section of
README
and sanity checked, then continued with an unchanged commit message.Bump the version
Identify where the version is kept,
So you can add a dummy release section to
debian/changelog
(for your own record), or not.I copied
0.3.1-3
to a new0.3.1-4
section and wrote a few words.Test it!
Does it work?
Seems good to me. Let's install,
Let's commit and tag it (for future reference),
I really recommend a tag or something and a version bump. Be nice to future you.
Happy hacking.
Disper is no longer in Debian and will probably soon disappear of Ubuntu.
I wrote a very very simple remplacement and published it here: https://github.com/fidergo-stephane-gourichon/simplest_external_screen_config
Here's it's README:
I have put installation instructions for non-developers to the README.me there.