This is a simple indicator used to report nvidia runtime power status. This is designed to help laptops, which are configured with nvidia-prime+runtime power management, easily view the power status of the nvidia GPU.
This extension should display a nvidia icon on the top pannel, for active, for suspend.
git clone https://github.com/Alkaid-Benetnash/nvidia-pm-indicator nvidia-pm-indicator@alkaid
Then gnome-extensions enable nvidia-pm-indicator@alkaid
.
PS: In addition, you may need to alt+F2 r
to restart the gnome-shell to make things work.
Periodically (30s) read /sys/bus/pci/devices/0000:00:01.0/power/runtime_status
.
Parse power/runtime_active_time
and power/runtime_suspend_time
to display active/suspend time in the dropdown menu of the indicator.