Hello community, here is the log from the commit of package suse-prime for openSUSE:Factory checked in at 2019-01-10 15:23:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/suse-prime (Old) and /work/SRC/openSUSE:Factory/.suse-prime.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "suse-prime" Thu Jan 10 15:23:30 2019 rev:2 rq:664115 version:0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/suse-prime/suse-prime.changes 2018-11-13 18:26:49.377154291 +0100 +++ /work/SRC/openSUSE:Factory/.suse-prime.new.28833/suse-prime.changes 2019-01-10 15:23:30.674319895 +0100 @@ -1,0 +2,14 @@ +Wed Jan 9 15:20:02 UTC 2019 - sndir...@suse.com + +- U_Fixed-syntax-error-and-handled-not-yet-existing-conf.patch + * Fixed syntax error and handled not yet existing configurations + +------------------------------------------------------------------- +Wed Jan 9 14:41:24 UTC 2019 - sndir...@suse.com + +- U_adding-query-switch.patch + * adding "query" switch (boo#1121246) + * removing line from xorg-nvidia.conf, which is not needed + anymore and prevents use of external displays + +------------------------------------------------------------------- New: ---- U_Fixed-syntax-error-and-handled-not-yet-existing-conf.patch U_adding-query-switch.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suse-prime.spec ++++++ --- /var/tmp/diff_new_pack.2HVGRD/_old 2019-01-10 15:23:31.502319039 +0100 +++ /var/tmp/diff_new_pack.2HVGRD/_new 2019-01-10 15:23:31.502319039 +0100 @@ -1,7 +1,7 @@ # # spec file for package suse-prime # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,10 +20,12 @@ Version: 0.2 Release: 0 Summary: GPU (nvidia/intel) selection for NVIDIA optimus laptops -Group: System/X11/Utilities License: SUSE-Public-Domain +Group: System/X11/Utilities Url: https://github.com/michalsrb/SUSEPrime Source0: https://github.com/michalsrb/SUSEPrime/archive/%{version}.tar.gz#/SUSEPrime-%{version}.tar.gz +Patch0: U_adding-query-switch.patch +Patch1: U_Fixed-syntax-error-and-handled-not-yet-existing-conf.patch Recommends: nvidia_driver Supplements: modalias(nvidia_driver:pci:v00008086d*sv*sd*bc03sc*i*) Conflicts: suse-prime-alt @@ -36,6 +38,8 @@ %prep %setup -n SUSEPrime-%{version} +%patch0 -p1 +%patch1 -p1 %build : @@ -44,6 +48,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/prime install -m 0644 xorg-intel.conf %{buildroot}%{_sysconfdir}/prime/ install -m 0644 xorg-nvidia.conf %{buildroot}%{_sysconfdir}/prime/ +echo "undefined" > %{buildroot}%{_sysconfdir}/prime/current_type install -D -m 0755 prime-select.sh %{buildroot}%{_sbindir}/prime-select %files @@ -52,6 +57,7 @@ %{_sysconfdir}/prime %config %{_sysconfdir}/prime/xorg-intel.conf %config %{_sysconfdir}/prime/xorg-nvidia.conf +%config(noreplace) %{_sysconfdir}/prime/current_type %{_sbindir}/prime-select %changelog ++++++ U_Fixed-syntax-error-and-handled-not-yet-existing-conf.patch ++++++ >From dc294b55184b4591e0b20e70d17d5ab6595a68d8 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch <sndir...@suse.de> Date: Wed, 9 Jan 2019 16:12:32 +0100 Subject: [PATCH] Fixed syntax error and handled not yet existing configurations --- prime-select.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/prime-select.sh b/prime-select.sh index fe74b3c..de51c2b 100755 --- a/prime-select.sh +++ b/prime-select.sh @@ -51,7 +51,14 @@ case $type in echo "intel" > /etc/prime/current_type ;; query) - echo "Currently running: " && cat /etc/prime/current_type + if [ -f /etc/prime/current_type ]; then + echo -n "Currently running: " + cat /etc/prime/current_type + else + echo -n "Not configured yet! " + echo "Please use \"prime-select nvidia|intel\" for configuration." + fi + ;; *) echo "Usage: prime-select nvidia|intel|query" exit -- 2.16.4 ++++++ U_adding-query-switch.patch ++++++ >From 32aeb7bba068b0247d56ac4281fb5c567e5da39f Mon Sep 17 00:00:00 2001 From: Vinzenz Vietzke <v...@vinzv.de> Date: Wed, 28 Nov 2018 22:03:27 +0100 Subject: [PATCH] * adding "query" switch * removing line from xorg-nvidia.conf which is not needed anymore and prevents use of external displays --- README.md | 1 + prime-select.sh | 17 ++++++++++++++++- xorg-nvidia.conf | 1 - 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 304a76c..004cc96 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Installation/usage 1. Run "prime-select nvidia" log out and login again, hopefully you are using nvidia GPU. To switch back to intel GPU run "prime-select intel" Remember to run as root. +2. To check which GPU you're currently using run "prime-select query". Contact ------- diff --git a/prime-select.sh b/prime-select.sh index 3f13fcb..fe74b3c 100755 --- a/prime-select.sh +++ b/prime-select.sh @@ -5,6 +5,7 @@ # Public domain by Bo Simonsen <b...@geekworld.dk> # Adapted for OpenSUSE Tumbleweed by Michal Srb <m...@suse.com> +# Extended for TUXEDO Computers by Vinzenz Vietzke <v...@tuxedocomputers.com> type=$1 @@ -18,6 +19,11 @@ function clean_files { case $type in nvidia) + if [[ $EUID -ne 0 ]]; then + echo "This script must be run with root permissions" 2>&1 + exit 1 + fi + clean_files gpu_info=`nvidia-xconfig --query-gpu-info` @@ -27,8 +33,14 @@ case $type in update-alternatives --set libglx.so $libglx_nvidia cat $xorg_nvidia_conf | sed 's/PCI:X:X:X/'${nvidia_busid}'/' > /etc/X11/xorg.conf.d/90-nvidia.conf + echo "nvidia" > /etc/prime/current_type ;; intel) + if [[ $EUID -ne 0 ]]; then + echo "This script must be run with root permissions" 2>&1 + exit 1 + fi + clean_files libglx_xorg=`update-alternatives --list libglx.so|grep xorg-libglx.so` @@ -36,9 +48,12 @@ case $type in update-alternatives --set libglx.so $libglx_xorg cp $xorg_intel_conf /etc/X11/xorg.conf.d/90-intel.conf + echo "intel" > /etc/prime/current_type ;; + query) + echo "Currently running: " && cat /etc/prime/current_type *) - echo "prime-select nvidia|intel" + echo "Usage: prime-select nvidia|intel|query" exit ;; esac diff --git a/xorg-nvidia.conf b/xorg-nvidia.conf index 6879caf..76010e6 100644 --- a/xorg-nvidia.conf +++ b/xorg-nvidia.conf @@ -25,5 +25,4 @@ Section "Screen" Identifier "nvidia" Device "nvidia" Option "AllowEmptyInitialConfiguration" "on" - Option "UseDisplayDevice" "None" EndSection -- 2.16.4