FS#33985 - [arandr] broken due to too new xrandr version

Attached to Project: Community Packages
Opened by Philipp (hollunder) - Saturday, 23 February 2013, 23:11 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 28 February 2013, 14:56 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
arandr refuses to run, it throws an exception saying that xrandr version 1.2/1.3 is required. However, our current version of xrandr is 1.4.


Additional info:
* package version(s)
arandr 0.1.6-2
libxrandr 1.4.0-1

* config and/or log files etc.


Steps to reproduce:
just install and run arandr
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 28 February 2013, 14:56 GMT
Reason for closing:  Fixed
Comment by Maurice (momsen) - Sunday, 24 February 2013, 09:46 GMT
Hi,

I can confirm this bug.

To be able to use arandr until a new package is made I edited the file
/usr/lib/python2.7/site-packges/screenlayout/xrandr.py and changed line 41 to:

if not ("1.2" in version_output or "1.3" in version_output or "1.4" in version_output) and not force_version:

Just in case you need to use arandr right now and can't wait for the new package. I also don't know
whether the new xrandr workds as arandr expects it, so use this fix only if really necessary.
Comment by Philipp (hollunder) - Sunday, 24 February 2013, 11:17 GMT
Thanks for the attempt at a fix, but for me it didn't work. For me it crashes in auxiliary.py if I interpret the traceback correctly. It looks like upstream has been inactive for the last 9 Months. I don't know of any other sensible GUI for xrandr.
Comment by Guy de Pourtalès (depourtales) - Monday, 25 February 2013, 06:41 GMT
The change from Maurice worked for me.

BTW, in the mean time and if you do not want to change the code, you can still run arandr with the parameter --force-version. This parameter makes arandr skip xrandr version control.
Comment by Sergej Pupykin (sergej) - Monday, 25 February 2013, 10:47 GMT
please try arandr-0.1.6-3
Comment by Guy de Pourtalès (depourtales) - Monday, 25 February 2013, 11:17 GMT
arandr-0.1.6-3 works for me (no need --force-version anymore)
Thanks !
Comment by Philipp (hollunder) - Monday, 25 February 2013, 18:13 GMT
With 0.1.6-3 I get the same error as I got after following Maurices suggestion.

Traceback (most recent call last):
File "/usr/bin/arandr", line 42, in <module>
main()
File "/usr/lib/python2.7/site-packages/screenlayout/gui.py", line 318, in main
force_version=options.force_version
File "/usr/lib/python2.7/site-packages/screenlayout/gui.py", line 159, in __init__
self.filetemplate = self.widget.load_from_x()
File "/usr/lib/python2.7/site-packages/screenlayout/widget.py", line 93, in load_from_x
self._xrandr.load_from_x()
File "/usr/lib/python2.7/site-packages/screenlayout/xrandr.py", line 135, in load_from_x
geometry = Geometry(hsplit[2])
File "/usr/lib/python2.7/site-packages/screenlayout/auxiliary.py", line 81, in __new__
width,rest = width.split("x")
ValueError: need more than 1 value to unpack

I do not know why the others don't see the problem.
However, the comment in the source suggests that the author wrote some sort of hack there, so I guess the problem might occur with certain configurations.
Maybe someone with python skills can tell what the issue is.
Comment by Guy de Pourtalès (depourtales) - Monday, 25 February 2013, 19:25 GMT
Hi Philipp,

INMHO this issue should be moved this topic to another bug or forum thread.

Anyway, if you run xrandr in a terminal you should get some informations about your monitor. Here's my output on my laptop :

Screen 0: minimum 320 x 200, current 1600 x 900, maximum 8192 x 8192
LVDS1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1600x900 60.1*+
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

As you can see the geometry of the monitor is "1600x900+0+0" which is the value parsed when the error is thrown on your setup. Can you provide the output of xrandr so we can trace the issue ?
Comment by Philipp (hollunder) - Tuesday, 26 February 2013, 13:34 GMT
Thanks for helping me figure out what's wrong.
Attached are two files containing the output of xrandr, the one is with only my laptop monitor enabled, the other with the attached vga monitor enabled as well. These are the two configurations I use.
Comment by Sid Karunaratne (sakaru) - Tuesday, 26 February 2013, 16:39 GMT
I believe this has been solved here:
https://bbs.archlinux.org/viewtopic.php?pid=1234154#p1234154

They've been reported upstream via email, but I've not had any response yet.
Comment by Philipp (hollunder) - Tuesday, 26 February 2013, 18:48 GMT
Thanks Sid, I don't strictly need --primary, --noprimary got rid of it, and now arandr starts again.
I consider this issue solved, hopefully upstream will implement proper parsing.

Thanks everyone!

Loading...