You are not logged in.

#1 2017-10-22 17:22:06

xtian
Member
Registered: 2013-08-25
Posts: 179

[solved] How to set the correct disp. rez. for Lenovo W541 with Xorg?

I have a working configuration of Nvidia Optimus following the instructions here on the Arch wiki (define working as Xorg launches with i3).
What remains is fixing the resolution--everything is too tiny This image shows my previous Arch on Lenovo W500 on left and the new install on W541 (note the tiny cursor and dmenu is like, 4px!) side-by-side.

1) Lenovo W541 Specs.
The manual gives the specs as:
    Display size: 396mm x 393mm (15.6" or 15.5")
    Display resolution: 2280 x 1620

2) Nvidia Optimus hardware.
This laptop has both NVIDIA and Intel graphics GPUs:

% lspci | grep -E 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1)

3) Xorg detection of hardware
The HiDPI page says to use the utility `xorg-xdpyinfo` to verify X Server is detecting your screen properly

% xdpyinfo | grep -B 2 resolution
screen #0:
  dimensions:    2880x1620 pixels (762x428 millimeters)
  resolution:    96x96 dots per inch

A little math says the diagonal display size with these dimensions is (762^2 + 428^2 = 873^2) 873mm!

4) X windows and i3
I've installed the nvidia driver together with xorg. I don't have a display manager--just X and i3.

Current configuration

1) Nvidia Optimus instructions for Xorg
I've dollowed the instructions from the Nvidia Optimus page (with the addition of the Monitor and Screen sections following my notes from a previous Xorg install)

% cat 20-nvidia.conf     
Section "Module"
    Load "modesetting"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    # 2880x1620 59.96 Hz (CVT 4.67M9) hsync: 100.67 kHz; pclk: 396.25 MHz
    Modeline       "2880x1620_60.00"  396.25  2880 3096 3408 3936  1620 1623 1628 1679 -hsync +vsync
EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA Quadro K1100M"
    BusID          "PCI:1:0:0"
    Option         "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "nvidia"
    Monitor        "Monitor0"
    DefaultDepth   24
    Subsection     "Display"
        Viewport   0 0 
        Depth      24
        Modes      "2880x1620_60.00"
    EndSubsection
EndSection

2) Various DPI settings
DPI settings are shown in several locations:
- ~/.Xresources, `Xft.dpi: 96`
- ~/.xinitrc, `xandr --dpi 96`


What I've tried
To address this I followed the following paths

1) Nvidia Optimus page has note, "Resolution scan wrong, EDID errors in Xorg.log".
There are no errors here. (although, curiously, the suggestion says to install `read-edid`, but after install `sudo: read-edid: command not found`)

2) Xorg, Display size and DPI
This section describes using mm dimensions and adding Monitor sections to `Xorg.conf.d` files (as I noted above with current config#1).
But the reported mm from `xdpyinfo` don't jive with the manual. looking for more specs.

3) dpi settings in ~/.Xresources and ~/.xinitrc
These dont seem to matter.

I'm confused at this point what to do next. Guidance with troubleshooting or W541 experience is greatly appreciated.

Last edited by xtian (2017-10-30 23:25:00)

Offline

#2 2017-10-22 20:57:47

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [solved] How to set the correct disp. rez. for Lenovo W541 with Xorg?

Add

Option "DPI" "212x212"

to the Device section.
You can try this at runtime

xrandr --dpi 212

but this will only apply to processes started after the call.
You should also fix .Xresources and .xinitrc itr.

xdpyinfo calculates the dimensions from the given DPI and pixel count.

Offline

#3 2017-10-22 21:40:09

xtian
Member
Registered: 2013-08-25
Posts: 179

Re: [solved] How to set the correct disp. rez. for Lenovo W541 with Xorg?

@seth. That much better. Thank you.

Firefox is very nearly 120% larger than my previous display. Dmenu is about 125% larger. Considering that overall the height of the display is 20mm smaller with the W541 than the W500, I'm thinking I'd like to try 95% smaller scaling.

I've updated all the configs with 150 and this looks best.

From a point of experience and knowledge, how should I follow any specific guidelines for choosing values?

Last edited by xtian (2017-10-23 00:46:13)

Offline

#4 2017-10-23 06:52:15

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [solved] How to set the correct disp. rez. for Lenovo W541 with Xorg?

"xrandr -q" should print the true display dimensions (in mm) which you can calculate the physical DPI from (for this and your former display) - it's really just math.
Some applications might behave "wrong" w/ high DPI settings, some might ignore them altogether - there's no "best" solution.
As last resort, you'll have to lower the resolution to 1920x1080 or so - some wayland display servers intend to provide global or per-process upscaling, but at least w/ X11 that's not possible.

Offline

#5 2017-10-23 10:21:04

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [solved] How to set the correct disp. rez. for Lenovo W541 with Xorg?

seth wrote:

"xrandr -q" should print the true display dimensions (in mm) which you can calculate the physical DPI from (for this and your former display) - it's really just math.

If that the dimensions are wrong, then you can try to set the correct values instead of setting the dpi with
xrandr -fbmm

That should help when vertical and horizontal DPI are different.

Last edited by progandy (2017-10-23 10:28:50)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2017-10-28 15:49:53

xtian
Member
Registered: 2013-08-25
Posts: 179

Re: [solved] How to set the correct disp. rez. for Lenovo W541 with Xorg?

Your responses seem to suggest the a different DPI is causing problems or will cause problems. And, I should obtain the "true" dimensions, or change the display dimensions.

Curiously--so far--there does not appear to be any downside to arbitrary DPI settings.

Thanks or the help. I will mark this thread solved.

Last edited by xtian (2017-10-30 23:23:10)

Offline

Board footer

Powered by FluxBB