Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for intermittent exception while parsing Xrandr modes #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cormacc
Copy link
Contributor

@cormacc cormacc commented Nov 30, 2016

Observed that Xrandr occasionally appends a few lines to the output, resulting in a runtime exception during mode parsing.
Can't reproduce the condition reliably, but seems to have something to do with disconnection/reconnection. Once I do get into this state, the exception is repeatable.

Excerpt below from last time the condition occurred (see final 3 lines):

DP-4 connected 3840x2160+0+0 (normal left inverted right x axis y axis)
600mm x 340mm
3840x2160 60.00*+ 30.00
2560x1440 59.95
1920x1080 60.00 59.94
1600x900 60.00
1280x1024 60.02
1280x800 59.81
1280x720 60.00 59.94
1152x864 59.96
1024x768 60.00
800x600 60.32
720x480 59.94
640x480 59.94 59.93
3840x2160 (0x2ca) 297.000MHz +HSync +VSync
h: width 3840 start 4016 end 4104 total 4400 skew 0 clock 67.50KHz
v: height 2160 start 2168 end 2178 total 2250 clock 30.00Hz

This is probably obscure enough to ignore, but think the fix has no negative implications. The original implementation had a smaller footprint (about 3 lines) but involved applying the regex twice, which offended my inner anal-retentive (I mostly do embedded C these days).

The issue occurs intermittently running arch linux on a 2013 macbook pro running nvidia drivers 375.20, libxrandr 1.5.1 with a 27" LG external display

Observed that Xrandr occasionally appends a few lines to the output.
Can't reproduce reliably, but may have something to do with disconnection/reconnection
Excerpt below from last time the condition occurred (see final 3 lines):

DP-4 connected 3840x2160+0+0 (normal left inverted right x axis y axis)
600mm x 340mm
   3840x2160     60.00*+  30.00
   2560x1440     59.95
   1920x1080     60.00    59.94
   1600x900      60.00
   1280x1024     60.02
   1280x800      59.81
   1280x720      60.00    59.94
   1152x864      59.96
   1024x768      60.00
   800x600       60.32
   720x480       59.94
   640x480       59.94    59.93
  3840x2160 (0x2ca) 297.000MHz +HSync +VSync
        h: width  3840 start 4016 end 4104 total 4400 skew    0 clock 67.50KHz
        v: height 2160 start 2168 end 2178 total 2250           clock 30.00Hz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant