Actually, I’m wondering if this might not be part of the problem:
This is when I install it over SSH, so that I actually see what’s going on:
nvidia-persistanced.service is a disabled or a static unit, not starting it. (twice)
Setting up cpp-12 (12.3.0-1ubuntu1~23.04) ...
Setting up nvidia-kernel-common-535 (535.104.05-0ubuntu0.23.04.1) ...
Installing new version of config file /etc/modprobe.d/nvidia-graphics-drivers-kms.conf ...
update-initramfs: deferring update (trigger activated) <== This is where I believe it blanked out.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145. <== Look at this line.
Setting up libnvidia-decode-535:amd64 (535.104.05-0ubuntu0.23.04.1) ... (and same for i386).
I believe that’s this line here:
system('systemctl', '--quiet', @instance_args, $action, @start_units) == 0 or die("Could not execute systemctl: $!");
My perl is rusty but iirc $! is system error code, so it’s supposed to say what the error is, or reason why it couldn’t.
I haven’t put in debug info to see what command it is that’s failing.
Update:
I can’t post more replies in this thread, so I have copied it here instead:
@cam8 It did actually in a way. Thanx!
So I found what’s going on!
I added debug info just before that line I quoted above, in deb-systemd-invoke, and I saw that it was invoking nvidia-suspend.service with “start” as an argument, which felt weird.
I then looked at where anything pertaining that service in the source packages (deb source packages), and found:
525:
dh_systemd_enable --name=nvidia-suspend
535:
dh_installsystemd --name=nvidia-suspend
Now I’m guessing, since I haven’t dug into this bit:
dh_systemd_enable - I’m assuming it enables a service, i.e. next boot it will autostart.
dh_installsystemd - I’m assuming it enables it … and starts it?
I compared the 525 and 535 versions of the service files and they are identical, same hash.
They call /usr/bin/nvidia-sleep.sh with the argument “suspend”.
/usr/bin/nvidia-sleep.sh is also identical on both, so it has to be the calling.
Well…
Then I tried the following, on a kubuntu (to get 525 driver):
sudo add-apt-repository -y ppa:graphics.drivers && sudo apt -y update && sudo apt -y dist-upgrade && sudo apt -y install nvidia-driver-535 && sudo /usr/bin/nvidia-sleep.sh resume
And lo and behold! Screen blanks and after some 45 seconds it comes back. I had to Alt-F1 to get back to graphical mode, but everything was alive (apart from KDE complaining that it lost graphics).
Then I tried an Ubuntu (535.86 by default), using almost the same line (without the install nvidia-driver-535), and again it worked. I did it twice actually, the first time it came back to GUI mode and second I had to Alt-F1 to get back there, but hey.
So if you’re using command line to update your system, this is what you need to do. I’m going to contact the maintainer and ask him if I’m correct about the change the rules file or not.
Hope this helps anyone.
// Stefan