disper -l on 18.04 generates a segmentation fault. Are there alternatives?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
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!
command-line multiple-monitors display hdmi
add a comment |
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!
command-line multiple-monitors display hdmi
I can confirm this bug, seems to be caused by some anti-Meltdown or anti-Spectre fixes or something similar (my apport crash contains strange line -SegvReason: reading unknown VMA
). I have never useddisper
. Canxrand
become alternative?
– N0rbert
Jun 25 '18 at 9:25
it does look likexrandr
contains enough information for me to do what I want. Thanks very much indeed for the suggestion. Can you convert to an answer so that I can accept it?
– Leo Simon
Jun 25 '18 at 14:01
I can also confirm that bug and it's totally annoying that disper doesn't work anymore. xrandr is not so "smart" as disper when switching monitors.
– student
Sep 8 '18 at 19:31
However there seems to be a patch: bugs.debian.org/cgi-bin/bugreport.cgi?bug=844505 and bugs.debian.org/cgi-bin/… Is there a patched version available for ubuntu 18.04?
– student
Sep 8 '18 at 19:33
add a comment |
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!
command-line multiple-monitors display hdmi
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!
command-line multiple-monitors display hdmi
command-line multiple-monitors display hdmi
edited Jun 26 '18 at 1:49
muru
1
1
asked Jun 25 '18 at 6:29
Leo SimonLeo Simon
56421024
56421024
I can confirm this bug, seems to be caused by some anti-Meltdown or anti-Spectre fixes or something similar (my apport crash contains strange line -SegvReason: reading unknown VMA
). I have never useddisper
. Canxrand
become alternative?
– N0rbert
Jun 25 '18 at 9:25
it does look likexrandr
contains enough information for me to do what I want. Thanks very much indeed for the suggestion. Can you convert to an answer so that I can accept it?
– Leo Simon
Jun 25 '18 at 14:01
I can also confirm that bug and it's totally annoying that disper doesn't work anymore. xrandr is not so "smart" as disper when switching monitors.
– student
Sep 8 '18 at 19:31
However there seems to be a patch: bugs.debian.org/cgi-bin/bugreport.cgi?bug=844505 and bugs.debian.org/cgi-bin/… Is there a patched version available for ubuntu 18.04?
– student
Sep 8 '18 at 19:33
add a comment |
I can confirm this bug, seems to be caused by some anti-Meltdown or anti-Spectre fixes or something similar (my apport crash contains strange line -SegvReason: reading unknown VMA
). I have never useddisper
. Canxrand
become alternative?
– N0rbert
Jun 25 '18 at 9:25
it does look likexrandr
contains enough information for me to do what I want. Thanks very much indeed for the suggestion. Can you convert to an answer so that I can accept it?
– Leo Simon
Jun 25 '18 at 14:01
I can also confirm that bug and it's totally annoying that disper doesn't work anymore. xrandr is not so "smart" as disper when switching monitors.
– student
Sep 8 '18 at 19:31
However there seems to be a patch: bugs.debian.org/cgi-bin/bugreport.cgi?bug=844505 and bugs.debian.org/cgi-bin/… Is there a patched version available for ubuntu 18.04?
– student
Sep 8 '18 at 19:33
I can confirm this bug, seems to be caused by some anti-Meltdown or anti-Spectre fixes or something similar (my apport crash contains strange line -
SegvReason: reading unknown VMA
). I have never used disper
. Can xrand
become alternative?– N0rbert
Jun 25 '18 at 9:25
I can confirm this bug, seems to be caused by some anti-Meltdown or anti-Spectre fixes or something similar (my apport crash contains strange line -
SegvReason: reading unknown VMA
). I have never used disper
. Can xrand
become alternative?– N0rbert
Jun 25 '18 at 9:25
it does look like
xrandr
contains enough information for me to do what I want. Thanks very much indeed for the suggestion. Can you convert to an answer so that I can accept it?– Leo Simon
Jun 25 '18 at 14:01
it does look like
xrandr
contains enough information for me to do what I want. Thanks very much indeed for the suggestion. Can you convert to an answer so that I can accept it?– Leo Simon
Jun 25 '18 at 14:01
I can also confirm that bug and it's totally annoying that disper doesn't work anymore. xrandr is not so "smart" as disper when switching monitors.
– student
Sep 8 '18 at 19:31
I can also confirm that bug and it's totally annoying that disper doesn't work anymore. xrandr is not so "smart" as disper when switching monitors.
– student
Sep 8 '18 at 19:31
However there seems to be a patch: bugs.debian.org/cgi-bin/bugreport.cgi?bug=844505 and bugs.debian.org/cgi-bin/… Is there a patched version available for ubuntu 18.04?
– student
Sep 8 '18 at 19:33
However there seems to be a patch: bugs.debian.org/cgi-bin/bugreport.cgi?bug=844505 and bugs.debian.org/cgi-bin/… Is there a patched version available for ubuntu 18.04?
– student
Sep 8 '18 at 19:33
add a comment |
2 Answers
2
active
oldest
votes
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:
SegvAnalysis:
Segfault happened at: 0x7f1233f14add <XQueryExtension+45>: mov 0x968(%rdi),%rax
PC (0x7f1233f14add) ok
source "0x968(%rdi)" (0xffffffffd63a1188) not located in a known VMA region (needed readable region)!
destination "%rax" ok
SegvReason: reading unknown VMA
I have never used disper
, but I can recommend xrandr
as alternative.
add a comment |
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),
git clone <URL>
cd disper
make all
sudo make install
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),
git clone https://salsa.debian.org/python-team/applications/disper.git
cd disper
Add AUR upstream as remote,
git remote add AUR https://github.com/apeyser/disper
git fetch --all
git remote -v
[output]
AUR https://github.com/apeyser/disper (fetch)
AUR https://github.com/apeyser/disper (push)
origin https://salsa.debian.org/python-team/applications/disper.git (fetch)
origin https://salsa.debian.org/python-team/applications/disper.git (push)
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),
git checkout -b AUR-master AUR/master
git checkout -b debian-master debian/master
[output]
Branch 'AUR-master' set up to track remote branch 'master' from 'AUR'.
Switched to a new branch 'AUR-master'
Switched to a new branch 'debian-master'
Sanity check on that,
git branch -vv
[output]
AUR-master 4c36710 [AUR/master] Update README
* debian-master e3ca840 d/control: Remove ancient X-Python-Version field
debian/master e3ca840 [origin/debian/master] d/control: Remove ancient X-Python-Version field
Seems good!
You can explore and view the differences like so,
git log --graph --decorate --oneline debian-master
git log --graph --decorate --oneline AUR-master
git diff debian-master AUR-master
Identifying new commits
What we're interested in is that this,
git log debian-master -1
[output]
commit e3ca840a48208a79a5c96da1bd9f6f1b845f5773 (HEAD -> debian-master, origin/debian/master, origin/HEAD, debian/master)
Author: Ondřej Nový <onovy@debian.org>
Date: Mon May 14 08:10:02 2018 +0200
d/control: Remove ancient X-Python-Version field
does not include the recent patch here,
git log AUR-master -4
[output]
commit 4c367108b370d57ce178863fed7640bb846d3186 (AUR/master, AUR-master)
Author: Alexander Peyser <apeyser@users.noreply.github.com>
Date: Thu Aug 23 17:16:42 2018 +0200
Update README
commit 4c635d65244bcb2a86a9da86d00007de96a23626 (tag: disper-0.3.1.1)
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
apply XOpenDisplay return type patch
commit 01132563030b9230e8f007794c3269dd913c3052
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:17:07 2018 +0200
Update INSTALL and README
commit d0498b7892b36d183d09b3d905296ee7456ff24d (tag: disper-0.3.1)
Author: dev-disper@willem.engen.nl <>
Date: Tue Apr 23 12:01:43 2013 +0200
also update Debian version number
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),
git checkout debian-master
git checkout -b local
git cherry-pick 0113256..4c36710
[output]
[local d05e2bd] apply XOpenDisplay return type patch
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
1 file changed, 12 insertions(+), 2 deletions(-)
error: could not apply 4c36710... Update README
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Of course we expected a merge conflict...
But did you really expect it to be only README
? Let's fix it!
git mergetool # or, vimdiff README (or whatever)
diff -NaurbB README* --color
git cherry-pick --continue
rm README.orig
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,
rg 0.3.1 # or, grep -rn 0.3.1 (or whatever)
git blame debian/changelog
So you can add a dummy release section to debian/changelog
(for your own record), or not.
vim debian/changelog
git add debian/changelog
I copied 0.3.1-3
to a new 0.3.1-4
section and wrote a few words.
Test it!
Does it work?
make <Tab>
make all -n
make install -n
Seems good to me. Let's install,
make all
sudo make install
~~
Confirm that it works,
~~~bash
disper -l
Let's commit and tag it (for future reference),
git commit -v
git tag local/0.3.1-4 -a
I really recommend a tag or something and a version bump. Be nice to future you.
Happy hacking.
Hi @Yngman, tried the above, or at least what I thought it meant: (sorry, I can't format a stupid comment): sudo git clone salsa.debian.org/python-team/applications/disper.git cd disper sudo make all sudo make install But I'm still getting the same segmentation fault. suggestions?
– Leo Simon
Mar 29 at 6:15
Debug! 1. Todisper.py
, addself.add_option('--debug', action='store_const', dest='debug', const=logging.DEBUG, help='be very verbose')
2. Tosrc/xrandr/__init__.py
, addimport logging
and inget_display(name)
function of patch, addlogger = logging.getLogger('%s.%s' % ('disper', __name__))
3. Sprinkle some debugging!logger.debug("returning xopendisplay(%r): %r", name, disp)
, wheredisp = xopendisplay(name)
before returningreturn disp
Other tips areimport traceback; traceback.print_stack()
andimport pdb; pdb.set_trace()
.
– Yngman
Mar 30 at 13:24
Hi @Yngman, thanks for the quick response. Got stuck on step 2), not knowing any python. Would you be willing to communicate by email? Mine is leosimon@berkeley.edu
– Leo Simon
Mar 31 at 17:05
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1049452%2fdisper-l-on-18-04-generates-a-segmentation-fault-are-there-alternatives%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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:
SegvAnalysis:
Segfault happened at: 0x7f1233f14add <XQueryExtension+45>: mov 0x968(%rdi),%rax
PC (0x7f1233f14add) ok
source "0x968(%rdi)" (0xffffffffd63a1188) not located in a known VMA region (needed readable region)!
destination "%rax" ok
SegvReason: reading unknown VMA
I have never used disper
, but I can recommend xrandr
as alternative.
add a comment |
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:
SegvAnalysis:
Segfault happened at: 0x7f1233f14add <XQueryExtension+45>: mov 0x968(%rdi),%rax
PC (0x7f1233f14add) ok
source "0x968(%rdi)" (0xffffffffd63a1188) not located in a known VMA region (needed readable region)!
destination "%rax" ok
SegvReason: reading unknown VMA
I have never used disper
, but I can recommend xrandr
as alternative.
add a comment |
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:
SegvAnalysis:
Segfault happened at: 0x7f1233f14add <XQueryExtension+45>: mov 0x968(%rdi),%rax
PC (0x7f1233f14add) ok
source "0x968(%rdi)" (0xffffffffd63a1188) not located in a known VMA region (needed readable region)!
destination "%rax" ok
SegvReason: reading unknown VMA
I have never used disper
, but I can recommend xrandr
as alternative.
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:
SegvAnalysis:
Segfault happened at: 0x7f1233f14add <XQueryExtension+45>: mov 0x968(%rdi),%rax
PC (0x7f1233f14add) ok
source "0x968(%rdi)" (0xffffffffd63a1188) not located in a known VMA region (needed readable region)!
destination "%rax" ok
SegvReason: reading unknown VMA
I have never used disper
, but I can recommend xrandr
as alternative.
answered Jun 25 '18 at 14:30
N0rbertN0rbert
25.4k853121
25.4k853121
add a comment |
add a comment |
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),
git clone <URL>
cd disper
make all
sudo make install
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),
git clone https://salsa.debian.org/python-team/applications/disper.git
cd disper
Add AUR upstream as remote,
git remote add AUR https://github.com/apeyser/disper
git fetch --all
git remote -v
[output]
AUR https://github.com/apeyser/disper (fetch)
AUR https://github.com/apeyser/disper (push)
origin https://salsa.debian.org/python-team/applications/disper.git (fetch)
origin https://salsa.debian.org/python-team/applications/disper.git (push)
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),
git checkout -b AUR-master AUR/master
git checkout -b debian-master debian/master
[output]
Branch 'AUR-master' set up to track remote branch 'master' from 'AUR'.
Switched to a new branch 'AUR-master'
Switched to a new branch 'debian-master'
Sanity check on that,
git branch -vv
[output]
AUR-master 4c36710 [AUR/master] Update README
* debian-master e3ca840 d/control: Remove ancient X-Python-Version field
debian/master e3ca840 [origin/debian/master] d/control: Remove ancient X-Python-Version field
Seems good!
You can explore and view the differences like so,
git log --graph --decorate --oneline debian-master
git log --graph --decorate --oneline AUR-master
git diff debian-master AUR-master
Identifying new commits
What we're interested in is that this,
git log debian-master -1
[output]
commit e3ca840a48208a79a5c96da1bd9f6f1b845f5773 (HEAD -> debian-master, origin/debian/master, origin/HEAD, debian/master)
Author: Ondřej Nový <onovy@debian.org>
Date: Mon May 14 08:10:02 2018 +0200
d/control: Remove ancient X-Python-Version field
does not include the recent patch here,
git log AUR-master -4
[output]
commit 4c367108b370d57ce178863fed7640bb846d3186 (AUR/master, AUR-master)
Author: Alexander Peyser <apeyser@users.noreply.github.com>
Date: Thu Aug 23 17:16:42 2018 +0200
Update README
commit 4c635d65244bcb2a86a9da86d00007de96a23626 (tag: disper-0.3.1.1)
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
apply XOpenDisplay return type patch
commit 01132563030b9230e8f007794c3269dd913c3052
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:17:07 2018 +0200
Update INSTALL and README
commit d0498b7892b36d183d09b3d905296ee7456ff24d (tag: disper-0.3.1)
Author: dev-disper@willem.engen.nl <>
Date: Tue Apr 23 12:01:43 2013 +0200
also update Debian version number
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),
git checkout debian-master
git checkout -b local
git cherry-pick 0113256..4c36710
[output]
[local d05e2bd] apply XOpenDisplay return type patch
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
1 file changed, 12 insertions(+), 2 deletions(-)
error: could not apply 4c36710... Update README
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Of course we expected a merge conflict...
But did you really expect it to be only README
? Let's fix it!
git mergetool # or, vimdiff README (or whatever)
diff -NaurbB README* --color
git cherry-pick --continue
rm README.orig
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,
rg 0.3.1 # or, grep -rn 0.3.1 (or whatever)
git blame debian/changelog
So you can add a dummy release section to debian/changelog
(for your own record), or not.
vim debian/changelog
git add debian/changelog
I copied 0.3.1-3
to a new 0.3.1-4
section and wrote a few words.
Test it!
Does it work?
make <Tab>
make all -n
make install -n
Seems good to me. Let's install,
make all
sudo make install
~~
Confirm that it works,
~~~bash
disper -l
Let's commit and tag it (for future reference),
git commit -v
git tag local/0.3.1-4 -a
I really recommend a tag or something and a version bump. Be nice to future you.
Happy hacking.
Hi @Yngman, tried the above, or at least what I thought it meant: (sorry, I can't format a stupid comment): sudo git clone salsa.debian.org/python-team/applications/disper.git cd disper sudo make all sudo make install But I'm still getting the same segmentation fault. suggestions?
– Leo Simon
Mar 29 at 6:15
Debug! 1. Todisper.py
, addself.add_option('--debug', action='store_const', dest='debug', const=logging.DEBUG, help='be very verbose')
2. Tosrc/xrandr/__init__.py
, addimport logging
and inget_display(name)
function of patch, addlogger = logging.getLogger('%s.%s' % ('disper', __name__))
3. Sprinkle some debugging!logger.debug("returning xopendisplay(%r): %r", name, disp)
, wheredisp = xopendisplay(name)
before returningreturn disp
Other tips areimport traceback; traceback.print_stack()
andimport pdb; pdb.set_trace()
.
– Yngman
Mar 30 at 13:24
Hi @Yngman, thanks for the quick response. Got stuck on step 2), not knowing any python. Would you be willing to communicate by email? Mine is leosimon@berkeley.edu
– Leo Simon
Mar 31 at 17:05
add a comment |
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),
git clone <URL>
cd disper
make all
sudo make install
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),
git clone https://salsa.debian.org/python-team/applications/disper.git
cd disper
Add AUR upstream as remote,
git remote add AUR https://github.com/apeyser/disper
git fetch --all
git remote -v
[output]
AUR https://github.com/apeyser/disper (fetch)
AUR https://github.com/apeyser/disper (push)
origin https://salsa.debian.org/python-team/applications/disper.git (fetch)
origin https://salsa.debian.org/python-team/applications/disper.git (push)
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),
git checkout -b AUR-master AUR/master
git checkout -b debian-master debian/master
[output]
Branch 'AUR-master' set up to track remote branch 'master' from 'AUR'.
Switched to a new branch 'AUR-master'
Switched to a new branch 'debian-master'
Sanity check on that,
git branch -vv
[output]
AUR-master 4c36710 [AUR/master] Update README
* debian-master e3ca840 d/control: Remove ancient X-Python-Version field
debian/master e3ca840 [origin/debian/master] d/control: Remove ancient X-Python-Version field
Seems good!
You can explore and view the differences like so,
git log --graph --decorate --oneline debian-master
git log --graph --decorate --oneline AUR-master
git diff debian-master AUR-master
Identifying new commits
What we're interested in is that this,
git log debian-master -1
[output]
commit e3ca840a48208a79a5c96da1bd9f6f1b845f5773 (HEAD -> debian-master, origin/debian/master, origin/HEAD, debian/master)
Author: Ondřej Nový <onovy@debian.org>
Date: Mon May 14 08:10:02 2018 +0200
d/control: Remove ancient X-Python-Version field
does not include the recent patch here,
git log AUR-master -4
[output]
commit 4c367108b370d57ce178863fed7640bb846d3186 (AUR/master, AUR-master)
Author: Alexander Peyser <apeyser@users.noreply.github.com>
Date: Thu Aug 23 17:16:42 2018 +0200
Update README
commit 4c635d65244bcb2a86a9da86d00007de96a23626 (tag: disper-0.3.1.1)
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
apply XOpenDisplay return type patch
commit 01132563030b9230e8f007794c3269dd913c3052
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:17:07 2018 +0200
Update INSTALL and README
commit d0498b7892b36d183d09b3d905296ee7456ff24d (tag: disper-0.3.1)
Author: dev-disper@willem.engen.nl <>
Date: Tue Apr 23 12:01:43 2013 +0200
also update Debian version number
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),
git checkout debian-master
git checkout -b local
git cherry-pick 0113256..4c36710
[output]
[local d05e2bd] apply XOpenDisplay return type patch
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
1 file changed, 12 insertions(+), 2 deletions(-)
error: could not apply 4c36710... Update README
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Of course we expected a merge conflict...
But did you really expect it to be only README
? Let's fix it!
git mergetool # or, vimdiff README (or whatever)
diff -NaurbB README* --color
git cherry-pick --continue
rm README.orig
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,
rg 0.3.1 # or, grep -rn 0.3.1 (or whatever)
git blame debian/changelog
So you can add a dummy release section to debian/changelog
(for your own record), or not.
vim debian/changelog
git add debian/changelog
I copied 0.3.1-3
to a new 0.3.1-4
section and wrote a few words.
Test it!
Does it work?
make <Tab>
make all -n
make install -n
Seems good to me. Let's install,
make all
sudo make install
~~
Confirm that it works,
~~~bash
disper -l
Let's commit and tag it (for future reference),
git commit -v
git tag local/0.3.1-4 -a
I really recommend a tag or something and a version bump. Be nice to future you.
Happy hacking.
Hi @Yngman, tried the above, or at least what I thought it meant: (sorry, I can't format a stupid comment): sudo git clone salsa.debian.org/python-team/applications/disper.git cd disper sudo make all sudo make install But I'm still getting the same segmentation fault. suggestions?
– Leo Simon
Mar 29 at 6:15
Debug! 1. Todisper.py
, addself.add_option('--debug', action='store_const', dest='debug', const=logging.DEBUG, help='be very verbose')
2. Tosrc/xrandr/__init__.py
, addimport logging
and inget_display(name)
function of patch, addlogger = logging.getLogger('%s.%s' % ('disper', __name__))
3. Sprinkle some debugging!logger.debug("returning xopendisplay(%r): %r", name, disp)
, wheredisp = xopendisplay(name)
before returningreturn disp
Other tips areimport traceback; traceback.print_stack()
andimport pdb; pdb.set_trace()
.
– Yngman
Mar 30 at 13:24
Hi @Yngman, thanks for the quick response. Got stuck on step 2), not knowing any python. Would you be willing to communicate by email? Mine is leosimon@berkeley.edu
– Leo Simon
Mar 31 at 17:05
add a comment |
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),
git clone <URL>
cd disper
make all
sudo make install
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),
git clone https://salsa.debian.org/python-team/applications/disper.git
cd disper
Add AUR upstream as remote,
git remote add AUR https://github.com/apeyser/disper
git fetch --all
git remote -v
[output]
AUR https://github.com/apeyser/disper (fetch)
AUR https://github.com/apeyser/disper (push)
origin https://salsa.debian.org/python-team/applications/disper.git (fetch)
origin https://salsa.debian.org/python-team/applications/disper.git (push)
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),
git checkout -b AUR-master AUR/master
git checkout -b debian-master debian/master
[output]
Branch 'AUR-master' set up to track remote branch 'master' from 'AUR'.
Switched to a new branch 'AUR-master'
Switched to a new branch 'debian-master'
Sanity check on that,
git branch -vv
[output]
AUR-master 4c36710 [AUR/master] Update README
* debian-master e3ca840 d/control: Remove ancient X-Python-Version field
debian/master e3ca840 [origin/debian/master] d/control: Remove ancient X-Python-Version field
Seems good!
You can explore and view the differences like so,
git log --graph --decorate --oneline debian-master
git log --graph --decorate --oneline AUR-master
git diff debian-master AUR-master
Identifying new commits
What we're interested in is that this,
git log debian-master -1
[output]
commit e3ca840a48208a79a5c96da1bd9f6f1b845f5773 (HEAD -> debian-master, origin/debian/master, origin/HEAD, debian/master)
Author: Ondřej Nový <onovy@debian.org>
Date: Mon May 14 08:10:02 2018 +0200
d/control: Remove ancient X-Python-Version field
does not include the recent patch here,
git log AUR-master -4
[output]
commit 4c367108b370d57ce178863fed7640bb846d3186 (AUR/master, AUR-master)
Author: Alexander Peyser <apeyser@users.noreply.github.com>
Date: Thu Aug 23 17:16:42 2018 +0200
Update README
commit 4c635d65244bcb2a86a9da86d00007de96a23626 (tag: disper-0.3.1.1)
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
apply XOpenDisplay return type patch
commit 01132563030b9230e8f007794c3269dd913c3052
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:17:07 2018 +0200
Update INSTALL and README
commit d0498b7892b36d183d09b3d905296ee7456ff24d (tag: disper-0.3.1)
Author: dev-disper@willem.engen.nl <>
Date: Tue Apr 23 12:01:43 2013 +0200
also update Debian version number
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),
git checkout debian-master
git checkout -b local
git cherry-pick 0113256..4c36710
[output]
[local d05e2bd] apply XOpenDisplay return type patch
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
1 file changed, 12 insertions(+), 2 deletions(-)
error: could not apply 4c36710... Update README
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Of course we expected a merge conflict...
But did you really expect it to be only README
? Let's fix it!
git mergetool # or, vimdiff README (or whatever)
diff -NaurbB README* --color
git cherry-pick --continue
rm README.orig
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,
rg 0.3.1 # or, grep -rn 0.3.1 (or whatever)
git blame debian/changelog
So you can add a dummy release section to debian/changelog
(for your own record), or not.
vim debian/changelog
git add debian/changelog
I copied 0.3.1-3
to a new 0.3.1-4
section and wrote a few words.
Test it!
Does it work?
make <Tab>
make all -n
make install -n
Seems good to me. Let's install,
make all
sudo make install
~~
Confirm that it works,
~~~bash
disper -l
Let's commit and tag it (for future reference),
git commit -v
git tag local/0.3.1-4 -a
I really recommend a tag or something and a version bump. Be nice to future you.
Happy hacking.
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),
git clone <URL>
cd disper
make all
sudo make install
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),
git clone https://salsa.debian.org/python-team/applications/disper.git
cd disper
Add AUR upstream as remote,
git remote add AUR https://github.com/apeyser/disper
git fetch --all
git remote -v
[output]
AUR https://github.com/apeyser/disper (fetch)
AUR https://github.com/apeyser/disper (push)
origin https://salsa.debian.org/python-team/applications/disper.git (fetch)
origin https://salsa.debian.org/python-team/applications/disper.git (push)
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),
git checkout -b AUR-master AUR/master
git checkout -b debian-master debian/master
[output]
Branch 'AUR-master' set up to track remote branch 'master' from 'AUR'.
Switched to a new branch 'AUR-master'
Switched to a new branch 'debian-master'
Sanity check on that,
git branch -vv
[output]
AUR-master 4c36710 [AUR/master] Update README
* debian-master e3ca840 d/control: Remove ancient X-Python-Version field
debian/master e3ca840 [origin/debian/master] d/control: Remove ancient X-Python-Version field
Seems good!
You can explore and view the differences like so,
git log --graph --decorate --oneline debian-master
git log --graph --decorate --oneline AUR-master
git diff debian-master AUR-master
Identifying new commits
What we're interested in is that this,
git log debian-master -1
[output]
commit e3ca840a48208a79a5c96da1bd9f6f1b845f5773 (HEAD -> debian-master, origin/debian/master, origin/HEAD, debian/master)
Author: Ondřej Nový <onovy@debian.org>
Date: Mon May 14 08:10:02 2018 +0200
d/control: Remove ancient X-Python-Version field
does not include the recent patch here,
git log AUR-master -4
[output]
commit 4c367108b370d57ce178863fed7640bb846d3186 (AUR/master, AUR-master)
Author: Alexander Peyser <apeyser@users.noreply.github.com>
Date: Thu Aug 23 17:16:42 2018 +0200
Update README
commit 4c635d65244bcb2a86a9da86d00007de96a23626 (tag: disper-0.3.1.1)
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
apply XOpenDisplay return type patch
commit 01132563030b9230e8f007794c3269dd913c3052
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:17:07 2018 +0200
Update INSTALL and README
commit d0498b7892b36d183d09b3d905296ee7456ff24d (tag: disper-0.3.1)
Author: dev-disper@willem.engen.nl <>
Date: Tue Apr 23 12:01:43 2013 +0200
also update Debian version number
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),
git checkout debian-master
git checkout -b local
git cherry-pick 0113256..4c36710
[output]
[local d05e2bd] apply XOpenDisplay return type patch
Author: Alexander Peyser <a.peyser@fz-juelich.de>
Date: Thu Aug 23 16:02:23 2018 +0200
1 file changed, 12 insertions(+), 2 deletions(-)
error: could not apply 4c36710... Update README
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Of course we expected a merge conflict...
But did you really expect it to be only README
? Let's fix it!
git mergetool # or, vimdiff README (or whatever)
diff -NaurbB README* --color
git cherry-pick --continue
rm README.orig
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,
rg 0.3.1 # or, grep -rn 0.3.1 (or whatever)
git blame debian/changelog
So you can add a dummy release section to debian/changelog
(for your own record), or not.
vim debian/changelog
git add debian/changelog
I copied 0.3.1-3
to a new 0.3.1-4
section and wrote a few words.
Test it!
Does it work?
make <Tab>
make all -n
make install -n
Seems good to me. Let's install,
make all
sudo make install
~~
Confirm that it works,
~~~bash
disper -l
Let's commit and tag it (for future reference),
git commit -v
git tag local/0.3.1-4 -a
I really recommend a tag or something and a version bump. Be nice to future you.
Happy hacking.
answered Mar 28 at 0:17
YngmanYngman
1
1
Hi @Yngman, tried the above, or at least what I thought it meant: (sorry, I can't format a stupid comment): sudo git clone salsa.debian.org/python-team/applications/disper.git cd disper sudo make all sudo make install But I'm still getting the same segmentation fault. suggestions?
– Leo Simon
Mar 29 at 6:15
Debug! 1. Todisper.py
, addself.add_option('--debug', action='store_const', dest='debug', const=logging.DEBUG, help='be very verbose')
2. Tosrc/xrandr/__init__.py
, addimport logging
and inget_display(name)
function of patch, addlogger = logging.getLogger('%s.%s' % ('disper', __name__))
3. Sprinkle some debugging!logger.debug("returning xopendisplay(%r): %r", name, disp)
, wheredisp = xopendisplay(name)
before returningreturn disp
Other tips areimport traceback; traceback.print_stack()
andimport pdb; pdb.set_trace()
.
– Yngman
Mar 30 at 13:24
Hi @Yngman, thanks for the quick response. Got stuck on step 2), not knowing any python. Would you be willing to communicate by email? Mine is leosimon@berkeley.edu
– Leo Simon
Mar 31 at 17:05
add a comment |
Hi @Yngman, tried the above, or at least what I thought it meant: (sorry, I can't format a stupid comment): sudo git clone salsa.debian.org/python-team/applications/disper.git cd disper sudo make all sudo make install But I'm still getting the same segmentation fault. suggestions?
– Leo Simon
Mar 29 at 6:15
Debug! 1. Todisper.py
, addself.add_option('--debug', action='store_const', dest='debug', const=logging.DEBUG, help='be very verbose')
2. Tosrc/xrandr/__init__.py
, addimport logging
and inget_display(name)
function of patch, addlogger = logging.getLogger('%s.%s' % ('disper', __name__))
3. Sprinkle some debugging!logger.debug("returning xopendisplay(%r): %r", name, disp)
, wheredisp = xopendisplay(name)
before returningreturn disp
Other tips areimport traceback; traceback.print_stack()
andimport pdb; pdb.set_trace()
.
– Yngman
Mar 30 at 13:24
Hi @Yngman, thanks for the quick response. Got stuck on step 2), not knowing any python. Would you be willing to communicate by email? Mine is leosimon@berkeley.edu
– Leo Simon
Mar 31 at 17:05
Hi @Yngman, tried the above, or at least what I thought it meant: (sorry, I can't format a stupid comment): sudo git clone salsa.debian.org/python-team/applications/disper.git cd disper sudo make all sudo make install But I'm still getting the same segmentation fault. suggestions?
– Leo Simon
Mar 29 at 6:15
Hi @Yngman, tried the above, or at least what I thought it meant: (sorry, I can't format a stupid comment): sudo git clone salsa.debian.org/python-team/applications/disper.git cd disper sudo make all sudo make install But I'm still getting the same segmentation fault. suggestions?
– Leo Simon
Mar 29 at 6:15
Debug! 1. To
disper.py
, add self.add_option('--debug', action='store_const', dest='debug', const=logging.DEBUG, help='be very verbose')
2. To src/xrandr/__init__.py
, add import logging
and in get_display(name)
function of patch, add logger = logging.getLogger('%s.%s' % ('disper', __name__))
3. Sprinkle some debugging! logger.debug("returning xopendisplay(%r): %r", name, disp)
, where disp = xopendisplay(name)
before returning return disp
Other tips are import traceback; traceback.print_stack()
and import pdb; pdb.set_trace()
.– Yngman
Mar 30 at 13:24
Debug! 1. To
disper.py
, add self.add_option('--debug', action='store_const', dest='debug', const=logging.DEBUG, help='be very verbose')
2. To src/xrandr/__init__.py
, add import logging
and in get_display(name)
function of patch, add logger = logging.getLogger('%s.%s' % ('disper', __name__))
3. Sprinkle some debugging! logger.debug("returning xopendisplay(%r): %r", name, disp)
, where disp = xopendisplay(name)
before returning return disp
Other tips are import traceback; traceback.print_stack()
and import pdb; pdb.set_trace()
.– Yngman
Mar 30 at 13:24
Hi @Yngman, thanks for the quick response. Got stuck on step 2), not knowing any python. Would you be willing to communicate by email? Mine is leosimon@berkeley.edu
– Leo Simon
Mar 31 at 17:05
Hi @Yngman, thanks for the quick response. Got stuck on step 2), not knowing any python. Would you be willing to communicate by email? Mine is leosimon@berkeley.edu
– Leo Simon
Mar 31 at 17:05
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1049452%2fdisper-l-on-18-04-generates-a-segmentation-fault-are-there-alternatives%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I can confirm this bug, seems to be caused by some anti-Meltdown or anti-Spectre fixes or something similar (my apport crash contains strange line -
SegvReason: reading unknown VMA
). I have never useddisper
. Canxrand
become alternative?– N0rbert
Jun 25 '18 at 9:25
it does look like
xrandr
contains enough information for me to do what I want. Thanks very much indeed for the suggestion. Can you convert to an answer so that I can accept it?– Leo Simon
Jun 25 '18 at 14:01
I can also confirm that bug and it's totally annoying that disper doesn't work anymore. xrandr is not so "smart" as disper when switching monitors.
– student
Sep 8 '18 at 19:31
However there seems to be a patch: bugs.debian.org/cgi-bin/bugreport.cgi?bug=844505 and bugs.debian.org/cgi-bin/… Is there a patched version available for ubuntu 18.04?
– student
Sep 8 '18 at 19:33