[i915] Blanked screen doesn't wake up after locking [drmModeAtomicCommit: Argument invalide] [drmModeAtomicCommit: Invalid argument]

Bug #1968040 reported by Olivier Tilloy
288
This bug affects 42 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
Mutter
New
Unknown
linux (Ubuntu)
Confirmed
Undecided
Unassigned
linux-hwe-5.19 (Ubuntu)
Confirmed
Undecided
Unassigned
mutter (Ubuntu)
Confirmed
High
Unassigned

Bug Description

[ Workaround ]

Add to /etc/environment (in Ubuntu 22.04):

  MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0

or in Ubuntu 22.10 and later:

  MUTTER_DEBUG_FORCE_KMS_MODE=simple

and then reboot.

[ Upstream bugs ]

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5098
https://gitlab.gnome.org/GNOME/mutter/-/issues/2268
https://gitlab.gnome.org/GNOME/mutter/-/issues/2749

[ Original report ]

(initially reported as a comment on bug #1965085, and split into a separate bug report)

After I lock my screen and let it blank, moving the mouse or pressing any key on the keyboard won't wake it up. The only reliable workaround I've found is to press Ctrl+Alt+F1.

That's on a fully up-to-date jammy, my hardware is an Intel NUC with a single Samsung monitor connected with a standard HDMI cable. This is a regression that started happening yesterday (2022-04-05) if I can remember correctly (I do apply pending updates at least once daily).

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gdm3 42.0-1ubuntu2
ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
Uname: Linux 5.15.0-25-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu80
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 6 15:19:30 2022
InstallationDate: Installed on 2020-09-16 (566 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Alpha amd64 (20200910)
SourcePackage: gdm3
UpgradeStatus: Upgraded to jammy on 2022-03-19 (17 days ago)

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Attaching my journal for the current boot, where I have observed the issue a few times already.

I'm seeing some critical error messages for gnome-session-binary and one segfault, unsure whether this is related to the problem though.

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Not a crash, apparently. The screen is failing to update in Wayland sessions:

abr 06 13:55:43 dantian gnome-shell[37489]: Failed to post KMS update: drmModeAtomicCommit: Argument invalide
abr 06 13:55:43 dantian gnome-shell[37489]: Page flip discarded: drmModeAtomicCommit: Argument invalide

To debug it further please add MUTTER_DEBUG=kms to /etc/environment and then attach a new journal log.

Alternatively, as a workaround try adding MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 to /etc/environment.

affects: gdm3 (Ubuntu) → mutter (Ubuntu)
no longer affects: gnome-shell (Ubuntu)
no longer affects: gnome-session (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

Also what is mutter 42.0-1ubuntu2~ppa1 ? Does reverting to the archive version work?

Changed in mutter (Ubuntu):
status: New → Incomplete
Revision history for this message
Olivier Tilloy (osomon) wrote :

mutter 42.0-1ubuntu2~ppa1 is a locally-patched version with a work-around for https://gitlab.gnome.org/GNOME/mutter/-/issues/2216, as not being able to re-order my tabs in firefox was bothering me.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I reverted to stock mutter (42.0-1ubuntu1), enabled KMS debug in mutter, and observed that the problem persists. Attaching the corresponding journal.

Changed in mutter (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. Unfortunately MUTTER_DEBUG=kms can't tell us which is the invalid argument and I can't see a consistent pattern in the log.

Please try these in /etc/environment in separate sessions:

  MUTTER_DEBUG_DISABLE_TRIPLE_BUFFERING=1

  MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0

Changed in mutter (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

In case the 'rotation' and 'GAMMA_LUT' properties are relevant, please try:

 * Regular landscape orientation for a while

 * Disabling night light for a while

Please also run:

  sudo drm_info > drminfo.txt

and attach the resulting text file here.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Just tested MUTTER_DEBUG_DISABLE_TRIPLE_BUFFERING=1, and I can still observe the problem.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Now testing MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0, and it seems to fix my problem. I'll continue experimenting with it some more to confirm.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Attaching the requested output of drm_info.

Changed in mutter (Ubuntu):
status: Incomplete → New
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can confirm MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 reliably makes the problem go away for me.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. Yes MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 will reliably avoid any failures in drmModeAtomicCommit.

This seems like a very simple setup (Intel graphics and one monitor) so hopefully I will be able to reproduce the problem at some stage.

summary: - Blanked screen doesn't wake up after locking
+ Blanked screen doesn't wake up after locking [Failed to post KMS update:
+ drmModeAtomicCommit: Argument invalide] [Page flip discarded:
+ drmModeAtomicCommit: Argument invalide]
summary: - Blanked screen doesn't wake up after locking [Failed to post KMS update:
- drmModeAtomicCommit: Argument invalide] [Page flip discarded:
- drmModeAtomicCommit: Argument invalide]
+ Blanked screen doesn't wake up after locking [drmModeAtomicCommit:
+ Argument invalide]
Revision history for this message
Paul White (paulw2u) wrote : Re: Blanked screen doesn't wake up after locking [drmModeAtomicCommit: Argument invalide]

I'm also seeing this problem exactly as per bug description.

Apr 17 14:26:01 n1687 gnome-shell[845778]: Page flip discarded: drmModeAtomicCommit: Invalid argument
Apr 17 14:26:01 n1687 gnome-shell[845778]: Failed to post KMS update: drmModeAtomicCommit: Invalid argument
Apr 17 14:26:01 n1687 gnome-shell[845778]: Page flip discarded: drmModeAtomicCommit: Invalid argument

Using laptop with external monitor in single display mode, Intel graphics.

Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Alright let's mention both translations to help with text searches.

summary: Blanked screen doesn't wake up after locking [drmModeAtomicCommit:
- Argument invalide]
+ Argument invalide] [drmModeAtomicCommit: Invalid argument]
Changed in mutter (Ubuntu):
importance: Undecided → High
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Blanked screen doesn't wake up after locking [drmModeAtomicCommit: Argument invalide] [drmModeAtomicCommit: Invalid argument]
Revision history for this message
Jorge Pérez Lara (jorgesgk) wrote :

