# Plasma Optimus
A fork from [Prime Render Switch and Status](https://store.kde.org/p/1425330/) for [optimus-manager](https://github.com/Askannz/optimus-manager)

This is a simple widget for KDE Plasma 6 to display the active Nvidia GPU mode, switch between GPU modes using prime-select, and view processes running on the GPU.

#### Prerequisites
- prime-select (nvidia-prime)
- python3
- python3-pyqt6

#### Usage/Install

```bash
On an Ubuntu system:
sudo apt install plasma-optimus
```
Widget will be automatically added to Plasma notification area on next login.

#### Changelog
- 26.04.4 — Fix GPU detection under Wayland (glxinfo reports wrong GPU via XWayland); use nvidia-smi/sysfs instead
  - Fix system tray popup not opening on click
- 26.04.3 — Fix fullRepresentation to use PlasmaExtras.Representation for popup menu
- 26.04.2 — Fix metadata.json for system tray integration
- 26.04.1 — Consolidate plasma-prime-select into switch.py with token-based security; remove obsolete scripts
- 26.04.0 — Ported to KDE Plasma 6 / Qt 6
  - Replaced `metadata.desktop` with `metadata.json`
  - Updated QML imports for Plasma 6 (`PlasmoidItem`, `Kirigami`, `plasma5support`)
  - Replaced kdialog/zenity with native PyQt6 dialogs
- 22.04.2 — Reboots instead of logout due to changes in the Nvidia driver
- 22.04.0
  - Sets false variables for modes not in use
  - Power-saving changes
    - Only sniffs the gpu in use upon load
    - `prime-select query` now runs only once every 10 seconds
- 21.10.0 — Initial Release

#### Author
###### Erich Eickmeyer
[LinkedIn](https://www.linkedin.com/in/erich-eickmeyer-a8954623/)

#### Original Author
###### Rui Guilherme
[GitHub](https://github.com/RuiGuilherme/)
<br />
[Linkedin](https://www.linkedin.com/in/rui-guilherme/)

#### Contributing
Contributions, issues and feature requests are welcome!
