You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess randrctl tries to parse the resolutions as an integer. Sometimes, there are characters other than number in the 'mode' string. For instance my VIRTUAL1 output has the following modes that leads randctrl to fail:
VIRTUAL1 connected (normal left inverted right x axis y axis)
1280x720_vnc 60.00
1920x1080_60.00 60.00
Full trace:
python /usr/bin/randrctl switch-to 2dp-usb-c-n-at-e
Traceback (most recent call last):
File "/usr/bin/randrctl", line 10, in <module>
sys.exit(main())
File "/home/e/.local/lib/python3.9/site-packages/randrctl/cli.py", line 311, in main
return cmd(randrctl, args)
File "/home/e/.local/lib/python3.9/site-packages/randrctl/cli.py", line 155, in cmd_switch_to
randrctl.switch_to(args.profile_name)
File "/home/e/.local/lib/python3.9/site-packages/randrctl/ctl.py", line 71, in switch_to
self._apply(p)
File "/home/e/.local/lib/python3.9/site-packages/randrctl/ctl.py", line 64, in _apply
raise e
File "/home/e/.local/lib/python3.9/site-packages/randrctl/ctl.py", line 60, in _apply
self.xrandr.apply(p)
File "/home/e/.local/lib/python3.9/site-packages/randrctl/xrandr.py", line 52, in apply
args = self._compose_mode_args(profile, self.get_all_outputs())
File "/home/e/.local/lib/python3.9/site-packages/randrctl/xrandr.py", line 131, in get_all_outputs
o = self._parse_xrandr_connection(i)
File "/home/e/.local/lib/python3.9/site-packages/randrctl/xrandr.py", line 234, in _parse_xrandr_connection
dw, dh = map(lambda s: int(s), display.mode.split('x'))
File "/home/e/.local/lib/python3.9/site-packages/randrctl/xrandr.py", line 234, in <lambda>
dw, dh = map(lambda s: int(s), display.mode.split('x'))
ValueError: invalid literal for int() with base 10: '1080_60.00'
The text was updated successfully, but these errors were encountered:
@endreszabo , thanks for reporting and responding with the intent to help. I really appreciate that 🙏
I do not have time to work on this right now. Moreover, at some point I've been half through the rewrite of this tool to a different language (which should've solved issues like this one, as it would rely on Xorg APIs rather than xrandr output), so if I had free time, I'd better invest it there.
At this point the best help would be to prepare a pull-request that fixes the issue.
I guess
randrctl
tries to parse the resolutions as an integer. Sometimes, there are characters other than number in the 'mode' string. For instance myVIRTUAL1
output has the following modes that leadsrandctrl
to fail:Full trace:
The text was updated successfully, but these errors were encountered: