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
Opened by Philipp (hollunder) - Saturday, 23 February 2013, 23:11 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 28 February 2013, 14:56 GMT
|
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
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.
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.
Thanks !
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.
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 ?
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.
xrandr2 (1 KiB)
https://bbs.archlinux.org/viewtopic.php?pid=1234154#p1234154
They've been reported upstream via email, but I've not had any response yet.
I consider this issue solved, hopefully upstream will implement proper parsing.
Thanks everyone!