andr3slelouch / optimus-manager-indicator Goto Github PK
View Code? Open in Web Editor NEWIntel/Hybrid/NVIDIA GPU Switch and show GPU status
License: GNU General Public License v3.0
Intel/Hybrid/NVIDIA GPU Switch and show GPU status
License: GNU General Public License v3.0
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.
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
In Arch Linux you can update the Nvidia drivers and no rebooting the system so it is better for the extension to detect this situation
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
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.
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.
As the title says, it doesn't switch when I push either button. I've got an Alienware M15 R5 Ryzen Edition with an RTX 3070. My distro is the latest stable GNOME edition of Manjaro.
Please add gnome 40 support to this extension.
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
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.
The extensions needs to prepare for using translations, so it needs to be prepared for it
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
Hello everyone I need you for testing, before posting the new version to the Gnome Extensions Store I don't want to post it with errors like the last time...
Please install https://github.com/andr3slelouch/Optimus-Manager-Indicator/releases/tag/v2b and tell me if you find some errors or issue.
@coltonhughes @sanyer @ViBE-HU @rodolpheh
I thank you in advance.
please add support for gnome 41.
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
Optimus-Manager-Indicator/extension.js
Line 485 in 9c8c9a9
thank you
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
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.
Trying to get information to determinate if the gpu is being used i get a way to determinate gpu and memory usage so I will:
When i go to the Gnome extension on gnome 40 it shows as incomparable.
Add preferences option for select where the indicator will show
I know this is a very straight forward stuff but it would be nice. Are there any chances?
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.