nvidia resolution mess after sleep mode

Asked by Angel Cervera Claudio

I installed Ubuntu 23.10 on a laptop Legion Pro 5 (16IRX8). It has a GeForce RTX 4070 Max-Q GPU. I use an external display Samsung 49" CRG90 DQHD Curved 120Hz (LC49RG90SSUXEN)

When I start the laptop, the display is detected properly and I can set the external display to 5120x1440 119.97Hz and all looks fine.

But if it goes to sleep mode or the display is off after a few minutes, when it wakes up, the display is configured as 3840x1080 119.97Hz and I'm not able to change back to 5120x1440 119.97Hz because for that resolution the only option is 100Hz or 59.98Hz.

Logout and login allows me to select the right resolution again.

Any idea or guidance to find where is the problem?

~ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic

~ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 545.29.06 Thu Nov 16 01:59:08 UTC 2023
GCC version: gcc version 13.2.0 (Ubuntu 13.2.0-4ubuntu3)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Are you using Wayland or Xorg?

Revision history for this message
Angel Cervera Claudio (angelcervera-8) said :
#2

Currently using X11. I thought the default one was Wayland, but it looks like it uses X11. I don't know why, because it's a fresh installation.

So at the moment, the problem is with X11. I'm going to test it with Wayland, to check if the problem is with both.

Revision history for this message
Angel Cervera Claudio (angelcervera-8) said :
#3

Yes, looks like the problem is only with X11. Using Wayland, it's working fine after back from sleep.

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#4

If Xorg is an issue then you can read the Xorg log in /var/log it may give clues

Revision history for this message
Angel Cervera Claudio (angelcervera-8) said :
#5

Checking logs for using Wayland because moving windows is not fluid.

I found these logs.
Secondary GPU initialization failed (Failed to create gbm_surface: Function not implemented). Falling back to GPU-less mode instead, so the secondary monitor may be slow to update.

Moving again to X11 to see the logs.