Resolution in xorg mismatch with actual resolution

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
nonameC_
Level 1
Level 1
Posts: 6
Joined: Fri Jan 27, 2023 7:02 pm

Resolution in xorg mismatch with actual resolution

Post by nonameC_ »

I have a laptop with a screen which resolution is 2880x1800 and a NVIDIA graphic card. The system runs well, but the UI seems a little bigger than it was in Windows at the same scale. Then I installed 470 version of nvidia driver, as it seems that newer drivers could't work on RTX2050. The resolution in NVIDIA X Server setting was 3296×2060, which was way higher than my actual resolution (That may explain why the size of the UI was weird). But the resolution in the Preferences was 2880×1800, which is normal. I wonder how can I solve this problem without manually restrict the resolution. (The system was installed in an USB drive, and I need to use the same system on another laptop with a 1920×1080 screen.)
Last edited by LockBot on Thu Jul 27, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Resolution in xorg mismatch with actual resolution

Post by SMG »

nonameC_ wrote: Fri Jan 27, 2023 7:30 pm I have a laptop with a screen which resolution is 2880x1800 and a NVIDIA graphic card. The system runs well, but the UI seems a little bigger than it was in Windows at the same scale. Then I installed 470 version of nvidia driver, as it seems that newer drivers could't work on RTX2050. The resolution in NVIDIA X Server setting was 3296×2060, which was way higher than my actual resolution (That may explain why the size of the UI was weird). But the resolution in the Preferences was 2880×1800, which is normal. I wonder how can I solve this problem without manually restrict the resolution. (The system was installed in an USB drive, and I need to use the same system on another laptop with a 1920×1080 screen.)
Welcome to the forum, nonameC_.

Does the other laptop have a similar Nvidia graphics card? That and whether or not the usb drive was set up to be able to boot properly on multiple computers is likely to be more of an issue.

Please give us information about your install by entering this command in a terminal:

Code: Select all

inxi -Fxxxrz
Click </> from the mini toolbar above the textbox where you type your reply and then place your cursor between the code tags and paste the results of the command between the code tags [code]Results[/code]. This will let us know how Mint sees your hardware.

Pleases also provide the output of

Code: Select all

xrandr
and enclose the results in code tags. Displaying terminal output in a post has a graphic on using code tags.

We have helped some people with resolution issues on 2000 series GPU with the newest drivers so while you are not the first to mention it, it is likely there is something special about how your laptop's display is wired that may be resulting in the current issue.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
nonameC_
Level 1
Level 1
Posts: 6
Joined: Fri Jan 27, 2023 7:02 pm

Re: Resolution in xorg mismatch with actual resolution

Post by nonameC_ »

SMG wrote: Fri Jan 27, 2023 8:53 pm
Thanks for your reply!
here's my inxi information:

Code: Select all

System:
  Kernel: 5.15.0-58-generic x86_64 bits: 64 compiler: gcc v: 11.3.0
    Desktop: Cinnamon 5.6.7 tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0
    Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: LENOVO product: 21CX v: ThinkBook 14 G4+ IAP
    serial: <superuser required> Chassis: type: 10 v: ThinkBook 14 G4+ IAP
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76479 WIN
    serial: <superuser required> UEFI: LENOVO v: HYCN40WW date: 09/15/2022
Battery:
  ID-1: BAT0 charge: 58.1 Wh (98.1%) condition: 59.2/62.0 Wh (95.4%)
    volts: 17.4 min: 15.5 model: Sunwoda L21D4PD6 type: Li-ion serial: <filter>
    status: N/A cycles: 46
CPU:
  Info: 12-core (4-mt/8-st) model: 12th Gen Intel Core i5-12500H bits: 64
    type: MST AMCP smt: enabled arch: Alder Lake rev: 3 cache: L1: 1.1 MiB
    L2: 9 MiB L3: 18 MiB
  Speed (MHz): avg: 681 high: 811 min/max: 400/4500:3300 cores: 1: 728
    2: 811 3: 691 4: 767 5: 636 6: 643 7: 731 8: 767 9: 711 10: 754 11: 682
    12: 627 13: 662 14: 648 15: 408 16: 635 bogomips: 99532
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics vendor: Lenovo
    driver: i915 v: kernel ports: active: eDP-1
    empty: DP-1, DP-2, DP-3, DP-4, HDMI-A-1 bus-ID: 00:02.0
    chip-ID: 8086:46a6 class-ID: 0300
  Device-2: NVIDIA GA107M [GeForce RTX 2050] vendor: Lenovo driver: nvidia
    v: 470.161.03 pcie: speed: 16 GT/s lanes: 4 bus-ID: 01:00.0
    chip-ID: 10de:25a9 class-ID: 0302
  Device-3: Luxvisions Innotech Integrated RGB Camera type: USB
    driver: uvcvideo bus-ID: 3-6:3 chip-ID: 30c9:0057 class-ID: fe01
    serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.3 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3296x2060 s-dpi: 168 s-size: 499x312mm (19.6x12.3")
    s-diag: 589mm (23.2")
  Monitor-1: eDP-1 model: AU Optronics res: 3296x2060 hz: 90 dpi: 278
    size: 301x188mm (11.9x7.4") diag: 355mm (14") modes: 2880x1800
  OpenGL: renderer: Mesa Intel Graphics (ADL GT2) v: 4.6 Mesa 22.0.5
    direct render: Yes
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio vendor: Lenovo
    driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3 chip-ID: 8086:51c8
    class-ID: 0401
  Sound Server-1: ALSA v: k5.15.0-58-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:51f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:1a1f class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-10:4 chip-ID: 8087:0026 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
  Local Storage: total: 709.83 GiB used: 13.46 GiB (1.9%)
  ID-1: /dev/nvme0n1 vendor: Micron model: MTFDKBA512TFH size: 476.94 GiB
    speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter> rev: 1006P7LN
    temp: 23.9 C scheme: GPT
  ID-2: /dev/sda type: USB model: EVACLUB UltraSSD size: 232.89 GiB
    type: SSD serial: <filter> rev: EVA1 scheme: GPT
Partition:
  ID-1: / size: 169.41 GiB used: 13.46 GiB (7.9%) fs: ext4 dev: /dev/sda3
  ID-2: /boot/efi size: 93.5 MiB used: 5.2 MiB (5.6%) fs: vfat
    dev: /dev/sda1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 27.8 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: apt: 2302
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb https://mirror.sjtu.edu.cn/linuxmint vera main upstream import backport
    2: deb http://ftp.sjtu.edu.cn/ubuntu jammy main restricted universe multiverse
    3: deb http://ftp.sjtu.edu.cn/ubuntu jammy-updates main restricted universe multiverse
    4: deb http://ftp.sjtu.edu.cn/ubuntu jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Info:
  Processes: 373 Uptime: 4m wakeups: 243 Memory: 15.36 GiB
  used: 2.45 GiB (15.9%) Init: systemd v: 249 runlevel: 5 Compilers:
  gcc: 11.3.0 alt: 11 Shell: Bash v: 5.1.16 running-in: gnome-terminal
  inxi: 3.3.13
and this is my xrandr output:

Code: Select all

Screen 0: minimum 320 x 200, current 3296 x 2060, maximum 16384 x 16384
eDP-1 connected primary 3296x2060+0+0 (normal left inverted right x axis y axis) 301mm x 188mm
   2880x1800     90.01*+
   2880x1620     90.01  
   2560x1600     90.01  
   2560x1440     90.01  
   2048x1536     90.01  
   1920x1440     90.01  
   1856x1392     90.01  
   1792x1344     90.01  
   2048x1152     90.01  
   1920x1200     90.01  
   1920x1080     90.01  
   1600x1200     90.01  
   1680x1050     90.01  
   1400x1050     90.01  
   1600x900      90.01  
   1280x1024     90.01  
   1400x900      90.01  
   1280x960      90.01  
   1440x810      90.01  
   1368x768      90.01  
   1280x800      90.01  
   1152x864      90.01  
   1280x720      90.01  
   1024x768      90.01  
   1024x768i     90.01  
   960x720       90.01  
   928x696       90.01  
   896x672       90.01  
   1024x576      90.01  
   960x600       90.01  
   832x624       90.01  
   960x540       90.01  
   800x600       90.01  
   840x525       90.01  
   864x486       90.01  
   700x525       90.01  
   800x450       90.01  
   640x512       90.01  
   700x450       90.01  
   640x480       90.00  
   720x405       90.01  
   720x400       90.00  
   684x384       90.01  
   640x400       90.01  
   576x432       90.01  
   640x360       90.00  
   640x350       90.01  
   512x384       90.01  
   512x384i      90.00  
   512x288       90.01  
   416x312       90.00  
   480x270       90.01  
   400x300       90.01  
   432x243       90.00  
   320x240       90.00  
   360x202       90.01  
   360x200       90.00  
   320x200       90.00  
   320x180       90.00  
   320x175       90.00  
HDMI-1 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)
Last edited by SMG on Sat Jan 28, 2023 11:03 am, edited 1 time in total.
Reason: Removed quote contents which are a duplicate of the prior post.
nonameC_
Level 1
Level 1
Posts: 6
Joined: Fri Jan 27, 2023 7:02 pm

Re: Resolution in xorg mismatch with actual resolution

Post by nonameC_ »

After several attempts I figure out that the problem only appears while using non-interger scaling, when I set the scale to 100% or 200%, the resolution becomes normal. But my screen needs non-interger scaling to have an appropriate UI size,then how could I solve this problem?
billyswong
Level 8
Level 8
Posts: 2239
Joined: Wed Aug 14, 2019 1:02 am

Re: Resolution in xorg mismatch with actual resolution

Post by billyswong »

If you want slightly smaller UI than the given 100%/125%/150%/175%/200% scale, one way is to consider a switch to a higher-density UI theme, for example "Mint-X" in Menu > Themes > Applications

The strange resolution reading is a side-effect of how Cinnamon implement fractional scaling for GTK-based desktop and applications.

p.s. If that's not enough, go to Menu > Font Selection and decrease the UI font size there from 10pt to 9pt
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Resolution in xorg mismatch with actual resolution

Post by SMG »

nonameC_ wrote: Sat Jan 28, 2023 5:32 amCPU:
Info: 12-core (4-mt/8-st) model: 12th Gen Intel Core i5-12500H bits: 64
type: MST AMCP smt: enabled arch: Alder Lake rev: 3 cache: L1: 1.1 MiB
L2: 9 MiB L3: 18 MiB
With a 12th-gen Intel CPU, I recommend you upgrade to a newer kernel. That will provide newer graphics (Intel) drivers for your dual-graphics laptop. It should also control the dual-cores better as well.

You can install the latest 6.0-oem kernel with

Code: Select all

sudo apt-get install linux-oem-22.04b
and reboot.

Your system has dual graphics and the info below seems to indicate you are currently running in On-Demand mode. That means it primarily renders with Intel, but Nvidia is also available. Please check the nvidia-prime-applet to verify your system is showing On-Demand mode. (I suspect it looks like an Intel icon on your panel.)
Graphics:
Device-1: Intel Alder Lake-P Integrated Graphics vendor: Lenovo
driver: i915 v: kernel ports: active: eDP-1
empty: DP-1, DP-2, DP-3, DP-4, HDMI-A-1 bus-ID: 00:02.0
chip-ID: 8086:46a6 class-ID: 0300
Device-2: NVIDIA GA107M [GeForce RTX 2050] vendor: Lenovo driver: nvidia
v: 470.161.03 pcie: speed: 16 GT/s lanes: 4 bus-ID: 01:00.0
chip-ID: 10de:25a9 class-ID: 0302
Display: x11 server: X.Org v: 1.21.1.3 driver: X:
loaded: modesetting,nvidia
unloaded: fbdev,nouveau,vesa gpu: i915
display-ID: :0 screens: 1
Screen-1: 0 s-res: 3296x2060 s-dpi: 168 s-size: 499x312mm (19.6x12.3")
s-diag: 589mm (23.2")
Monitor-1: eDP-1 model: AU Optronics res: 3296x2060 hz: 90 dpi: 278
size: 301x188mm (11.9x7.4") diag: 355mm (14") modes: 2880x1800
OpenGL: renderer: Mesa Intel Graphics (ADL GT2) v: 4.6 Mesa 22.0.5
direct render: Yes
nonameC_ wrote: Sat Jan 28, 2023 5:32 amand this is my xrandr output:

Code: Select all

Screen 0: minimum 320 x 200, current 3296 x 2060, maximum 16384 x 16384
eDP-1 connected primary 3296x2060+0+0 (normal left inverted right x axis y axis) 301mm x 188mm
   2880x1800     90.01*+
It shows the correct resolution for the monitor. When reading xrandr output, *= current resolution and += preferred resolution. However, the overall screen size is not correct. It is showing 3296 x 2060.

I have helped someone else for whom the latest Nvidia driver was not getting the correct EDID for their monitor. Their computer had an GeForce RTX 2060 so maybe that is the issue here as well. (They had a desktop with only Nvidia.)
nonameC_ wrote: Sat Jan 28, 2023 11:31 amAfter several attempts I figure out that the problem only appears while using non-interger scaling, when I set the scale to 100% or 200%, the resolution becomes normal. But my screen needs non-interger scaling to have an appropriate UI size,then how could I solve this problem?
See if the newer kernel helps.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
nonameC_
Level 1
Level 1
Posts: 6
Joined: Fri Jan 27, 2023 7:02 pm

Re: Resolution in xorg mismatch with actual resolution

Post by nonameC_ »

SMG wrote: Sat Jan 28, 2023 5:39 pmSee if the newer kernel helps.
I've upgraded the latest kernel, but things went even worse. Now my whole system display becomes extremely laggy (I've seen such situation when I installed Debian 11 and upgraded it to Debian testing.)
The display was too laggy that I can't even open the forum on my computer, so it maybe impossible for me to copy some system information, but I'll try to make it.
Last edited by SMG on Sun Jan 29, 2023 12:40 pm, edited 1 time in total.
Reason: Shortened quote to relevant information to make the response easier to see.
nonameC_
Level 1
Level 1
Posts: 6
Joined: Fri Jan 27, 2023 7:02 pm

Re: Resolution in xorg mismatch with actual resolution

Post by nonameC_ »

billyswong wrote: Sat Jan 28, 2023 12:59 pm If you want slightly smaller UI than the given 100%/125%/150%/175%/200% scale, one way is to consider a switch to a higher-density UI theme, for example "Mint-X" in Menu > Themes > Applications

The strange resolution reading is a side-effect of how Cinnamon implement fractional scaling for GTK-based desktop and applications.

p.s. If that's not enough, go to Menu > Font Selection and decrease the UI font size there from 10pt to 9pt
175% was fine to me, But the real problem appears when I try to use OBS for screen recording. OBS will recognize the wrong virtual resolution, and this makes the system becomes extremely slow, which is definitely a big deal.
billyswong
Level 8
Level 8
Posts: 2239
Joined: Wed Aug 14, 2019 1:02 am

Re: Resolution in xorg mismatch with actual resolution

Post by billyswong »

nonameC_ wrote: Sun Jan 29, 2023 8:24 am 175% was fine to me, But the real problem appears when I try to use OBS for screen recording. OBS will recognize the wrong virtual resolution, and this makes the system becomes extremely slow, which is definitely a big deal.
Then you are stuck for 200% for your scenario now. GTK doesn't support native fractional scaling while X.Org doesn't support server side fractional scaling in a per window manner. Thus the fractional scaling in Cinnamon is hackish.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Resolution in xorg mismatch with actual resolution

Post by SMG »

nonameC_ wrote: Sun Jan 29, 2023 3:37 amI've upgraded the latest kernel, but things went even worse. Now my whole system display becomes extremely laggy (I've seen such situation when I installed Debian 11 and upgraded it to Debian testing.)
The display was too laggy that I can't even open the forum on my computer, so it maybe impossible for me to copy some system information, but I'll try to make it.
Sorry to hear that. I would not have expected that to happen. You can boot into the older kernel and remove this one in Update Manager. Let us know if you need instructions to do that.
nonameC_ wrote: Sun Jan 29, 2023 8:24 am OBS will recognize the wrong virtual resolution, and this makes the system becomes extremely slow, which is definitely a big deal.
Have you checked the OBS forums to see if there is a possible resolution there? This is an older topic (and thus would be an older version of OBS) Bug Report OBS detects wrong resolution, but maybe it will give you some ideas. Or maybe there is something more recent on their forum.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
nonameC_
Level 1
Level 1
Posts: 6
Joined: Fri Jan 27, 2023 7:02 pm

Re: Resolution in xorg mismatch with actual resolution

Post by nonameC_ »

SMG wrote: Sun Jan 29, 2023 3:52 pm
nonameC_ wrote: Sun Jan 29, 2023 3:37 amI've upgraded the latest kernel, but things went even worse. Now my whole system display becomes extremely laggy (I've seen such situation when I installed Debian 11 and upgraded it to Debian testing.)
The display was too laggy that I can't even open the forum on my computer, so it maybe impossible for me to copy some system information, but I'll try to make it.
Sorry to hear that. I would not have expected that to happen. You can boot into the older kernel and remove this one in Update Manager. Let us know if you need instructions to do that.
nonameC_ wrote: Sun Jan 29, 2023 8:24 am OBS will recognize the wrong virtual resolution, and this makes the system becomes extremely slow, which is definitely a big deal.
Have you checked the OBS forums to see if there is a possible resolution there? This is an older topic (and thus would be an older version of OBS) Bug Report OBS detects wrong resolution, but maybe it will give you some ideas. Or maybe there is something more recent on their forum.
After several tries, It seems that there's no proper way to solve this problem. The fractional scale remains a problem to most DEs. I reinstalled my system several times and tried original Ubuntu, and GNOME42 has the same problem with a different behaviour. So i decided to give up and install Windows instead on my USB drive.
After all, thank you for your help!
Locked

Return to “Beginner Questions”