I'm facing the same issue (duplicated in reported bug 1971674) with my Mi Notebook Pro 2018 running Ubuntu 22.04, an Intel® Core™ i7-8550U with an NVIDIA GeForce MX150 using Wayland. I thought the issue was with Nvidia, but I can tell that's not the case.

Revision history for this message
popov895 (popov895) wrote :

I ran into the same issue, any progress on this? Can I somehow disable the screen blanking?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Just add MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 to /etc/environment and then reboot.

Revision history for this message
popov895 (popov895) wrote :

Adding MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 doesn't help. Is there any way to disable the screen blanking?

Revision history for this message
Jorge Pérez Lara (jorgesgk) wrote :

Hi Daniel!

#20 works for me! Thanks!

Do you have any explanation for this? How come this was not a problem back when I was running Fedora? Is Ubuntu 22.04 using an older, unfixed version of some package? Was this bug introduced downstream in the Ubuntu release? Are there any plans of fixing this for 22.04.1?

Revision history for this message
Zingam (registrirayme) wrote :

Hi Jorge, do you have an external monitor connected via HDMI and an internal display (a laptop with hybrid graphics Intel + NVIDIA) too? I can't test this right now.

My original bug report is a big messy. It is more like three separate issue into one.
1. Internal monitor doesn't wake up after sleep
2. External monitor doesn't get turned off during sleep
3. Poor performance.
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1971149

All described issues aren't present in an Xorg session.

Revision history for this message
Jorge Pérez Lara (jorgesgk) wrote (last edit ):

#23 yes. My laptop is a Nvidia+Intel hybrid laptop. Internal screen now wakes up (although the lockscreen blurred background is shown black, but that's a minor issue for me), and external one works perfectly.

I never had performance issues, and once I get past the lockscreen it just works. Again, on Fedora I simply did not have such a problem. I wonder what did Canonical do on Ubuntu for this bug to appear.

Revision history for this message
popov895 (popov895) wrote :

I'm away from Ubuntu for now, so can anyone check if the following command solves this issue:

    xset -dpms

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

> Adding MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 doesn't help.
> Is there any way to disable the screen blanking?

Yes it does solve this bug. If it doesn't solve your issue then you need to report a NEW bug.

Revision history for this message
popov895 (popov895) wrote :

