You are not logged in.

#1 2017-11-30 15:26:30

boojum
Member
From: /dev/null
Registered: 2013-09-23
Posts: 44
Website

X11: adjust setting governing physical size of the screen

Where can I set the correct physical size of my monitor? I already have the correct settings in X config:

$ cat /etc/X11/xorg.conf.d/99-monitor.conf:

Section "Monitor"
    Identifier  "LVDS"
    Option      "Primary" "true"
    Modeline    "1600x900_60.0"   88.54  1600 1614 1626 1630  900 902 904 906 -hsync -vsync
    Option      "PreferredMode" "1600x900_60.00"
    Option      "DPMS" "true"
    DisplaySize 363 204
EndSection

xdpyinfo seems to reports the correct value (but something tells me that it reads it from the above config):

$ xdpyinfo | grep dimensions             
  dimensions:    1600x900 pixels (363x204 millimeters)

While xrandr gives me 0x0 mm:

$ xrandr | grep LVDS
LVDS-1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm

Latest git branch of glfw comes with 'monitors', which reports the size as 0x0 mm as well:

$ monitors
Name: LVDS (primary)
Current mode: 1600 x 900 x 24 (8 8 8) 59 Hz
Virtual position: 0 0
Physical size: 0 x 0 mm (inf dpi)
Modes:
  0: 640 x 480 x 24 (8 8 8) 59 Hz
  1: 720 x 480 x 24 (8 8 8) 59 Hz
  2: 848 x 480 x 24 (8 8 8) 59 Hz
  3: 800 x 600 x 24 (8 8 8) 59 Hz
  4: 1024 x 768 x 24 (8 8 8) 59 Hz
  5: 1152 x 768 x 24 (8 8 8) 59 Hz
  6: 1280 x 720 x 24 (8 8 8) 59 Hz
  7: 1280 x 800 x 24 (8 8 8) 59 Hz
  8: 1280 x 854 x 24 (8 8 8) 59 Hz
  9: 1440 x 900 x 24 (8 8 8) 59 Hz
 10: 1600 x 900 x 24 (8 8 8) 59 Hz (current mode)

In case anyone is wondering why I need this setting, it is for glfw-x11 on which kitty depends. Without proper size it yells at me (as referenced in this github issue):

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/bin/../lib/kitty/__main__.py", line 15, in <module>
    main()
  File "/usr/bin/../lib/kitty/kitty/main.py", line 297, in main
    run_app(opts, args)
  File "/usr/bin/../lib/kitty/kitty/main.py", line 207, in run_app
    boss = Boss(window, opts, args)
  File "/usr/bin/../lib/kitty/kitty/boss.py", line 79, in __init__
    self.tab_manager.init(startup_session)
  File "/usr/bin/../lib/kitty/kitty/tabs.py", line 323, in init
    self._add_tab(Tab(self.opts, self.args, self.title_changed, t))
  File "/usr/bin/../lib/kitty/kitty/tabs.py", line 45, in __init__
    borders = Borders(opts)
  File "/usr/bin/../lib/kitty/kitty/borders.py", line 38, in __init__
    self.border_width = pt_to_px(opts.window_border_width)
  File "/usr/bin/../lib/kitty/kitty/utils.py", line 55, in pt_to_px
    dpix, dpiy = get_dpi()['logical']
  File "/usr/bin/../lib/kitty/kitty/utils.py", line 134, in get_dpi
    pdpi = glfw_get_physical_dpi()
ValueError: Failed to get primary monitor size

I already tried setting the size with xrandr...

$ xrandr --output LVDS --fbmm 363x204

... but that does exactly zilch.

I'm trying to figure it out with glfw folks here but I would appreciate suggestions as to what else I could try.

Addendum:
Playing with get-edid (part of read-edid) produces only more errors and confusion:

$ sudo get-edid
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Looks like no busses have an EDID. Sorry!
Attempting to use the classical VBE interface

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0
    Function supported
    Call successful

    VBE version 300
    VBE string at 0xc01d0 "ATI ATOMBIOS"

VBE/DDC service about to be called
    Report DDC capabilities

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f15 bx=0x0 cx=0x0
    Function supported
    Call successful

    Monitor and video card combination does not support DDC1 transfers
    Monitor and video card combination supports DDC2 transfers
    0 seconds per 128 byte EDID block transfer
    Screen is not blanked during DDC transfer

Reading next EDID block

VBE/DDC service about to be called
    Read EDID

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0
    Function supported
    Call failed

The EDID data should not be trusted as the VBE call failed
Error: output block unchanged
I'm sorry nothing was successful. Maybe try some other arguments
if you played with them, or send an email to Matthew Kern <pyrophobicman@gmail.com>.

I'm more, and more convinced that the problem is with age of my laptop's screen (it's old) but I'm happy to be proved wrong! :-)

Last edited by boojum (2017-11-30 16:25:05)

Offline

#2 2017-11-30 16:21:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: X11: adjust setting governing physical size of the screen

Please edit your thread title to one that accurately describes your issue: https://wiki.archlinux.org/index.php/Co … ow_to_post


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-11-30 23:43:27

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: X11: adjust setting governing physical size of the screen

I got similar failures when trying to use get-edid for different reasons. xrandr gives me more-or-less correct dimensions, though not ones identical to those set in Xorg's configuration. So I don't think the get-edid failure necessarily explains the zero dimensions problem.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB