You are not logged in.

#1 2017-01-31 19:00:16

Torxed
Member
Registered: 2013-01-10
Posts: 200

nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

So after I recently updated my entire system (nvidia and awesome got updated among other things), the resolution is all kinds of fucky on my laptop.

Got a 4K monitor, model of the laptop is Thinkpad P50.

Before I used to run in 2560x1440 mode, it was good enough when having it in my lap.
How I got this was by using:

    xrandr --output DP-4 --mode 2560x1440

Simple enough, however, recently all of the modes I used to see in xrandr are now gone. And `nvidia-settings` now list all resolutions as "(Scaled)".. Except for 3840x2160 which appears to be a native resolution and thus doesn't need scaling.

I wouldn't complain and ask for help if it wasn't for the fact that my window manager and all applications doesn't get that I'm running in 2560x1440 mode, they all think it's full on 4K because it's a scaled application.. So most of the stuff I start or see, ends up way out of screen boundaries.

Trying `xrandr --addmode 2560x1440 DP-4` didn't work either, still just complains about `Cannot find mode "2560x1440"`

ANY ideas on how to fix this?
Not sure what type of output you'd need from me at this point, graphics have always been a scetchy subject for me.

dmsg | grep -i nvidia: https://gist.github.com/Torxed/ed8c81c2 … 3f281f3381
xrandr: https://gist.github.com/Torxed/6581407d … 41ab475958
xorg.conf: https://gist.github.com/Torxed/2fe5a414 … 32c85625ee

Last edited by Torxed (2017-01-31 19:05:59)

Offline

#2 2017-01-31 19:40:58

aw1cks
Member
From: UK
Registered: 2017-01-31
Posts: 10
Website

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

Try something like this:

$ gtf 2560 1440 60

