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

hidpi-daemon IndexError: list index out of range #44

Open
maxilee opened this issue Oct 1, 2022 · 1 comment
Open

hidpi-daemon IndexError: list index out of range #44

maxilee opened this issue Oct 1, 2022 · 1 comment

Comments

@maxilee
Copy link

maxilee commented Oct 1, 2022

xarndr:

Screen 0: minimum 320 x 200, current 2560 x 1600, maximum 16384 x 16384
eDP-1 connected primary 2560x1600+0+0 left (normal left inverted right x axis y axis) 113mm x 181mm
   1600x2560     55.92*+
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-3 disconnected (normal left inverted right x axis y axis)

~/.config/monitors.xml:

<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>2</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>eDP-1</connector>
          <vendor>MS_</vendor>
          <product>BW8</product>
          <serial>0x00000001</serial>
        </monitorspec>
        <mode>
          <width>2560</width>
          <height>1600</height>
          <rate>55.920200347900391</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>

Distribution
/etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Issue/Bug Description:
when I login in GDM system is laggy for 2 minutes due errors from hidpi-daemon.desktop,
after that time system is working correctly.

in journal I've got logs :

Oct 01 10:10:01 hostname /usr/libexec/gdm-x-session[20545]: (WW) EDID timing clock 320.00 exceeds claimed max 165MHz, fixing
Oct 01 10:10:01 hostname /usr/libexec/gdm-x-session[20545]: (II) modeset(0): EDID vendor "MS_", prod id 36865
Oct 01 10:10:01 hostname /usr/libexec/gdm-x-session[20545]: (II) modeset(0): Using hsync ranges from config file
Oct 01 10:10:01 hostname /usr/libexec/gdm-x-session[20545]: (II) modeset(0): Using vrefresh ranges from config file
Oct 01 10:10:01 hostname /usr/libexec/gdm-x-session[20545]: (II) modeset(0): Printing DDC gathered Modelines:
Oct 01 10:10:01 hostname /usr/libexec/gdm-x-session[20545]: (II) modeset(0): Modeline "1600x2560"x0.0  320.00  1600 1990 1998 2218  2560 2568 2572 2580 -hsync -vsync (144.3 kHz eP)
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]: 2022-10-01 10:10:02,287  ERROR  Error calling _run_hidpi_autoscaling(None):
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]: Traceback (most recent call last):
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:   File "/usr/lib/python3/dist-packages/hidpidaemon/hidpidaemon2.py", line 1620, in run_hidpi_autoscaling
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:     return _run_hidpi_autoscaling(model)
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:   File "/usr/lib/python3/dist-packages/hidpidaemon/hidpidaemon2.py", line 1613, in _run_hidpi_autoscaling
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:     hidpi = HiDPIAutoscaling(model)
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:   File "/usr/lib/python3/dist-packages/hidpidaemon/hidpidaemon2.py", line 170, in __init__
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:     self.init_xlib()
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:   File "/usr/lib/python3/dist-packages/hidpidaemon/hidpidaemon2.py", line 192, in init_xlib
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:     self.displays_xml = self.get_displays_xml()
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:   File "/usr/lib/python3/dist-packages/hidpidaemon/hidpidaemon2.py", line 259, in get_displays_xml
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]:     edid_vendor = table[char1-1] + table[char2-1] + table[char3-1]
Oct 01 10:10:02 hostname hidpi-daemon.desktop[20966]: IndexError: list index out of range

Other Notes:
I'm using onemix 3 UMPC - in that UMPC display is from tablets and it is mounted horizontaly: i've tunning few settings to make it work in landscape position.

here is output from edid-decode :

edid-decode /sys/class/drm/card0-eDP-1/edid 
edid-decode (hex):

00 ff ff ff ff ff ff 00 36 7f 01 90 01 00 00 00
00 0c 01 03 80 09 0f 78 2f 00 00 a0 57 49 9b 26
10 48 4f 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 00 7d 40 6a 62 00 14 a0 86 08
84 40 71 b5 00 00 00 18 00 00 00 fc 00 42 57 38
0a 20 20 20 20 20 20 20 20 20 00 00 00 fd 00 3c
3c 7d 7d 10 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 75

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: MS_
    Model: 36865
    Serial Number: 1
    Made in: 2002
  Basic Display Parameters & Features:
    Digital display
    Maximum image size: 9 cm x 15 cm
    Gamma: 2.20
    DPMS levels: Off
    RGB color display
    Default (sRGB) color space is primary color space
    First detailed timing is the preferred timing
    Supports GTF timings within operating range
  Color Characteristics:
    Red  : 0.6250, 0.3398
    Green: 0.2851, 0.6054
    Blue : 0.1484, 0.0625
    White: 0.2812, 0.3085
  Established Timings I & II: none
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  1600x2560   55.920 Hz   5:8   144.274 kHz 320.000 MHz (113 mm x 181 mm)
                 Hfront  390 Hsync   8 Hback 220 Hpol N
                 Vfront    8 Vsync   4 Vback   8 Vpol N
    Display Product Name: 'BW8'
  Display Range Limits:
    Monitor ranges (GTF): 60-60 Hz V, 125-125 kHz H, max dotclock 160 MHz
    Empty Descriptor
Checksum: 0x75

my display adapter :

        *-display
             description: VGA compatible controller
             product: UHD Graphics 615
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             logical name: /dev/fb0
             version: 02
             width: 64 bits
             clock: 33MHz
             capabilities: vga_controller bus_master cap_list rom fb
             configuration: depth=32 driver=i915 latency=0 resolution=1600,2560
             resources: irq:134 memory:de000000-deffffff memory:c0000000-cfffffff ioport:f000(size=64) memory:c0000-dffff
@maxilee
Copy link
Author

maxilee commented Oct 1, 2022

hi.
i'm not skilled programer but I've made ugly hack.

in that script table in line 259 contains only letters - exact 27 chars ( A..Z ).

my Manufacturer: MS_ - contains "_" which cause that variable char3 in line edid_vendor = table[char1-1] + table[char2-1] + table[char3-1] equals 31 which is indeed ut of range in "table".

i've added code :

                    table = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '_']
                    if char1 > len(table):
                        char1 = 27
                    if char2 > len(table):
                        char2 = 27
                    if char3 > len(table):
                        char3 = 27
                    edid_vendor = table[char1-1] + table[char2-1] + table[char3-1]

now there is no more error in logs , but I've no idea is this change will break something else

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

No branches or pull requests

1 participant