Problems with hybrid graphics laptop recently

Hello guys. I have a laptop with intel+nvidia video adapters and suse-prime to switch between them. Today I decided to play some videogames once in a couple of weeks, and when I tried switching to nvidia, my X-server (SDDM I mean) wouldn’t start. Instead I got several messages in a row in tty1 saying:

Unable to change power state from D3cold to D0, device inaccesible

.

I still had the console at least, so I switched back to intel and could load again, but this message appeared again during loading, though only once.

Here’s the output of

journalctl -p 3 -xb

from current boot:

(some messages about bluetooth and geolocation services)
авг 27 18:26:48 blackflame kernel: pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
(a loooooot of copies of the message above)
авг 27 18:26:50 blackflame tlp[5123]: Error: tlp.service is not enabled, power saving will not apply on boot.
авг 27 18:26:50 blackflame tlp[5123]: >>> Invoke ‘systemctl enable tlp.service’ to correct this!
(multiple copies of the message above)

Here’s some of the output of dmesg during boot:

[FONT=monospace] 5.703359] bbswitch: version 0.8
5.704248] bbswitch: Found integrated VGA device 0000:00:02.0: _SB_.PCI0.GFX0
5.704846] bbswitch: Found discrete VGA device 0000:01:00.0: _SB_.PCI0.PEG0.PEGP
5.715260] ACPI Warning**: _SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20220331/nsarguments-61)**
5.717062] bbswitch: detected an Optimus _DSM function
5.717093] pci 0000:01:00.0: enabling device (0000 -> 0003)
5.717724] bbswitch: disabling discrete graphics
[FONT=monospace] 5.753712] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is off[/FONT]
7.811293] pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
38.324951] ACPI Error: Aborting method _SB.PCI0.PEG0.PEGP.NVPO due to previous error (AE_AML_LOOP_TIMEOUT) (20220331/psparse-529)
38.324991] ACPI Error: Aborting method _SB.PCI0.PGON due to previous error (AE_AML_LOOP_TIMEOUT) (20220331/psparse-529)
38.325015] ACPI Error: Aborting method _SB.PCI0.PEG0.PG00._ON due to previous error (AE_AML_LOOP_TIMEOUT) (20220331/psparse-529)
39.584962] pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
39.586738] pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
51.084756] pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
51.118293] pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible
[/FONT]

I googled this message, and found some posts from different times. The posts from this year mention a problem in later kernel versions of ubuntu or arch, which in case of ubuntu is 5.4 to 5.6, and in case of arch was not mentioned. I have kernels 5.19.2 and 5.19.0 available, I tried them both and the message appears with both.

My nvidia version is 515.65.01-16.1, and my videocard is GeForce GTX 1650.

Going to do what the logs say and enable tlp.service and see what happens.

Wow, it worked, just like that! Or it was a lucky reboot, since some other posts I found online said this problem goes away in 1 out of 5 cases.

I’ll do some reboots later and reply again if it comes back.

Alright, after two months of several successful reboots and being afraid to switch graphics, I did “prime-select intel” and rebooted. Upon reboot SDDM was not appearing for half a minute, and instead I saw the familiar messages in tty1. But after some time I saw a message about ACPI timeout (same as last time), and SDDM opened and I could login. I looked into dmesg and journalctl, and the logs were very similar except there was no mention of TLP.

After some time I rebooted again (still on intel), and this time boot was a complete success and there are no error messages. So it seems it just happens sometimes, or that it happens when you switch graphics.