Copy everything past modeline.. (let's call it $gtf)

$ xrandr --newmode $gtf

Then you can do addmode (use the name from $gtf, the part in quotes at the beginning)

$ xrandr --addmode 2560x1440_60.00 DP-4

then you should be able to change the resolution again.

$ xrandr --output DP-4 --mode 2560x1440_60.00

Offline

#3 2017-01-31 20:02:29

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

@aw1cks:

That almost works I guess, it gets to `xrandr --newmode $gtf` and that works.
Except that it adds the mode for DP-6 and not DP-4 for some reason.

Tried adding `--output DP-4 --newmode`, it made my screen flickr, but the mode still gets added to DP-6.

Despite the node ending up on DP-6 I tried `--addmode` in hopes that it would get transferred to DP-4, but it says:

    xrandr: cannot find output "2560x1440_60.00"

(Tried with and without ")


Side note: Something did something, because I don't think this worked before.. If i shove the mouse to the right edge of the screen, it now pans the picture over that area, like I'm looking through a enhancement-glass.. It's quite odd.. (I'm running in 2560x1440 scaled mode from nvidia-settings at the moment.. Wonder if this is a feature I can turn off? o0

Last edited by Torxed (2017-01-31 20:07:28)

Offline

#4 2017-01-31 20:11:05

aw1cks
Member
From: UK
Registered: 2017-01-31
Posts: 10
Website

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

Sorry, syntax error. Make that:

$ xrandr --addmode DP-4 2560x1440_60.00

Offline

#5 2017-01-31 20:19:13

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

aw1cks wrote:

Sorry, syntax error. Make that:

$ xrandr --addmode DP-4 2560x1440_60.00

It works better, but with an error:

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  18 (RRAddOutputMode)
  Serial number of failed request:  41
  Current serial number in output stream:  42

Does this have to do with panning?
Because whenever I search for a solution, that's what people keep mucking around with..

And I'm running scaled for now, just so I'm able to read anything at all on this monitor..
And under advanced settings, these are the options I'm left to work with:

iGoCnc3.png

Last edited by Torxed (2017-01-31 20:27:54)

Offline

#6 2017-01-31 21:59:42

aw1cks
Member
From: UK
Registered: 2017-01-31
Posts: 10
Website

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

Ah yes. I remember this issue now. The way I got around it was by generating a custom EDID file and using a custom xconfig to inject it at boot. However that shouldn't be necessary in your case; you have the EDID entry right there. Could you run xrandr with no arguments and post the result?

Offline

#7 2017-01-31 22:05:55

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

Default (Running 1920x1080 Scaled via nvidia-settings because I'm getting old and ready for bed and need my low-res to see text night time haha):

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 346mm x 194mm
   3840x2160     60.00*+
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 disconnected (normal left inverted right x axis y axis)

With your mods:

[anton@lappy ~]$ gtf 2560 1440 60

  # 2560x1440 @ 60.00 Hz (GTF) hsync: 89.40 kHz; pclk: 311.83 MHz
  Modeline "2560x1440_60.00"  311.83  2560 2744 3024 3488  1440 1441 1444 1490  -HSync +Vsync

[anton@lappy ~]$ export g='"2560x1440_60.00"  311.83  2560 2744 3024 3488  1440 1441 1444 1490  -HSync +Vsync'
[anton@lappy ~]$ xrandr --newmode $g
[anton@lappy ~]$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DP-0 disconnected primary (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 346mm x 194mm
   3840x2160     60.00*+
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 disconnected (normal left inverted right x axis y axis)
  "2560x1440_60.00" (0x25f) 311.830MHz -HSync +VSync
        h: width  2560 start 2744 end 3024 total 3488 skew    0 clock  89.40KHz
        v: height 1440 start 1441 end 1444 total 1490           clock  60.00Hz

(again, tried with and without quotes ("))

Last edited by Torxed (2017-01-31 22:06:58)

Offline

#8 2017-01-31 22:25:37

aw1cks
Member
From: UK
Registered: 2017-01-31
Posts: 10
Website

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

That's really odd. It's supposed to show all the resolution options.
For example, here's mine:

Screen 0: minimum 8 x 8, current 3520 x 1200, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1600x1200+0+0 (normal left inverted right x axis y axis) 400mm x 300mm
   1600x1200    100.00*+  85.00    75.00  
   1920x1080     59.94  
   1800x1440     75.00  
   1280x1024     75.02  
   1280x960     125.00  
   1280x720      59.94  
   1152x864      85.00  
   1024x768     155.00    85.00    75.03  
   800x600      170.01    85.06    75.00  
   720x480       59.94  
   640x480       85.01    75.00    59.94  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 connected 1920x1200+1600+0 (normal left inverted right x axis y axis) 550mm x 340mm
   1920x1200     59.95*+
   1920x1080     59.94    50.00    60.00    50.04  
   1680x1050     59.95  
   1440x900      59.89  
   1440x576      50.08  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93  

It seems that either your EDID is not being loaded correctly, or there is some bug in the nvidia drivers. Do you have another DE installed? If so, when using it, can you change the resolution there to 2560x1440 through the GUI? Also, if you have Windows installed, have a look there.

EDIT: I was being a bit stupid. You can check straight in nvidia-settings. In the dropdown menu for resolution (on the screen where you took a screenshot), do any other options come up?

Last edited by aw1cks (2017-01-31 22:28:37)

Offline

#9 2017-02-01 10:39:06

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

The output of `xrandr` that you posted, that's what it has looked like for the better part of a year now. And that's what got me thinking this is a nvidia bug or something to do with xorg-server.

Under nvidia-settings I sure have a bunch of resolutions, they're all "(scaled)" tho (aka panning mode).
QSjFQVp.png

I do not have another DE installed, I could probably do that throughout the day.. Shouldn't be to much of a hassle :)

Edit: I've installed plasma+kde-applicatons, and it works better (still same issues tho).

This is what I see physically on my monitor, `awesome` does not constrict itself to what I actually see on the monitor, it expands to all available space in xorg-server (which it should).
Here's also a picture of the resolution settings KDE gives me:
* http://i.imgur.com/RZ8dG6b.png

But whenever I move my mouse to the edge in KDE, I get the same panning behavior as in Awesome, except instead of showing more desktop area as awesome does, I get black areas in KDE (because KDE constricts to the panning section, and not all available xorg-server space).

* http://i.imgur.com/9FDtBZB.png

The last picture of my KDE setup is my actual xorg-server size, the screen area a regular print-screen will show/register (even when selecting 1920x1080 in nvidia-settings), it's always 4k mode - it just pans/zooms weird and shows me a section of what xorg-server provides. KDE restricts to panning-section, awesome extends to the actual resolution.
Here's a picture of what I see in Awesome:

* http://i.imgur.com/uMmeEwR.png

It's all a bit confusing to describe, I could post a video of the behavior if that helps but not sure it will.

Last edited by Torxed (2017-02-01 11:14:59)

Offline

#10 2017-02-01 12:25:40

Torxed
Member
Registered: 2013-01-10
Posts: 200

Re: nvidia/xorg/awesome - xrandr shows only one mode + weird scaling

One way to get the panning out of the question is to do:

export resolution="1920x1080"
nvidia-settings --assign CurrentMetaMode="DP-4: nvidia-auto-select @$resolution +0 +0 {ViewPortIn=$resolution, ViewPortOut=$resolution+0+0}"

However, this will literally force my resolution to physically be whatever i assign `$resolution` to be.
Meaning, it'll have a teeny tiny box in my top left corner of my 4K monitor - It won't actually stretch across the physical surface of the monitor.

Last edited by Torxed (2017-02-01 14:44:23)

Offline

Board footer

Powered by FluxBB