summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2022-06-15 11:34:51 +0200
committerBenjamin Berg <benjamin@sipsolutions.net>2022-06-15 11:54:24 +0000
commit1a9541814e8ee3c30ecee6224c92f54c22855f9d (patch)
tree647785f67e8c620f752b75999f80b60021eeabe0
parent4dac45e53a16739f25252b2f2dca4b4220d6ff55 (diff)
downloadupower-1a9541814e8ee3c30ecee6224c92f54c22855f9d.tar.gz
Add some debugging information to the README
We keep giving people these commands for bug triaging. So, lets hope that adding them to the README removes some of the overhead and can be helpful to users.
-rw-r--r--README33
1 files changed, 33 insertions, 0 deletions
diff --git a/README b/README
index 66cc286..2dd2c9f 100644
--- a/README
+++ b/README
@@ -14,3 +14,36 @@ listening to device events and querying history and statistics.
Any application or service on the system can access the
org.freedesktop.UPower service via the system message bus.
+Debugging
+---------
+
+When doing bug reports, the following information can be useful:
+ * `grep . /sys/class/power_supply/*/*`:
+ This includes the current kernel view of all power supplies in the
+ system. It is always a good idea to include this information.
+ * `udevadm info -e`:
+ This shows the hardware configuration and is relevant when e.g. the
+ type of an external device is misdetected.
+ * `upower -d`:
+ Shows upower's view of the state
+ * `upower --monitor-detail`:
+ Dumps device information every time that a change happens. This helps
+ with debugging dynamic issues.
+ * `udevadm monitor`:
+ Dumps the udev/kernel reported hardware changes (and addition/removal).
+ This is helpful when debugging dynamic issues, in particular if it is
+ not clear whether the issue is coming from the kernel or upower.
+
+In addition, it can also be useful to run upower in debug mode and post the
+logs. There are two ways of doing so:
+ * Run upower daemon manually, you can do so using:
+ `sudo /usr/libexec/upowerd -rd`
+ * Modify the systemd service and restart. This is best done by:
+ 1. `sudo systemctl edit upower.service`
+ 2. Adding the two lines:
+ ```
+ [Service]
+ Environment=G_MESSAGES_DEBUG=all
+ ```
+ 3. `sudo systemctl restart upower.service`
+ 4. Grab logs using `journalctl -u upower.service` or similar