From 6732713db7fba25b92e7d4bf2187dd40b333fed9 Mon Sep 17 00:00:00 2001 From: Nicolas Viéville Date: Mar 26 2020 14:20:46 +0000 Subject: Updated to last upstream commits Translate to Turkish language Add patch to fix typo nvidia-settings in gpu_usage.sh - RHBZ#1794158 Add patch to improve fetching values for NVidia GPU usage --- diff --git a/.gitignore b/.gitignore index d2630f2..cd50346 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /gnome-shell-extension-system-monitor-applet-38.tar.gz /gnome-shell-extension-system-monitor-applet-38-fc83a73.tar.gz /gnome-shell-extension-system-monitor-applet-38-f00e248.tar.gz +/gnome-shell-extension-system-monitor-applet-38-cd2704c.tar.gz diff --git a/gnome-shell-extension-system-monitor-applet-001_fix_typo_nvidia-settings.patch b/gnome-shell-extension-system-monitor-applet-001_fix_typo_nvidia-settings.patch new file mode 100644 index 0000000..a1492dc --- /dev/null +++ b/gnome-shell-extension-system-monitor-applet-001_fix_typo_nvidia-settings.patch @@ -0,0 +1,26 @@ +From d65da90e802a1027df46a26f8ac4704181a7013c Mon Sep 17 00:00:00 2001 +From: Nicolas Viéville +Date: Mon, 4 Nov 2019 13:36:30 +0100 +Subject: [PATCH] Fix typo nvidia-settings in gpu_usage.sh + +Signed-off-by: Nicolas Viéville +--- + system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh b/system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh +index ca63f8b..76ab326 100755 +--- a/system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh ++++ b/system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh +@@ -31,7 +31,7 @@ checkcommand() + if checkcommand nvidia-smi; then + nvidia-smi -i -1 -q -d MEMORY | grep -A4 -i gpu | egrep -i "used|total" | awk '{print $3}' + # This line will print the GPU usage in %. +- sed -e 's#.*=\(\)#\1#;s'/.$//'' <<< $(nvidia-set//tings -q all | grep -i GPUUtilization | grep graphics | awk '{print $4}') ++ sed -e 's#.*=\(\)#\1#;s'/.$//'' <<< $(nvidia-settings -q all | grep -i GPUUtilization | grep graphics | awk '{print $4}') + elif checkcommand glxinfo; then + TOTALVRAM="`glxinfo | grep -A2 -i GL_NVX_gpu_memory_info | egrep -i "dedicated" | cut -f2- -d ':' | gawk '{print $1}'`" + AVAILVRAM="`glxinfo | grep -A4 -i GL_NVX_gpu_memory_info | egrep -i "available dedicated" | cut -f2- -d ':' | gawk '{print $1}'`" +-- +2.25.1 + diff --git a/gnome-shell-extension-system-monitor-applet-002_Improve_fetching_values_for_NVidia_GPU_usage.patch b/gnome-shell-extension-system-monitor-applet-002_Improve_fetching_values_for_NVidia_GPU_usage.patch new file mode 100644 index 0000000..ea1dedd --- /dev/null +++ b/gnome-shell-extension-system-monitor-applet-002_Improve_fetching_values_for_NVidia_GPU_usage.patch @@ -0,0 +1,28 @@ +From 580a91b6e15520fef4421ed4000c74098eaa1429 Mon Sep 17 00:00:00 2001 +From: Nicolas Viéville +Date: Wed, 25 Mar 2020 15:55:47 +0100 +Subject: [PATCH] Improve fetching values for NVidia GPU usage. + +Signed-off-by: Nicolas Viéville +--- + system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh b/system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh +index 76ab326..56a5c89 100755 +--- a/system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh ++++ b/system-monitor@paradoxxx.zero.gmail.com/gpu_usage.sh +@@ -29,9 +29,7 @@ checkcommand() + # This will print three lines. The first one is the the total vRAM available, + # the second one is the used vRAM and the third on is the GPU usage in %. + if checkcommand nvidia-smi; then +- nvidia-smi -i -1 -q -d MEMORY | grep -A4 -i gpu | egrep -i "used|total" | awk '{print $3}' +- # This line will print the GPU usage in %. +- sed -e 's#.*=\(\)#\1#;s'/.$//'' <<< $(nvidia-settings -q all | grep -i GPUUtilization | grep graphics | awk '{print $4}') ++ nvidia-smi -i 0 --query-gpu=memory.total,memory.used,utilization.gpu --format=csv,noheader,nounits | sed 's%, %\n%g' + elif checkcommand glxinfo; then + TOTALVRAM="`glxinfo | grep -A2 -i GL_NVX_gpu_memory_info | egrep -i "dedicated" | cut -f2- -d ':' | gawk '{print $1}'`" + AVAILVRAM="`glxinfo | grep -A4 -i GL_NVX_gpu_memory_info | egrep -i "available dedicated" | cut -f2- -d ':' | gawk '{print $1}'`" +-- +2.25.1 + diff --git a/gnome-shell-extension-system-monitor-applet.spec b/gnome-shell-extension-system-monitor-applet.spec index aa1d3d1..d353c3c 100644 --- a/gnome-shell-extension-system-monitor-applet.spec +++ b/gnome-shell-extension-system-monitor-applet.spec @@ -8,21 +8,23 @@ %if 0%{?git_post_release_enabled} # Git commit is needed for post-release version. - %global gitcommit f00e2487b918248df0c55495b4fd37a365fe7352 + %global gitcommit cd2704c219da5f36e4f93fc3a06260d9ae68bad3 %global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7}) - %global gitsnapinfo .20191019git%{gitshortcommit} + %global gitsnapinfo .20200325git%{gitshortcommit} %endif Name: gnome-shell-extension-system-monitor-applet Epoch: 1 Version: 38 -Release: 5%{?gitsnapinfo}%{?dist} +Release: 6%{?gitsnapinfo}%{?dist} Summary: A Gnome shell system monitor extension # The entire source code is GPLv3+ except convenience.js, which is BSD License: GPLv3+ and BSD URL: https://extensions.gnome.org/extension/120/system-monitor/ Source0: %{giturl}/archive/%{?gitcommit}%{!?gitcommit:v%{version}}/%{name}-%{version}%{?gitshortcommit:-%{gitshortcommit}}.tar.gz +Patch0: gnome-shell-extension-system-monitor-applet-001_fix_typo_nvidia-settings.patch +Patch1: gnome-shell-extension-system-monitor-applet-002_Improve_fetching_values_for_NVidia_GPU_usage.patch BuildArch: noarch @@ -88,6 +90,12 @@ fi %changelog +* Wed Mar 25 2020 Nicolas Viéville - 1:38-6.20200325gitcd2704c +- Updated to last upstream commits +- Translate to Turkish language +- Add patch to fix typo nvidia-settings in gpu_usage.sh - RHBZ#1794158 +- Add patch to improve fetching values for NVidia GPU usage + * Tue Jan 28 2020 Fedora Release Engineering - 1:38-5.20191019gitf00e248 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index def1a47..27a155a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-shell-extension-system-monitor-applet-38-f00e248.tar.gz) = 7cfdb04066659e1f3c9e777adb0fbf39e0b0aa5c83b582df4fc3c0b15df2afd775a11dbac29d2e8b3295088aba15facfc38c93b59900c54d66837c765b8632e4 +SHA512 (gnome-shell-extension-system-monitor-applet-38-cd2704c.tar.gz) = a02b6614ce9480f482a9f4f987a2f0da0e37085828f95f4ac4d55dd8b988632cc99d4748f1dc79acdbef8a5bd1bfea6fe7144454e16b52db90c65862904ad76e