GithubHelp home page GithubHelp logo

andr3slelouch / optimus-manager-indicator Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 4.0 100 KB

Intel/Hybrid/NVIDIA GPU Switch and show GPU status

License: GNU General Public License v3.0

JavaScript 100.00%
gnome-shell-extension indicator nvidia-prime nvidia-smi optimus-manager

optimus-manager-indicator's People

Contributors

andr3slelouch avatar nono031 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

optimus-manager-indicator's Issues

[Feature Request] Implementation for Ubuntu Based distros

Hi @ViBE-HU, I have opened an issue to talk about ubuntu implementation here.

The first question is how do you use prime-select in ubuntu? Just type "sudo prime-select nvidia" and you're done? or do you need to log out / login to see the changes? Because I can implement at least the logout which looks more like the behavior that optimus-manager has in arch linux.

Extension Prompt Stuck

The tray icon pops up that it needs to restart, but clicking yes does not close the prompt nor does it restart the x server.
System Info:

OS: Manjaro 21.0.2 Ornara
Kernel: x86_64 Linux 5.10.30-1-MANJARO
Uptime: 16m
Packages: 1231
Shell: zsh 5.8
Resolution: 1920x1080
DE: GNOME 3.38.5
WM: Mutter
WM Theme: Matcha-dark-sea
GTK Theme: Matcha-sea [GTK2/3]
Icon Theme: Papirus-Dark-Maia
Font: Noto Sans 11
Disk: 38G / 946G (5%)
CPU: Intel Core i7-9750H @ 12x 4.5GHz [49.0°C]
GPU: GeForce GTX 1650
RAM: 1799MiB / 15637MiB

Installing this extension doubles top bar height

Hello, I have an issue with the height.
When I install the extension the top bar almost doubles its height, pushing UI elements further down and getting in the way of normal windows UI.
Also, the icon is always 3 dots
Thanks

Without extension:
Captura de pantalla de 2020-04-20 08-13-40

With extension:
Captura de pantalla de 2020-04-20 08-06-34

[Feature request][Probably redundant] Add hybrid mode

I love that you took the time to develop an alternative to the now defunct Argos-based optimus-manager extension. Would you consider adding the hybrid mode in the list ? I was responsible for adding it in the previous Argos-based extension, I could probably take some time to look into integrating it in your extension.

Thank you in advance

[Feature request] Display the actually active card's icon

On Windows Optimus systems has an additional indicator icon which tells you if the nVidia card is actually the main card and an application is actually using it. It's a bit unnecessary but it would be good on Linux if the indicator icon could show the exact active card's icon. I'm using hybrid mode and it's always shows just the nVidia and never Intel sadly while it's absolutely clear that Intel is the primary card.

optimus-manager intel mode name

Extension is using this command get current mode:

optimus-manager --print-mode | grep 'Current GPU mode' | awk '{print $5}'

And _setMenuMode expects either 'inter', 'nvidia' or 'hybrid'.
optimus-manager returns integrated instead of intel for me and because of this error message You're not using GDM-PRIME keeps popping up on every start.

Change distro identification procedure

Hi!
Thanks for this simple and yet effective extension.
I'm using Manjaro and while extension works, its settings are not available.
Apparently, because of the internal error.
In code I see that you determine distro by parsing /etc/issue.net. And this file doesn't exist in Manjaro.

Perhaps it would make a bit more sense to use /etc/os-release for this purpose.

Could do something like this:

awk -F= '$1=="ID" { print $2 ;}' /etc/os-release

Option to set extension position in the panel.

I've modified the extension.js file to move the extension to the left of the pannel.
It would be nice if this option would be available in the extension menu but for now I thought I'd share what I've changed to accomplish so.
This way it might be easier to add the feature too

/**
 * This function is called by GNOME Shell to enable the extension.
 */
function enable() {
  optimusManagerIndicator = new OptimusManagerIndicator();
  //Main.panel.addToStatusArea(
  Main.panel._addToPanelBox(
   "optimus-manager-indicator",
   optimusManagerIndicator,
   2,
   Main.panel._leftBox
   );
}

This is what I currently have between lines 399 and 411
optimusManagerIndicator, 2, sets the position / priority of the extension in the area and Main.panel._leftBox sets the area itself to left.

Does not work on Gnome 42.rc

changed metadata.json to account for gnome 42. Enabling extension gives error Object 0x267c175268e0 is not a subclass of GObject_Object, it's a Object

extension seems not detecting the correct mode on session startup

Hi, I'm using your extension for a couple of days on gnome 40.0, Manjaro 21.1.3 Pahvo, kernel 5.13.15. working with Intel UHD Graphics and NVIDIA GeForce RTX 2060.
Every time I log in or reset the shell, I receive a notification telling me I'm not using the GDM-PRIME despite the fact that I do have that installed with optimus-manager correctly configured. everything else is working properly and no other errors have occurred so far. investigating the codes below I found out that it seems the switch(mode) part is not working correctly.
as another reason for this claim, all options in the menu are shown, that I know they shouldn't according to the code...
my default mode is integrated by the way

Main.notifyError(_("You're not using GDM-PRIME"));

thank you

Main Loop is not defined

Detected issue in new commit 572a4d5:

Extension [email protected]: ReferenceError: Mainloop is not defined

Stack trace:
_setTempMode@file:///home/andres/.local/share/gnome-shell/extensions/[email protected]/extension.js:549:21
_setMode@file:///home/andres/.local/share/gnome-shell/extensions/[email protected]/extension.js:377:18
_init@file:///home/andres/.local/share/gnome-shell/extensions/[email protected]/extension.js:369:18
ButtonBox@resource:///org/gnome/shell/ui/panelMenu.js:12:1
PanelMenuButton@resource:///org/gnome/shell/ui/panelMenu.js:97:4
OptimusManagerIndicator@file:///home/andres/.local/share/gnome-shell/extensions/[email protected]/extension.js:181:5
enable@file:///home/andres/.local/share/gnome-shell/extensions/[email protected]/extension.js:158:40
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:266:38
async*_onEnabledExtensionsChanged@resource:///org/gnome/shell/ui/extensionSystem.js:626:24
async*_onUserExtensionsEnabledChanged@resource:///org/gnome/shell/ui/extensionSystem.js:605:20
_loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:737:18
@resource:///org/gnome/shell/ui/init.js:21:20

Preference don't work

Manjaro Linux 21.0.1, Gnome 40

When I try to open settings I see error screen:

Something's gone wrong

We're very sorry, but there's been a problem: the settings for extension can't be displayed...

And nothing more.
I wasn't able to find anything in logs.

Preferences Issue

SyntaxError: import declarations may only appear at top level of a module @ resource:///org/gnome/Shell/Extensions/js/misc/extensionUtils.js:4:0

Stack trace:
@file:///home/andres/.local/share/gnome-shell/extensions/[email protected]/prefs.js:3:24
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.