amd-debug-tools 0.2.2__py3-none-any.whl → 0.2.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- amd_debug/__init__.py +10 -3
- amd_debug/acpi.py +0 -1
- amd_debug/battery.py +0 -1
- amd_debug/bios.py +8 -5
- amd_debug/common.py +70 -3
- amd_debug/database.py +22 -5
- amd_debug/display.py +2 -3
- amd_debug/failures.py +44 -3
- amd_debug/installer.py +7 -6
- amd_debug/kernel.py +20 -17
- amd_debug/prerequisites.py +166 -61
- amd_debug/pstate.py +9 -6
- amd_debug/s2idle.py +53 -44
- amd_debug/sleep_report.py +129 -87
- amd_debug/templates/html +4 -2
- amd_debug/ttm.py +157 -0
- amd_debug/validator.py +61 -34
- amd_debug/wake.py +0 -1
- amd_debug_tools-0.2.12.dist-info/METADATA +75 -0
- amd_debug_tools-0.2.12.dist-info/RECORD +47 -0
- {amd_debug_tools-0.2.2.dist-info → amd_debug_tools-0.2.12.dist-info}/entry_points.txt +1 -0
- {amd_debug_tools-0.2.2.dist-info → amd_debug_tools-0.2.12.dist-info}/top_level.txt +1 -0
- launcher.py +0 -1
- test_acpi.py +1 -1
- test_bios.py +30 -12
- test_common.py +117 -1
- test_database.py +1 -1
- test_display.py +6 -6
- test_installer.py +68 -1
- test_kernel.py +7 -6
- test_launcher.py +9 -1
- test_prerequisites.py +629 -26
- test_s2idle.py +66 -19
- test_sleep_report.py +29 -0
- test_ttm.py +276 -0
- test_validator.py +187 -16
- amd_debug_tools-0.2.2.dist-info/METADATA +0 -181
- amd_debug_tools-0.2.2.dist-info/RECORD +0 -45
- {amd_debug_tools-0.2.2.dist-info → amd_debug_tools-0.2.12.dist-info}/WHEEL +0 -0
- {amd_debug_tools-0.2.2.dist-info → amd_debug_tools-0.2.12.dist-info}/licenses/LICENSE +0 -0
test_validator.py
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
This module contains unit tests for the validator functions in the amd-debug-tools package.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
from unittest.mock import patch, mock_open
|
|
8
|
+
from unittest.mock import patch, mock_open, Mock
|
|
9
9
|
|
|
10
|
+
import os
|
|
10
11
|
import logging
|
|
11
12
|
import unittest
|
|
12
13
|
import math
|
|
@@ -43,7 +44,7 @@ class TestValidatorHelpers(unittest.TestCase):
|
|
|
43
44
|
return "Test function executed"
|
|
44
45
|
|
|
45
46
|
# Mock /sys/power/pm_debug_messages existing and all ACPI existing
|
|
46
|
-
with patch("
|
|
47
|
+
with patch("amd_debug.validator.open", new_callable=mock_open, read_data="0") as mock_file:
|
|
47
48
|
handlers = (
|
|
48
49
|
mock_file.return_value,
|
|
49
50
|
mock_open(read_data="0").return_value,
|
|
@@ -56,7 +57,7 @@ class TestValidatorHelpers(unittest.TestCase):
|
|
|
56
57
|
|
|
57
58
|
# Mock /sys/power/pm_debug_messages missing
|
|
58
59
|
with patch(
|
|
59
|
-
"
|
|
60
|
+
"amd_debug.validator.open", side_effect=FileNotFoundError("not found")
|
|
60
61
|
) as mock_file:
|
|
61
62
|
with self.assertRaises(FileNotFoundError):
|
|
62
63
|
result = test_function()
|
|
@@ -70,7 +71,8 @@ class TestValidator(unittest.TestCase):
|
|
|
70
71
|
logging.basicConfig(filename="/dev/null", level=logging.DEBUG)
|
|
71
72
|
|
|
72
73
|
@patch("amd_debug.validator.SleepDatabase")
|
|
73
|
-
|
|
74
|
+
@patch("subprocess.run")
|
|
75
|
+
def setUp(self, _db_mock, _mock_run):
|
|
74
76
|
"""Set up a mock context for testing"""
|
|
75
77
|
self.validator = SleepValidator(tool_debug=True, bios_debug=False)
|
|
76
78
|
|
|
@@ -157,9 +159,8 @@ class TestValidator(unittest.TestCase):
|
|
|
157
159
|
self.validator.capture_wake_sources()
|
|
158
160
|
|
|
159
161
|
# Validate debug messages
|
|
160
|
-
mock_record_debug.assert_any_call("Possible wakeup sources:")
|
|
161
162
|
mock_record_debug.assert_any_call(
|
|
162
|
-
"
|
|
163
|
+
"Wakeup Source|Linux Device|Status\n|/sys/devices/pci0000:00/0000:00:14.0|enabled\n"
|
|
163
164
|
)
|
|
164
165
|
|
|
165
166
|
# Stop patches
|
|
@@ -263,7 +264,7 @@ class TestValidator(unittest.TestCase):
|
|
|
263
264
|
|
|
264
265
|
# Validate debug messages
|
|
265
266
|
mock_record_debug.assert_called_once_with(
|
|
266
|
-
"Woke up from input source /sys/devices/input0 (3->5)"
|
|
267
|
+
"Woke up from input source /sys/devices/input0 (3->5)"
|
|
267
268
|
)
|
|
268
269
|
|
|
269
270
|
# Stop patches
|
|
@@ -556,7 +557,7 @@ class TestValidator(unittest.TestCase):
|
|
|
556
557
|
# Set attributes for record_cycle
|
|
557
558
|
self.validator.requested_duration = 60
|
|
558
559
|
self.validator.active_gpios = ["GPIO1"]
|
|
559
|
-
self.validator.wakeup_irqs = [5]
|
|
560
|
+
self.validator.wakeup_irqs = ["5"]
|
|
560
561
|
self.validator.kernel_duration = 1.5
|
|
561
562
|
self.validator.hw_sleep_duration = 1.0
|
|
562
563
|
|
|
@@ -579,10 +580,10 @@ class TestValidator(unittest.TestCase):
|
|
|
579
580
|
# Assert record_cycle was called with correct arguments
|
|
580
581
|
mock_record_cycle.assert_called_once_with(
|
|
581
582
|
self.validator.requested_duration,
|
|
582
|
-
self.validator.active_gpios,
|
|
583
|
-
self.validator.wakeup_irqs,
|
|
584
|
-
self.validator.kernel_duration,
|
|
585
|
-
self.validator.hw_sleep_duration,
|
|
583
|
+
",".join(str(gpio) for gpio in self.validator.active_gpios),
|
|
584
|
+
",".join(str(irq) for irq in self.validator.wakeup_irqs),
|
|
585
|
+
int(self.validator.kernel_duration),
|
|
586
|
+
int(self.validator.hw_sleep_duration),
|
|
586
587
|
)
|
|
587
588
|
|
|
588
589
|
def test_program_wakealarm(self):
|
|
@@ -694,7 +695,7 @@ class TestValidator(unittest.TestCase):
|
|
|
694
695
|
# Test case 3: Randomized test
|
|
695
696
|
mock_randint.side_effect = [7, 3] # Random duration and wait
|
|
696
697
|
self.validator.run(duration=10, count=1, wait=5, rand=True, logind=False)
|
|
697
|
-
mock_randint.assert_any_call(
|
|
698
|
+
mock_randint.assert_any_call(4, 10)
|
|
698
699
|
mock_randint.assert_any_call(1, 5)
|
|
699
700
|
mock_run_countdown.assert_any_call("Suspending system", math.ceil(3 / 2))
|
|
700
701
|
mock_run_countdown.assert_any_call("Collecting data", math.ceil(3 / 2))
|
|
@@ -705,19 +706,189 @@ class TestValidator(unittest.TestCase):
|
|
|
705
706
|
mock_report_cycle.assert_called()
|
|
706
707
|
mock_unlock_session.assert_called()
|
|
707
708
|
|
|
708
|
-
# Test case 4:
|
|
709
|
+
# Test case 4: Randomized test, but too short of a duration
|
|
710
|
+
result = self.validator.run(
|
|
711
|
+
duration=4, count=1, wait=5, rand=True, logind=False
|
|
712
|
+
)
|
|
713
|
+
self.assertFalse(result)
|
|
714
|
+
mock_report_cycle.assert_called()
|
|
715
|
+
|
|
716
|
+
# Test case 5: Multiple cycles
|
|
709
717
|
self.validator.run(duration=10, count=2, wait=5, rand=False, logind=False)
|
|
710
718
|
self.assertEqual(mock_prep.call_count, 4) # Includes previous calls
|
|
711
719
|
self.assertEqual(mock_program_wakealarm.call_count, 4)
|
|
712
720
|
self.assertEqual(mock_suspend_system.call_count, 4)
|
|
713
721
|
self.assertEqual(mock_post.call_count, 4)
|
|
714
|
-
self.assertEqual(mock_report_cycle.call_count,
|
|
722
|
+
self.assertEqual(mock_report_cycle.call_count, 5)
|
|
715
723
|
self.assertEqual(mock_unlock_session.call_count, 3)
|
|
716
724
|
|
|
717
|
-
# Test case
|
|
725
|
+
# Test case 6: suspend_system fails
|
|
718
726
|
mock_suspend_system.return_value = False
|
|
719
727
|
result = self.validator.run(
|
|
720
728
|
duration=10, count=1, wait=5, rand=False, logind=False
|
|
721
729
|
)
|
|
722
730
|
self.assertFalse(result)
|
|
723
731
|
mock_report_cycle.assert_called()
|
|
732
|
+
|
|
733
|
+
@patch("os.path.exists")
|
|
734
|
+
@patch("builtins.open", new_callable=mock_open, read_data="3")
|
|
735
|
+
@patch("os.write")
|
|
736
|
+
@patch("os.open")
|
|
737
|
+
@patch("os.close")
|
|
738
|
+
def test_suspend_system_sysfs_success(
|
|
739
|
+
self,
|
|
740
|
+
mock_os_close,
|
|
741
|
+
mock_os_open,
|
|
742
|
+
mock_os_write,
|
|
743
|
+
_mock_open_file,
|
|
744
|
+
mock_path_exists,
|
|
745
|
+
):
|
|
746
|
+
"""Test suspend_system method using sysfs interface with success"""
|
|
747
|
+
# Mock wakeup_count file existence
|
|
748
|
+
mock_path_exists.side_effect = lambda path: "wakeup_count" in path
|
|
749
|
+
|
|
750
|
+
# Mock os.open and os.write
|
|
751
|
+
mock_os_open.return_value = 3
|
|
752
|
+
mock_os_write.return_value = None
|
|
753
|
+
|
|
754
|
+
# Call the method
|
|
755
|
+
result = self.validator.suspend_system()
|
|
756
|
+
|
|
757
|
+
# Assert the method returned True
|
|
758
|
+
self.assertTrue(result)
|
|
759
|
+
|
|
760
|
+
# Assert os.open and os.write were called
|
|
761
|
+
mock_os_open.assert_called_once_with(
|
|
762
|
+
"/sys/power/state", os.O_WRONLY | os.O_SYNC
|
|
763
|
+
)
|
|
764
|
+
mock_os_write.assert_called_once_with(3, b"mem")
|
|
765
|
+
mock_os_close.assert_called_once_with(3)
|
|
766
|
+
|
|
767
|
+
@patch("os.path.exists")
|
|
768
|
+
@patch("builtins.open", new_callable=mock_open, read_data="3")
|
|
769
|
+
@patch("os.write")
|
|
770
|
+
@patch("os.open")
|
|
771
|
+
@patch("os.close")
|
|
772
|
+
def test_suspend_system_sysfs_failure(
|
|
773
|
+
self,
|
|
774
|
+
mock_os_close,
|
|
775
|
+
mock_os_open,
|
|
776
|
+
mock_os_write,
|
|
777
|
+
_mock_open_file,
|
|
778
|
+
mock_path_exists,
|
|
779
|
+
):
|
|
780
|
+
"""Test suspend_system method using sysfs interface with failure"""
|
|
781
|
+
# Mock wakeup_count file existence
|
|
782
|
+
mock_path_exists.side_effect = lambda path: "wakeup_count" in path
|
|
783
|
+
|
|
784
|
+
# Mock os.open to raise OSError
|
|
785
|
+
mock_os_open.return_value = 3
|
|
786
|
+
mock_os_write.side_effect = OSError("Failed to write to state")
|
|
787
|
+
|
|
788
|
+
# Call the method
|
|
789
|
+
result = self.validator.suspend_system()
|
|
790
|
+
|
|
791
|
+
# Assert the method returned False
|
|
792
|
+
self.assertFalse(result)
|
|
793
|
+
|
|
794
|
+
# Assert os.open and os.write were called
|
|
795
|
+
mock_os_open.assert_called_once_with(
|
|
796
|
+
"/sys/power/state", os.O_WRONLY | os.O_SYNC
|
|
797
|
+
)
|
|
798
|
+
mock_os_write.assert_called_once_with(3, b"mem")
|
|
799
|
+
mock_os_close.assert_called_once_with(3)
|
|
800
|
+
|
|
801
|
+
@patch("os.path.exists")
|
|
802
|
+
@patch("builtins.open", new_callable=mock_open)
|
|
803
|
+
@patch("os.write")
|
|
804
|
+
@patch("os.open")
|
|
805
|
+
@patch("os.close")
|
|
806
|
+
def test_suspend_system_sysfs_no_wakeup_count(
|
|
807
|
+
self,
|
|
808
|
+
mock_os_close,
|
|
809
|
+
mock_os_open,
|
|
810
|
+
mock_os_write,
|
|
811
|
+
_mock_open_file,
|
|
812
|
+
mock_path_exists,
|
|
813
|
+
):
|
|
814
|
+
"""Test suspend_system method using sysfs interface with no wakeup_count file"""
|
|
815
|
+
# Mock wakeup_count file does not exist
|
|
816
|
+
mock_path_exists.return_value = False
|
|
817
|
+
|
|
818
|
+
# Mock os.open and os.write
|
|
819
|
+
mock_os_open.return_value = 3
|
|
820
|
+
mock_os_write.return_value = None
|
|
821
|
+
|
|
822
|
+
# Call the method
|
|
823
|
+
result = self.validator.suspend_system()
|
|
824
|
+
|
|
825
|
+
# Assert the method returned True
|
|
826
|
+
self.assertTrue(result)
|
|
827
|
+
|
|
828
|
+
# Assert os.open and os.write were called
|
|
829
|
+
mock_os_open.assert_called_once_with(
|
|
830
|
+
"/sys/power/state", os.O_WRONLY | os.O_SYNC
|
|
831
|
+
)
|
|
832
|
+
mock_os_write.assert_called_once_with(3, b"mem")
|
|
833
|
+
mock_os_close.assert_called_once_with(3)
|
|
834
|
+
|
|
835
|
+
@patch("os.path.exists")
|
|
836
|
+
@patch("os.open")
|
|
837
|
+
@patch("os.write")
|
|
838
|
+
@patch("os.close")
|
|
839
|
+
def test_toggle_nvidia_file_not_exists(
|
|
840
|
+
self, mock_close, mock_write, mock_open, mock_exists
|
|
841
|
+
):
|
|
842
|
+
"""Test toggle_nvidia returns True if NVIDIA suspend file does not exist"""
|
|
843
|
+
mock_exists.return_value = False
|
|
844
|
+
result = self.validator.toggle_nvidia(b"suspend")
|
|
845
|
+
self.assertTrue(result)
|
|
846
|
+
mock_open.assert_not_called()
|
|
847
|
+
mock_write.assert_not_called()
|
|
848
|
+
mock_close.assert_not_called()
|
|
849
|
+
|
|
850
|
+
@patch("os.path.exists")
|
|
851
|
+
@patch("os.open")
|
|
852
|
+
@patch("os.write")
|
|
853
|
+
@patch("os.close")
|
|
854
|
+
def test_toggle_nvidia_success(
|
|
855
|
+
self, mock_close, mock_write, mock_open, mock_exists
|
|
856
|
+
):
|
|
857
|
+
"""Test toggle_nvidia writes value and returns True on success"""
|
|
858
|
+
mock_exists.return_value = True
|
|
859
|
+
mock_open.return_value = 42
|
|
860
|
+
mock_write.return_value = None
|
|
861
|
+
with patch.object(self.validator.db, "record_debug") as mock_record_debug:
|
|
862
|
+
result = self.validator.toggle_nvidia(b"suspend")
|
|
863
|
+
self.assertTrue(result)
|
|
864
|
+
mock_open.assert_called_once_with(
|
|
865
|
+
"/proc/driver/nvidia/suspend", os.O_WRONLY | os.O_SYNC
|
|
866
|
+
)
|
|
867
|
+
mock_write.assert_called_once_with(42, b"suspend")
|
|
868
|
+
mock_close.assert_called_once_with(42)
|
|
869
|
+
mock_record_debug.assert_called_once_with(
|
|
870
|
+
"Wrote b'suspend' to NVIDIA driver"
|
|
871
|
+
)
|
|
872
|
+
|
|
873
|
+
@patch("os.path.exists")
|
|
874
|
+
@patch("os.open")
|
|
875
|
+
@patch("os.write")
|
|
876
|
+
@patch("os.close")
|
|
877
|
+
def test_toggle_nvidia_oserror(
|
|
878
|
+
self, mock_close, mock_write, mock_open, mock_exists
|
|
879
|
+
):
|
|
880
|
+
"""Test toggle_nvidia handles OSError and returns False"""
|
|
881
|
+
mock_exists.return_value = True
|
|
882
|
+
mock_open.return_value = 99
|
|
883
|
+
mock_write.side_effect = OSError("write error")
|
|
884
|
+
with patch.object(
|
|
885
|
+
self.validator.db, "record_cycle_data"
|
|
886
|
+
) as mock_record_cycle_data:
|
|
887
|
+
result = self.validator.toggle_nvidia(b"resume")
|
|
888
|
+
self.assertFalse(result)
|
|
889
|
+
mock_open.assert_called_once_with(
|
|
890
|
+
"/proc/driver/nvidia/suspend", os.O_WRONLY | os.O_SYNC
|
|
891
|
+
)
|
|
892
|
+
mock_write.assert_called_once_with(99, b"resume")
|
|
893
|
+
mock_close.assert_called_once_with(99)
|
|
894
|
+
mock_record_cycle_data.assert_called_once()
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: amd-debug-tools
|
|
3
|
-
Version: 0.2.2
|
|
4
|
-
Summary: debug tools for AMD systems
|
|
5
|
-
Author-email: Mario Limonciello <superm1@kernel.org>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://web.git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git/
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
10
|
-
Requires-Python: >=3.7
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Requires-Dist: pyudev
|
|
14
|
-
Requires-Dist: packaging
|
|
15
|
-
Requires-Dist: pandas
|
|
16
|
-
Requires-Dist: jinja2
|
|
17
|
-
Requires-Dist: tabulate
|
|
18
|
-
Requires-Dist: seaborn
|
|
19
|
-
Requires-Dist: cysystemd
|
|
20
|
-
Requires-Dist: Jinja2
|
|
21
|
-
Requires-Dist: matplotlib
|
|
22
|
-
Requires-Dist: seaborn
|
|
23
|
-
Dynamic: license-file
|
|
24
|
-
|
|
25
|
-
# Helpful tools for debugging AMD Zen systems
|
|
26
|
-
[](https://codecov.io/github/superm1/amd-debug-tools)
|
|
27
|
-
[](https://pypi.org/project/amd-debug-tools/)
|
|
28
|
-
|
|
29
|
-
This repository hosts open tools that are useful for debugging issues on AMD systems.
|
|
30
|
-
|
|
31
|
-
## Installation
|
|
32
|
-
It is suggested to install tools in a virtual environment either using
|
|
33
|
-
`pipx` or `python3 -m venv`.
|
|
34
|
-
|
|
35
|
-
### From PyPI
|
|
36
|
-
`amd-debug-tools` is distributed as a python wheel, which is a
|
|
37
|
-
binary package format for Python. To install from PyPI, run the following
|
|
38
|
-
command:
|
|
39
|
-
|
|
40
|
-
pipx install amd-debug-tools
|
|
41
|
-
|
|
42
|
-
### From source
|
|
43
|
-
To build the package from source, you will need to the `python3-build`
|
|
44
|
-
package natively installed by your distribution package manager. Then you
|
|
45
|
-
can generate and install a wheel by running the following commands:
|
|
46
|
-
|
|
47
|
-
python3 -m build
|
|
48
|
-
pipx install dist/amd-debug-tools-*.whl
|
|
49
|
-
|
|
50
|
-
### Ensuring path
|
|
51
|
-
If you have not used a `pipx` environment before, you may need to run the following command
|
|
52
|
-
to set up the environment:
|
|
53
|
-
|
|
54
|
-
pipx ensurepath
|
|
55
|
-
|
|
56
|
-
This will add the `pipx` environment to your path.
|
|
57
|
-
|
|
58
|
-
### Running in tree
|
|
59
|
-
If you want to run the tools in tree, you need to make sure that distro dependencies
|
|
60
|
-
that would normally install into a venv are installed. This can be done by running:
|
|
61
|
-
|
|
62
|
-
./install_deps.py
|
|
63
|
-
|
|
64
|
-
After dependencies are installed, you can run the tools by running:
|
|
65
|
-
|
|
66
|
-
./amd_s2idle.py
|
|
67
|
-
./amd_bios.py
|
|
68
|
-
./amd_pstate.py
|
|
69
|
-
|
|
70
|
-
## amd-s2idle
|
|
71
|
-
`amd-s2idle` is a tool used for analyzing the entry and exit of the s2idle
|
|
72
|
-
state of a Linux system.
|
|
73
|
-
|
|
74
|
-
It is intended to use with Linux kernel 6.1 or later and works by hooking
|
|
75
|
-
into dynamic debugging messages and events that are generated by the kernel.
|
|
76
|
-
|
|
77
|
-
For analysis of power consumption issues it can be hooked into `systemd` to
|
|
78
|
-
run a command to capture data right before and after the system enters and
|
|
79
|
-
exits the s2idle state.
|
|
80
|
-
|
|
81
|
-
4 high level commands are supported.
|
|
82
|
-
|
|
83
|
-
### `amd-s2idle install`
|
|
84
|
-
This will install the systemd hook so that data will be captured before and
|
|
85
|
-
after the system enters and exits the s2idle state.
|
|
86
|
-
|
|
87
|
-
This will also install a bash completion script that can be used for other
|
|
88
|
-
commands.
|
|
89
|
-
|
|
90
|
-
**NOTE:** This command is only supported when run from a venv.
|
|
91
|
-
|
|
92
|
-
### `amd-s2idle uninstall`
|
|
93
|
-
This will uninstall the systemd hook and remove the bash completion script.
|
|
94
|
-
|
|
95
|
-
**NOTE:** This command is only supported when run from a venv.
|
|
96
|
-
|
|
97
|
-
### `amd-s2idle test`
|
|
98
|
-
This will run a suspend cycle with a timer based wakeup and capture relevant
|
|
99
|
-
data into a database and produce a report. This can also be used to run multiple cycles.
|
|
100
|
-
|
|
101
|
-
The following optional arguments are supported for this command:
|
|
102
|
-
|
|
103
|
-
--count COUNT Number of cycles to run
|
|
104
|
-
--duration DURATION Duration of the cycle in seconds
|
|
105
|
-
--wait WAIT Time to wait before starting the cycle in seconds
|
|
106
|
-
--format FORMAT Format of the report to produce (html, txt or md)
|
|
107
|
-
--report-file File to write the report to
|
|
108
|
-
--force Run a test cycle even if the system fails to pass prerequisite checks
|
|
109
|
-
--random Run sleep cycles for random durations and waits, using the --duration and --wait arguments as an upper bound
|
|
110
|
-
--logind Use logind to suspend the system
|
|
111
|
-
--tool-debug Enable debug logging
|
|
112
|
-
--bios-debug Enable BIOS debug logging instead of notify logging
|
|
113
|
-
|
|
114
|
-
If the tool is launched with an environment that can call `xdg-open`, the report
|
|
115
|
-
will be opened in a browser.
|
|
116
|
-
|
|
117
|
-
### `amd-s2idle report`
|
|
118
|
-
This will produce a report from the data captured by the `test` command
|
|
119
|
-
and/or from the systemd hook. The report will default to 60 days of data.
|
|
120
|
-
|
|
121
|
-
The following optional arguments are supported for this command:
|
|
122
|
-
|
|
123
|
-
--since SINCE Date to start the report from
|
|
124
|
-
--until UNTIL Date to end the report at
|
|
125
|
-
--format FORMAT Format of the report to produce (html, txt or md)
|
|
126
|
-
--report-file File to write the report to
|
|
127
|
-
--tool-debug Enable tool debug logging
|
|
128
|
-
--report-debug
|
|
129
|
-
--no-report-debug
|
|
130
|
-
Include debug messages in report (WARNING: can significantly increase report size)
|
|
131
|
-
If the tool is launched with an environment that can call `xdg-open`, the report
|
|
132
|
-
will be opened in a browser.
|
|
133
|
-
|
|
134
|
-
### `amd-s2idle version`
|
|
135
|
-
This will print the version of the tool and exit.
|
|
136
|
-
|
|
137
|
-
### Debug output
|
|
138
|
-
All commands support the `--tool-debug` argument which will enable extra debug output. This is often needed for debugging issues with a particular cycle.
|
|
139
|
-
|
|
140
|
-
**NOTE:** enabling debug output significantly increases the size of the report.
|
|
141
|
-
It's suggested that you use `--since` and `--until` to focus on the cycles that you are interested in.
|
|
142
|
-
|
|
143
|
-
## amd-bios
|
|
144
|
-
`amd-bios` is a a tool that can be used to enable or disable BIOS AML debug logging
|
|
145
|
-
-and to parse a kernel log that contains BIOS logs.
|
|
146
|
-
|
|
147
|
-
### `amd-bios trace`
|
|
148
|
-
Modify BIOS AML trace debug logging.
|
|
149
|
-
|
|
150
|
-
One of the following arguments must be set for this command:
|
|
151
|
-
|
|
152
|
-
--enable Enable BIOS AML tracing
|
|
153
|
-
--disable Disable BIOS AML tracing
|
|
154
|
-
|
|
155
|
-
The following optional arguments are supported for this command:
|
|
156
|
-
|
|
157
|
-
--tool-debug Enable tool debug logging
|
|
158
|
-
|
|
159
|
-
### `amd-bios parse`
|
|
160
|
-
Parses a kernel log that contains BIOS AML debug logging and produces a report.
|
|
161
|
-
|
|
162
|
-
The following optional arguments are supported for this command:
|
|
163
|
-
|
|
164
|
-
--input INPUT Optional input file to parse
|
|
165
|
-
--tool-debug Enable tool debug logging
|
|
166
|
-
|
|
167
|
-
### `amd-bios version`
|
|
168
|
-
This will print the version of the tool and exit.
|
|
169
|
-
|
|
170
|
-
## amd-pstate
|
|
171
|
-
`amd-pstate` is a tool used for identification of issues with amd-pstate.
|
|
172
|
-
It will capture some state from the system as well as from the machine specific registers that
|
|
173
|
-
amd-pstate uses.
|
|
174
|
-
|
|
175
|
-
## Compatibility scripts
|
|
176
|
-
|
|
177
|
-
Compatibility scripts are provided for the previous names the tools went by:
|
|
178
|
-
`amd_s2idle.py`, `amd_bios.py` and `amd_pstate.py`.
|
|
179
|
-
These allow cloning the repository and running the scripts without installing
|
|
180
|
-
the package.
|
|
181
|
-
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
launcher.py,sha256=_Gs0W8tUB2wkTy5Nz4qEzG0VqQcnO7xuIQj0GwV_KbY,968
|
|
2
|
-
test_acpi.py,sha256=wtS43Rz95h7YEEJBeFa6Mswaeo4syBZrw4hY8i0YbJY,3117
|
|
3
|
-
test_batteries.py,sha256=nN5pfP5El7Whypq3HHEpW8bufdf5EWSTVGbayfNQYP4,3360
|
|
4
|
-
test_bios.py,sha256=GBAXE_rXd2G-JE0XJ8AvYcF9Me6LTyQQQ8h0Ib3cpxQ,8981
|
|
5
|
-
test_common.py,sha256=fb16Oilh5ga6VgF-UgBj6azoYzZnPrS7KpECQ3nCwlg,16335
|
|
6
|
-
test_database.py,sha256=q5ZjI5u20f7ki6iCY5o1iPi0YOvPz1_W0LTDraU8mN4,10040
|
|
7
|
-
test_display.py,sha256=hHggv-zBthF1BlwWWSjzAm7BBw1DWcElwil5xAuz87g,5822
|
|
8
|
-
test_failures.py,sha256=H1UxXeVjhJs9-j9yas4vwAha676GX1Es7Kz8RN2B590,6845
|
|
9
|
-
test_installer.py,sha256=oDMCvaKqqAWjTggltacnasQ-s1gyUvXPDcNrCUGnux4,10216
|
|
10
|
-
test_kernel.py,sha256=RW-eLbae02Bhwfu1cegqA1pTj6AS5IqD5lLe-6T0Rjo,7871
|
|
11
|
-
test_launcher.py,sha256=govYHL0Cpj9d5msteV5SfR7Covft31rJuzRkDeytHcY,1461
|
|
12
|
-
test_prerequisites.py,sha256=4Ltxx7vGU91b9MX1AtdPLS8iyWJBCNuEKCuO0nnEb_g,83381
|
|
13
|
-
test_pstate.py,sha256=a9oAJ9-LANX32XNQhplz6Y75VNYc__QqoSBKIrwvANg,6058
|
|
14
|
-
test_s2idle.py,sha256=-S3yymjprf3_LIgaPGWgzN9FmnyQG55dNc4xqWAF8Z8,32344
|
|
15
|
-
test_sleep_report.py,sha256=R3cUPPT9r9q4q93xk6NFvi4ySgT5laqidk2SASuTWIo,5878
|
|
16
|
-
test_validator.py,sha256=NeiX8kT5DiHiiB5lRSJkjIpV32UzaIrW5ljKLmFtBMk,30490
|
|
17
|
-
test_wake.py,sha256=6zi5GVFHQKU1sTWw3O5-aGriB9uu5713QLn4l2wjhpM,7152
|
|
18
|
-
amd_debug/__init__.py,sha256=aOtpIEKGLUStrh0e4qgilHW7HgF4Od-r9pOoZ87NwAM,1105
|
|
19
|
-
amd_debug/acpi.py,sha256=fkD3Sov8cRT5ryPlakRlT7Z9jiCLT9x_MPWxt3xU_tc,3161
|
|
20
|
-
amd_debug/battery.py,sha256=WN-6ys9PHCZIwg7PdwyBOa62GjBp8WKG0v1YZt5_W5s,3122
|
|
21
|
-
amd_debug/bios.py,sha256=wmPKDsTZeQqsHjWpv-YHdgRNlCtFdzHQ6jJf0H3hjN8,3971
|
|
22
|
-
amd_debug/common.py,sha256=H9tIRlRFOMwe0d3f2-vXQeK2rJl5Z1WJzkpQM9ivpOc,10347
|
|
23
|
-
amd_debug/database.py,sha256=GkRg3cmaNceyQ2_hy0MBAlMbnTDPHo2co2o4ObWpnQg,10621
|
|
24
|
-
amd_debug/display.py,sha256=5L9x9tI_UoulHpIvuxuVASRtdXta7UCW_JjTb5StEB0,953
|
|
25
|
-
amd_debug/failures.py,sha256=Otv3YDu7Je4ljSifVmvjObGoOY4OvLIY20pw-v4Dqkw,22911
|
|
26
|
-
amd_debug/installer.py,sha256=r6r_nVWv8qYdrqAvnAzQhRiS5unBDOkXsqUfHvFK8uM,14249
|
|
27
|
-
amd_debug/kernel.py,sha256=xzAy-sDY5-sd4jxyU7EaBokS7YsvEjoWRuexaTJNRBc,11851
|
|
28
|
-
amd_debug/prerequisites.py,sha256=bKJA9ztyapB8rxrNEgc-hxazw5Uh-sP5X0S7zplGA0c,50413
|
|
29
|
-
amd_debug/pstate.py,sha256=akGdJkIxBp0bx3AeGv6ictNxwv8m0j9vQ2IZB0Jx3dM,9518
|
|
30
|
-
amd_debug/s2idle-hook,sha256=LLiaqPtGd0qetu9n6EYxKHZaIdHpVQDONdOuSc0pfFg,1695
|
|
31
|
-
amd_debug/s2idle.py,sha256=lzxLYZBcQllyqEMZfxYEUvQO3ArgVzwL5FHymzvZvSs,13281
|
|
32
|
-
amd_debug/sleep_report.py,sha256=zgwcmSk7S8GAmPtPZJGP29Mr5bcWUBxwNL8HBubKs6Q,15516
|
|
33
|
-
amd_debug/validator.py,sha256=fgG3D0k6DS9ArgzK1SuPUds1FNGoKf2asPUwWoyCsXE,33205
|
|
34
|
-
amd_debug/wake.py,sha256=xT8WrFrN6voCmXWo5dsn4mQ7iR2QJxHrrYBd3EREG-Q,3936
|
|
35
|
-
amd_debug/bash/amd-s2idle,sha256=g_cle1ElCJpwE4wcLezL6y-BdasDKTnNMhrtzKLE9ks,1142
|
|
36
|
-
amd_debug/templates/html,sha256=tnpqHDZF5FfhC6YNRUfOG6Vn9ZtISFr10kEXSB476Mw,14518
|
|
37
|
-
amd_debug/templates/md,sha256=r8X2aehnH2gzj0WHYTZ5K9wAqC5y39i_3nkDORSC0uM,787
|
|
38
|
-
amd_debug/templates/stdout,sha256=hyoOJ96K2dJfnWRWhyCuariLKbEHXvs9mstV_g5aMdI,469
|
|
39
|
-
amd_debug/templates/txt,sha256=nNdsvbPFOhGdL7VA-_4k5aN3nB-6ouGQt6AsWst7T3w,649
|
|
40
|
-
amd_debug_tools-0.2.2.dist-info/licenses/LICENSE,sha256=RBlZI6r3MRGzymI2VDX2iW__D2APDbMhu_Xg5t6BWeo,1066
|
|
41
|
-
amd_debug_tools-0.2.2.dist-info/METADATA,sha256=oZ5H5dL216bbAqtOF8VmvtqkqctPIf5iPibPCjjc1tQ,6877
|
|
42
|
-
amd_debug_tools-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
43
|
-
amd_debug_tools-0.2.2.dist-info/entry_points.txt,sha256=HC11T2up0pPfroAn6Pg5M2jOZXhkWIipToJ1YPTKqu8,116
|
|
44
|
-
amd_debug_tools-0.2.2.dist-info/top_level.txt,sha256=XYjxExbUTEtiIlag_5iQvZSVOC1EIxhKM4NLklReQ0k,234
|
|
45
|
-
amd_debug_tools-0.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|