The "Unblank lock screen" extenions (https://extensions.gnome.org/extension/1414/unblank/) works for me as a workaround until this issue gets fixed.

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

If MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 doesn't work for you (after rebooting) then you are commenting on the wrong bug.

Edit: popov895 has moved to bug 1977977.

Revision history for this message
Islam (islam) wrote :

This happens to when connecting HDMI monitor to the laptop.
The laptop's screen doesn't wake up while the external monitor turns on.

Unplugging the HDMI cable, makes internal monitor works again.

Revision history for this message
Islam (islam) wrote :
  • gnome Edit (7.0 MiB, application/octet-stream)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Just add MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 to /etc/environment and then reboot. If that doesn't fix your problem then please open a new bug.

Revision history for this message
Islam (islam) wrote :

Seems MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 solves the issue, hope it gets real fix soon without workarounds.

Revision history for this message
Ionut Negru (blackjohnny) wrote :

Setting MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 also works for me (XPS 9500). Furthermore, it fixes also the Night Light feature.

Thank you Daniel!

Changed in gnome-shell:
status: Unknown → New
Revision history for this message
Zingam (registrirayme) wrote :

I added this option:

MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0

to

/etc/environment

Now both screens don't turn off on a Intel/Nividia hybrid laptop similar to this:

https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1973467

The screens just get blank.

Revision history for this message
greenmandd (sunget) wrote (last edit ):

Blanked screen doesn't wake up after locking (dual monitors pc desktop config) when i use new AMD Radeon video card as RX6500XT for example. I was able to reproduce this issue in Ubuntu 20.04.4, Ubuntu 22.04 and Fedora 36. First I thought there was a problem with the video driver. Make some test with new property AMD drivers 22.10/20 for Ubuntu 20.04.4/5 HWE and Ubuntu 22.04 and always receive the same result. In the end after switching to KDE based Kubuntu 22.04 this error does not replicate. So the problem is not related with the video driver, it is connected with Gnome .

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

greenmandd, please report your bug separately by running:

  ubuntu-bug gnome-shell

Revision history for this message
Santhosh Reddy Barla (santhoshreddybarla) wrote :

Thanks Daniel for the solution, this fixes both night-light bug as well as suspend screen bug, hope this will be included in the main files in the coming updates. I m on dell g3 which has both intel and nvidia graphics, looks like this is only affecting the ones who has graphics processor.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

In mutter 43 (Ubuntu 22.10) the workaround has changed to:

  MUTTER_DEBUG_FORCE_KMS_MODE=simple

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Unassigning myself just because I won't get to this any time soon. I investigated the logs, couldn't explain it and couldn't reproduce it.

Anyone is free to work on this but I suggest discussing any findings in the upstream bugs:

  https://gitlab.gnome.org/GNOME/mutter/-/issues/2268
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5098

Changed in mutter (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
Revision history for this message
Ken VanDine (ken-vandine) wrote :

@vanvugt actually my issue must have been different, I'm not using mirror mode and it was happening to me without an external display (as well as with). The workaround did work though.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I don't think this bug relates to mirror mode. It happens on single display systems.

description: updated
Revision history for this message
Coeur Noir (coeur-noir) wrote :

It seems NOT exclusive to Wayland, as seen here → https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1983175/comments/5

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The error message "Failed to post KMS update: drmModeAtomicCommit: Argument invalide" can only occur in Wayland sessions (which might include the login screen), and it does occur in the above log from bug 1983175 too.

If you would like to discuss a Xorg problem then please open a new bug from the Xorg session by running:

  ubuntu-bug gnome-shell

Revision history for this message
Coeur Noir (coeur-noir) wrote :

ok, I was not aware of : « Wayland sessions (which might include the login screen) ».

Revision history for this message
Jorge Pérez Lara (jorgesgk) wrote (last edit ):

Same issue in 22.10. MUTTER_DEBUG_FORCE_KMS_MODE=simple doesn't work (it gets stuck in a black screen after login in to my session).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Jorge,

Please open a new bug to discuss that, by running:

  ubuntu-bug gnome-shell

Revision history for this message
Jorge Pérez Lara (jorgesgk) wrote :

Hello Daniel.

Thanks for your help, see bug 1994000.

Changed in mutter:
status: Unknown → New
Revision history for this message
popov895 (popov895) wrote :

Any news on this?

tags: added: dt-962
Revision history for this message
Islam (islam) wrote :

MUTTER_DEBUG_FORCE_KMS_MODE=simple

Didn't solve the issue for me.
This problem happens only while using the nouveau driver and I have filed a bug here:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-nouveau/+bug/2002314

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Comment #50 is a kernel bug in the nouveau driver that is not relevant here.

Revision history for this message
ExploreWiki (explorewiki) wrote :

I have a similar problem using an external HDMI monitor connected to a laptop.

Not sure if this is related because it happens with the blank screen after a period of inactivity (without using the screen lock).

After the screen has gone blank due to a period of inactivity, I move the mouse or press a key on the keyboard to wake up both screens. However, 1 of 3 things will happen:

1. The laptop's screen will wake up but the external monitor doesn't wake up.
2. The external monitor will wake up but the laptop's screen doesn't wake up.
3. Both screens will wake up as they should.

To get both screens to wake up, I right click on the active screen and click "Display Settings". Click on "Mirror" then back to "Join", then "Apply" then "Revert Settings". The blank screen then realizes it is supposed to be on and it wakes up. The other option is to unplug and re-plug the HDMI cable in, but I got tired of doing this.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

To check if this is the bug you are experiencing, look for this repeating in your system log:

  drmModeAtomicCommit: Invalid argument

If it's not mentioned in the log then you should create a new bug.

Revision history for this message
ExploreWiki (explorewiki) wrote :

Ah sorry I can't find "drmModeAtomicCommit: Invalid argument" in my system log. I think my problem is more like this one here: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1971149

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bug 1971149 is definitely a duplicate of this one.

Please open your own bug by running:

  ubuntu-bug gnome-shell

Revision history for this message
ExploreWiki (explorewiki) wrote (last edit ):

Actually the bug just happened to me and now I can see "drmModeAtomicCommit: Invalid argument" in my logs now. So it turns out I am experiencing this bug.

I will try the work around posted at the top of the first post. I will be very happy if this fixes the problem!

[ Workaround ]

Add to /etc/environment (in Ubuntu 22.04):

  MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0

or in Ubuntu 22.10 and later:

  MUTTER_DEBUG_FORCE_KMS_MODE=simple

and then reboot.

Revision history for this message
red72 (red72) wrote :

I have the same or similar bug. I tried the workaround to

Add to /etc/environmen in Ubuntu 22.10 and later:

  MUTTER_DEBUG_FORCE_KMS_MODE=simple

And my computer froze on startup on the Ubuntu screen. When I deleted the line, my computer again booted up fine.

I have a Thinkpad X1 with Ubuntu 20.04 preinstalled which I have updated to 22.10. It has Mesa Intel® Graphics (ADL GT2) graphics.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please collect a log from the previous boot where it froze:

  journalctl -b-1 > prevboot.txt

and create a new bug with that file attached.

Also check for /var/crash files and create new bugs for each using 'ubuntu-bug'.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Answer from email to comment #57:

It appears your CPU/GPU (i7-1280P) is too new for that old kernel (5.14.0-1055-oem). And so you are hitting this bug: https://launchpad.net/bugs/1991777

But the solution is simple: Just install 22.10 and don't downgrade the kernel. It should be kernel version 5.19 when Ubuntu 22.10 is installed properly.

Revision history for this message
Andy Chi (andch) wrote :

I found an easier way to reproduce this issue by the following steps:

1. Log out and select xorg
2. Log in and log out again to select wayland session
3. super + L to make screen blank.

I can reproduce this issue easily. I tried the latest drm-tip/linux-next then I can't reproduce this issue.

This kernel might help
https://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2023-02-22/

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Unfortunately I still can't reproduce the bug (on 23.04) using those steps.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

To anyone who can reproduce this bug, please help me to debug it by:

1. Remove the workaround.

2. Reboot.

3. Log in by ssh from another machine.

4. Run: drm_info > before.txt

5. Reproduce the bug by locking and trying to resume.

6. Run: drm_info > after.txt

7. Attach the two resulting text files here.

Revision history for this message
Michał Sawicz (saviq) wrote :

I believe I just had this happen, though there was a reboot and kernel switch (bug #1988989...) in between before and after.

gnome-shell was also topping out CPU.

Maybe this helps.

Revision history for this message
Michał Sawicz (saviq) wrote :
Revision history for this message
Michał Sawicz (saviq) wrote :

This may be a better one, no reboots or kernel changes between.

Revision history for this message
Michał Sawicz (saviq) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Michal. The diff looks perfectly clean and exactly what I would expect in that no part of the system has changed that would fool mutter into doing the wrong thing. So it's just that mutter's done the wrong thing... somehow. And that wrong thing is not visible in the above text files.

Revision history for this message
Josef Frola (jfrola) wrote :

Hello guys. Is this being worked on? I am experiencing this issue using Wayland on Lenovo ThinkPad P14s Gen 3 on Ubuntu 22.04.2 LTS. Would be nice to not have to restart my PC every damn time :)

Revision history for this message
ExploreWiki (explorewiki) wrote (last edit ):

Josef, did you try the workaround in the original post? The workaround fixed the problem for me on Ubuntu 22.10.

------------

[ Workaround ]

Add to /etc/environment (in Ubuntu 22.04):

  MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0

or in Ubuntu 22.10 and later:

  MUTTER_DEBUG_FORCE_KMS_MODE=simple

and then reboot.

------------

Full instructions:

1. Open terminal: CTRL + ALT + T
2. Type: sudo nano /etc/environment
3. Enter your password
4. Add the following on a new line: MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0
5. Press: Ctrl + O
6. Press: Enter
7. Press: Ctr + X
8. Type: Reboot

Changed in mutter (Ubuntu):
status: Confirmed → Incomplete
Changed in mutter (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Islam (islam) wrote :

The workaround doesn't fix the problem for me.
It's not only doesn't wake up the screen, it freezes the whole system and I have to hard reset!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That's not this bug then, so please open a new one by running:

  ubuntu-bug gnome-shell

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

Is anyone able to try putting both the kernel and mutter into debug modes at the same time?

For the kernel add parameter: drm.debug=0xff

For mutter add to /etc/environment: MUTTER_DEBUG=kms

Then reboot and your journal *should* tell us the cause of the bug.

Revision history for this message
john (johncharlesshep) wrote :

I run Ubuntu 22.04 on a Dell Optiplex 7010.
This issue started suddenly a couple of weeks back - I run updates several times weekly so not exactly sure when it started.
Just tried adding
 MUTTER_DEBUG_FORCE_KMS_MODE=simple
to environment file and after reboot, problem seems to have been resolved.
Thank you !

Revision history for this message
Alexander (s1s2sha) wrote (last edit ):

I run Ubuntu 22.04.02 on a Lenovo Legion 5i pro.
There was a bug when I switched on Wayland session.
I followed instructions that are described above and deleted gnome extention aplication.
And I've got no issues any more with lock my laptop and black screen. It's fantastic!
My conclusion is, set up latest version of Linux kernel, latest version of Nvidia driver(in my case I'm using Nvidia Server Driver 252) in Wayland session. And don't use Gnome extensions. Good luck :)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Someone please help us to find the cause of this bug by:

1. Remove all workarounds.
2. Add kernel parameter: drm.debug=0xff
3. Add to /etc/environment: MUTTER_DEBUG=kms
4. Reboot.
5. Reproduce the bug.
6. Run: journalctl -b0 > journal.txt
7. Attach the resulting text file here.

information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
aleksey (tamir.isr) wrote (last edit ):

Hi team and all.

I'm stuck with a similar issue.
The solution with MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 helped me! Thanks guys!

I created logs for you (without kernel parameter: drm.debug=0xff, can't find how do it).
If somebody wants to help collect logs it easy perform without working screen:
1. Disable authorization after sleep in the settings->privacy->screen.
2. Send Ubuntu sleep.
3. Start Ubuntu.

Now goes steps with a black screen but PC looks working:
1. Ctrl + Alt + T for open terminal.
2. Write journalctl -b0 > journal.txt ( I used the UP key for using the last terminal command).
3. restart your PC.
4. journal.txt will be in the HOME directory.

Good luck all us!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks but we do need drm.debug=0xff to make any progress here. You add it in /etc/default/grub as part of GRUB_CMDLINE_LINUX_DEFAULT and then run:

  sudo update-grub

and reboot.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Note to self:

One possible explanation here is that we're setting this twice in the same commit, which some drivers might reject(?):

Apr 12 19:36:45 ty gnome-shell[1455]: KMS: [atomic] Setting connector 79 (/dev/dri/card0) property 'CRTC_ID' (20) to 0
Apr 12 19:36:45 ty gnome-shell[1455]: KMS: [atomic] Setting connector 79 (/dev/dri/card0) property 'CRTC_ID' (20) to 45

Another possible cause might be a bad size in:

Apr 12 19:36:45 ty gnome-shell[1455]: KMS: [atomic] Setting CRTC (45, /dev/dri/card0) gamma, size: 256
Apr 12 19:36:45 ty gnome-shell[1455]: KMS: [atomic] Setting CRTC 45 (/dev/dri/card0) property 'GAMMA_LUT' (28) to 97

Although that doesn't explain all instances of the error.

Also curious that I don't see any confirmed cases of this bug in 22.10 and later.

Revision history for this message
aleksey (tamir.isr) wrote :

Hi, Daniel

I performed next changes:
1. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm.debug=0xff"
2. Add to /etc/environment: MUTTER_DEBUG=kms

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks!

It looks like most of the errors are in fact caused by previous errors:

i915 0000:00:02.0: [drm:drm_atomic_crtc_check [drm]] [CRTC:45:pipe A] requesting event but off
i915 0000:00:02.0: [drm:drm_atomic_check_only [drm]] [CRTC:45:pipe A] atomic core check failed
...
KMS: [atomic] KMS update failed: drmModeAtomicCommit: Invalid argument

So those could be improved, but they're not the root cause.

The root cause seems to be a failure of the first frame (modeset) when waking from sleep:

i915 0000:00:02.0: [drm:intel_hdmi_compute_clock [i915]] picking 12 bpc for HDMI output (pipe bpp: 36)
i915 0000:00:02.0: [drm:intel_hdmi_compute_config [i915]] bad AVI infoframe
i915 0000:00:02.0: [drm:intel_modeset_pipe_config [i915]] Encoder config failure: -22

That "-22" is the first "Invalid argument".

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This is looking like a kernel bug (comment #81) and increasingly unlike mutter has done anything wrong. Sounds like it is specifically about i915 HDMI handling.

Changed in linux (Ubuntu):
status: New → Confirmed
summary: - Blanked screen doesn't wake up after locking [drmModeAtomicCommit:
- Argument invalide] [drmModeAtomicCommit: Invalid argument]
+ [i915] Blanked screen doesn't wake up after locking
+ [drmModeAtomicCommit: Argument invalide] [drmModeAtomicCommit: Invalid
+ argument]
Changed in linux-hwe-5.19 (Ubuntu):
status: New → Confirmed
tags: added: i915
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Next please:

* More people follow the steps in comment #75.

* Some people try newer kernel versions to see if/where the problem was fixed:
  https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=D

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think we might have multiple different bugs here. The log in comment #80 sounds like this kernel bug which might occur on HDMI connections that are not 16:9 aspect:

  https://gitlab.freedesktop.org/drm/intel/-/issues/6153

But not everyone here seems to have an unusual aspect ratio, or even HDMI. So everyone else please follow the steps in comment #75.

description: updated
Revision history for this message
Tolga Gonul (tolgon) wrote :

I'm reporting this same issue from another distro (Arch in my case). I've added the journal file with the drm.debug parameter. Hope it helps.

A summary of my issues just in case:
- Lenovo T480 Laptop
- Using in combination with Lenovo USB-C thunderbolt 3 dock to drive 2 screens (That are connected through HDMI if that matters)
- When logged into a GNOME Wayland session and waking up from a suspend the screens don't come back on.
- My logitech MX Master mouse doesn't respond anymore
- My Bluetooth keyboard doesn't respond anymore
- Unplugging from Thunderbolt dock makes the system run fine again when it's just the Laptop (bluetooth keyboard and mouse still dont work tho)
- Replugging to dock causes same issues as I had after waking from suspend.

Revision history for this message
Lukáš Chmela (lukaschmela) wrote :

An issue with the same symptoms (still valid in Ubuntu 23.04) is also reported against GNOME Shell at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3135.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Tolga. It looks like the root cause of the issue on your machine is a lack of display bandwidth when trying to drive 2 screens through the same cable:

May 11 21:08:51 messier32 kernel: i915 0000:00:02.0: [drm:intel_dp_mst_compute_config [i915]] Trying to find VCPI slots in DSC mode
May 11 21:08:51 messier32 kernel: i915 0000:00:02.0: [drm:intel_dp_mst_compute_config [i915]] DSC Source supported min bpp 18 max bpp 24
May 11 21:08:51 messier32 kernel: i915 0000:00:02.0: [drm:intel_dp_mst_compute_config [i915]] DSC Sink supported min bpp 0 max bpp 0
May 11 21:08:51 messier32 kernel: i915 0000:00:02.0: [drm:intel_dp_mst_find_vcpi_slots_for_bpp.constprop.0.isra.0 [i915]] failed finding vcpi slots:-22
May 11 21:08:51 messier32 kernel: i915 0000:00:02.0: [drm:intel_atomic_check [i915]] [ENCODER:106:DP-MST C] config failure: -22

I'm not sure if that's an "expected" or "normal" error which we should expect to see on some setups forever, or if it's a kernel bug. If it's "expected" then ideally mutter/gnome-shell should fail more gracefully but I don't know how that's possible given how limited the atomic API is. You can never find out _what_ failed, only that something failed. I hate atomic KMS.

Did the workaround work for you?

  MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0
  MUTTER_DEBUG_FORCE_KMS_MODE=simple

in /etc/environment

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Comment #86 does not appear to be related to this bug so doesn't need to be discussed here.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If anyone would like to help more, please reproduce the bug and while the screen is stuck in the off state, log in by ssh and run:

  sudo apt install drm-info
  sudo drm_info > drminfo.txt

Then attach the resulting text file here.

Revision history for this message
Tolga Gonul (tolgon) wrote :

Hey Daniel. Your comment made me look closer at what was happening and I found the culprit in my case.

I have 2x 1440p screens connected through the dock, that support up to 165hz, and the dock supports enough bandwidth to run them at 1440px60hz. But when it wakes up from suspend it for some reason puts the screen settings at 1440px144hz. The same doesn't occur in xorg which is why the issue was isolated to Wayland for me.

After I woke my laptop from suspend, changed the display settings to 60hz, everything worked again. After changing it once it also seems to persist for now.

One other observation though, in xorg I can't even set my screen hz higher than 60 while Wayland gives me the option to crank it up to 144hz. When even trying to set it to 144hz, my monitors OSD tell me it still runs 60hz while gnome settings thinks it's 144hz.

Either way, I apologize if I wasted your time but I hope that it was helpful for others who might end up here trying to find a similar solution.

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

I'm not sure why the mode would be limited to 60Hz but you should know that Xorg's multi-monitor support is very limited. It can only update all monitors at the same time at the same rate. So if you have a 60Hz monitor connected then it's possible Xorg will limit all monitors to 60Hz.

Even if all your monitors are the same refresh rate, Xorg is still a menace because it tries to update all of them at the same time even if their clocks aren't in sync. This means you might see tearing.

Wayland solves all of the above.

Revision history for this message
Ecoa Anmeldung (ecoa-anmeldung) wrote :

Hello.

I seem to be hitting the same bug and I have attached the drm_info output while the screen is stuck in the off state.

I see the the same Failed to post KMS update: drmModeAtomicCommit: Invalid argument and Page flip discarded: drmModeAtomicCommit: Invalid argument in my logs while the the monitor is stuck. It gets stuck when I turn my monitor off from inactivity or the monitor turns itself off after locking the computer.

Putting MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 in /etc/environment fixed it for me.

Rarely the screen also flickers at random moment, turns dark for a second, and then turns back on. When I checked the logs after it, I see the drmModeAtomicCommit: Invalid argument lines again.

I have Ubuntu 22.04 with an external monitor Single display setup. Also Intel.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please provide a system log showing the errors:

  journalctl -b0 > journal.txt

and attach the resulting text file here.

Revision history for this message
Ecoa Anmeldung (ecoa-anmeldung) wrote :

There you go, attached is the journal of the boot when I removed the workaround and got the screen stuck in the off state. I assume this is what you really wanted and not the journal of my current boot. I have since rebooted many times.

The messages start at 21:45 which is when I managed to get the screen stuck.

I like my privacy, so I also added --no-hostname.

Revision history for this message
Helipil0t (helipil0t) wrote :

I am also able to reproduce this bug. I logged in via ssh and collected journal logs and drm_info while the screen was blank and unrecoverable.

MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0 does in fact solve the issue for me.

Revision history for this message
Helipil0t (helipil0t) wrote :
To post a comment you must log in.