This change, suggested by Gemini, worked for me.

The idea is to wait for udev daemon service to come up and do `udevadm
settle --timeout=10` pre-exec, which should hopefully wait for @binli's
display devices to come up(?).  I don't really like something blocking
10 sec, but it beats hanging forever.. I don't know if other parts of
the system would rely on power-profile-daemon service coming up though,
thanks for reviewing any downstream reprecussions!

Does this resolve your black screen issue @binli? It worked with the
RDP/Remote Login!

```
diff --git a/data/power-profiles-daemon.service.in 
b/data/power-profiles-daemon.service.in
index b753b08..bfe6035 100644
--- a/data/power-profiles-daemon.service.in
+++ b/data/power-profiles-daemon.service.in
@@ -1,12 +1,13 @@
 [Unit]
 Description=Power Profiles daemon
 Conflicts=tuned.service tlp.service auto-cpufreq.service system76-power.service
-After=multi-user.target display-manager.target
+After=systemd-udevd.service
 
 [Service]
 Type=dbus
 BusName=org.freedesktop.UPower.PowerProfiles
 # To enable debugging add a -vv to the ExecStart line
+ExecStartPre=-/usr/bin/udevadm settle --timeout=10
 ExecStart=@libexecdir@/power-profiles-daemon
 Restart=on-failure
 # This always corresponds to /var/lib/power-profiles-daemon
@@ -45,4 +46,4 @@ SystemCallErrorNumber=EPERM
 SystemCallArchitectures=native
 
 [Install]
-WantedBy=graphical.target
+WantedBy=multi-user.target
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164213

Title:
  SRU causes apt install power-profiles-daemon to hang on Ubuntu 24.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/2164213/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to