Hello community,

here is the log from the commit of package suse-prime for openSUSE:Leap:15.2 
checked in at 2020-02-11 23:26:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/suse-prime (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.suse-prime.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "suse-prime"

Tue Feb 11 23:26:50 2020 rev:10 rq:772173 version:0.7.6

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/suse-prime/suse-prime.changes  2020-01-15 
16:04:44.415967432 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.suse-prime.new.26092/suse-prime.changes       
2020-02-11 23:27:10.197324472 +0100
@@ -1,0 +2,37 @@
+Thu Feb  6 11:01:01 UTC 2020 - Stefan Dirsch <sndir...@suse.com>
+
+- changed copyright to SUSE LLC in specfile 
+
+-------------------------------------------------------------------
+Tue Feb  4 12:46:46 UTC 2020 - Stefan Dirsch <sndir...@suse.com>
+
+- Update to version 0.7.6
+  * README.md: Updated documentation (issue#46)
+    + Removing dracut config file of nvidia's packages is no longer
+      needed. These packages have been updated since.
+    + Made config file installation more generic, so nobody tries
+      to install config files, which are already at the right
+      location when using suse-prime packages.
+    + DynamicPowerManagement specifics apply to 435.xxx and later, 
+      not only 435.xx. Made this clear ...
+
+-------------------------------------------------------------------
+Mon Feb  3 16:33:02 UTC 2020 - Dominique Leuenberger <dims...@opensuse.org>
+
+- BuildRequire pkgconfig(systemd) instead of systemd: allow OBS to
+  shortcut through the -mini flavors.
+
+-------------------------------------------------------------------
+Wed Jan 15 10:51:06 UTC 2020 - Stefan Dirsch <sndir...@suse.com>
+
+- Update to version 0.7.5
+  * Runlevel switch not needed anymore
+    + Service only starts/stops display-manager service
+      - Faster switch operation
+      - No conflicts with services that run in runlev. 3
+      - Consistence
+    + Removed references of target/runlevel switch
+    + Removed a duplicate of "systemctl stop display-manager" in
+      "user_logout_waiter" section
+
+-------------------------------------------------------------------

Old:
----
  SUSEPrime-0.7.4.tar.gz

New:
----
  SUSEPrime-0.7.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ suse-prime.spec ++++++
--- /var/tmp/diff_new_pack.WU5CJt/_old  2020-02-11 23:27:10.569324665 +0100
+++ /var/tmp/diff_new_pack.WU5CJt/_new  2020-02-11 23:27:10.573324668 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package suse-prime
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,12 +17,12 @@
 
 
 Name:           suse-prime
-Version:        0.7.4
+Version:        0.7.6
 Release:        0
 Summary:        GPU (nvidia/intel) selection for NVIDIA optimus laptops
 License:        SUSE-Public-Domain
 Group:          System/X11/Utilities
-Url:            https://github.com/openSUSE/SUSEPrime
+URL:            https://github.com/openSUSE/SUSEPrime
 Source0:        
https://github.com/openSUSE/SUSEPrime/archive/%{version}.tar.gz#/SUSEPrime-%{version}.tar.gz
 Recommends:     nvidia_driver
 Supplements:    modalias(nvidia_driver:pci:v00008086d*sv*sd*bc03sc*i*)
@@ -38,12 +38,12 @@
 %package bbswitch
 Summary:        GPU (nvidia/intel) selection for NVIDIA optimus laptops with 
bbswitch support
 Group:          System/X11/Utilities
-BuildRequires:  systemd
+BuildRequires:  pkgconfig(systemd)
 Requires:       bbswitch
 Conflicts:      suse-prime
 Conflicts:      suse-prime-alt
 BuildArch:      noarch
-%{?systemd_requires}
+%{?systemd_ordering}
 
 %description bbswitch
 A collection of shell scripts that makes it possible to use the

++++++ SUSEPrime-0.7.4.tar.gz -> SUSEPrime-0.7.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SUSEPrime-0.7.4/README.md 
new/SUSEPrime-0.7.6/README.md
--- old/SUSEPrime-0.7.4/README.md       2019-11-28 22:14:22.000000000 +0100
+++ new/SUSEPrime-0.7.6/README.md       2020-01-29 16:31:44.000000000 +0100
@@ -15,8 +15,8 @@
    using the NVIDIA card. To switch back to te Intel card run `sudo 
prime-select intel` (modesetting driver) or 
    `sudo prime-select intel2` (Intel Open Source driver, requires 
xf86-video-intel package).
 2. To check which video card you're currently using run 
`/usr/sbin/prime-select get-current`.
-3. On intel configurations, powering off the NVIDIA card with bbswitch (legacy 
390.xxx driver) or DynamicPowerManagement option (current 435.xx driver) to 
save power and decrease temperature is supported but requires additional manual 
setup. Refer to instructions below.
-4. With current 435.xx driver you can make use of NVIDIA's PRIME Render 
Offload feature in intel configurations. `Option "AllowNVIDIAGPUScreens"` is 
already taken care of by intel X configs. You only need to set the __NV* 
environment variables. Check 
<https://download.nvidia.com/XFree86/Linux-x86_64/435.21/README/primerenderoffload.html>
 for more details.
+3. On intel configurations, powering off the NVIDIA card with bbswitch (legacy 
390.xxx driver) or DynamicPowerManagement option (435.xx driver and later) to 
save power and decrease temperature is supported but requires additional manual 
setup. Refer to instructions below.
+4. With current 435.xx driver and later you can make use of NVIDIA's PRIME 
Render Offload feature in intel configurations. `Option 
"AllowNVIDIAGPUScreens"` is already taken care of by intel X configs. You only 
need to set the __NV* environment variables. Check 
<https://download.nvidia.com/XFree86/Linux-x86_64/435.21/README/primerenderoffload.html>
 for more details.
 
 Contact
 -------
@@ -29,29 +29,21 @@
 
 * SUSEPrimeQT <https://github.com/simopil/SUSEPrimeQt/> Provides a simple GUI 
for SUSEPrime
 
-NVIDIA power off support with 435.xxx driver (=G05 driver packages)
--------------------------------------------------------------------
+NVIDIA power off support with 435.xxx driver and later (=G05 driver packages)
+-----------------------------------------------------------------------------
 
 Recreate your initrd with some special settings, which are needed to enable 
DynamicPowerManagement and remove NVIDIA kernel modules from initrd, so some 
special udev rules can be applied to disable NVIDIA Audio and NVIDIA USB and 
make runtime PM for NVIDIA GPU active. This is needed as workaround, since 
NVIDIA Audio/USB currently cannot be enabled at the same time as NVIDIA GPU 
DynamicPowerManagement. This is easily done with:
 
 ```
-cp /etc/prime/09-nvidia-modprobe-pm-G05.conf /etc/modprobe.d
-rm /etc/dracut.conf.d/50-nvidia-default.conf
-cp /etc/prime/90-nvidia-dracut-G05.conf      /etc/dracut.conf.d/
-cp /etc/prime/90-nvidia-udev-pm-G05.rules    /etc/udev/rules.d/
-dracut -f
+test -s /etc/modprobe.d/09-nvidia-modprobe-pm-G05.conf  || \
+  cp 09-nvidia-modprobe-pm-G05.conf /etc/modprobe.d
+if [ ! -s /etc/dracut.conf.d/90-nvidia-dracut-G05.conf ]; then
+  cp 90-nvidia-dracut-G05.conf /etc/dracut.conf.d/ && dracut -f
+fi
+test -s /etc/udev/rules.d/90-nvidia-udev-pm-G05.rules || \
+  cp 90-nvidia-udev-pm-G05.rules /etc/udev/rules.d/
 ```
 
-Unfortunately for now you need to recreate your initrd each time after you 
updated the nvidia driver packages in that way:
-
-```
-rm /etc/dracut.conf.d/50-nvidia-default.conf
-dracut -f
-```
-
-But we try to get rid of the dracut config file in our nvidia driver
-packages, so hopefully this won't be needed any longer in the future!
-
 NVIDIA power off support with 390.xxx driver (=G04 legacy driver packages)
 --------------------------------------------------------------------------
 
@@ -74,8 +66,9 @@
 This is easily done with:
 
 ```
-cp /etc/prime/09-nvidia-modprobe-bbswitch-G04.conf /etc/modprobe.d
-dracut -f
+if [ ! test -s /etc/modprobe.d/09-nvidia-modprobe-bbswitch-G04.conf ]; then
+  cp 09-nvidia-modprobe-bbswitch-G04.conf /etc/modprobe.d && dracut -f
+fi
 ```
 
 This will also blacklist the `nouveau` module which can really get in the way 
with Optimus and causing black screens.
@@ -83,8 +76,10 @@
 ### Install the systemd services for doing switch and set correct card during 
boot
 
 ```
-cp /etc/prime/prime-select.service           /usr/lib/systemd/system
-systemctl enable prime-select
+if [ ! -s /usr/lib/systemd/system/prime-select.service ]; then
+  cp prime-select.service /usr/lib/systemd/system && \
+  systemctl enable prime-select
+fi
 ```
 
 If nvidia is set, it will load the NVIDIA modules before starting the 
Graphical Target.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SUSEPrime-0.7.4/prime-select.sh 
new/SUSEPrime-0.7.6/prime-select.sh
--- old/SUSEPrime-0.7.4/prime-select.sh 2019-11-28 22:14:22.000000000 +0100
+++ new/SUSEPrime-0.7.6/prime-select.sh 2020-01-29 16:31:44.000000000 +0100
@@ -73,8 +73,7 @@
        echo "boot:        select default card at boot or set last used"
        echo "next-boot:   select card ONLY for next boot, it not touches your 
boot preference. abort: restores next boot to default"
        echo "get-boot:    display default card at boot"
-    echo "service:     disable, check or restore prime-select service. Could 
be useful disabling service"
-       echo "             before isolating multi-user.target to prevent 
service execution."
+    echo "service:     disable, check or restore prime-select service."
     fi
     
     #if (( service_test == 0)); then
@@ -199,17 +198,20 @@
 function set_nvidia {
 
     if (( service_test == 0)); then
-       
+
        if [ -f /proc/acpi/bbswitch ]; then        
             tee /proc/acpi/bbswitch > /dev/null <<EOF
 ON
 EOF
-       fi
+        fi
        
        logging "trying switch ON nvidia: $(bbcheck)"
-       
+        currtime=$(date +"%T");
        # will also load all necessary dependent modules
        modprobe nvidia_drm
+       
+       #waits nvidia modules properly loaded
+               until [ "$(journalctl --since "$currtime" | grep -E 
"[nvidia-drm]".*"Loading driver")" > /dev/null ]; do echo; done
 
     fi    
     
@@ -276,8 +278,10 @@
     cat $conf | sed -e 's/PCI:X:X:X/'${intel_busid}'/' > 
/etc/X11/xorg.conf.d/90-intel.conf
     
     if (( service_test == 0)); then
-
-        modprobe -r $nvidia_modules
+        
+        while [ "$(lsmod | grep nvidia)" > /dev/null ]; do
+            modprobe -r $nvidia_modules
+        done
 
         if [ -f /proc/acpi/bbswitch ]; then        
             tee /proc/acpi/bbswitch > /dev/null <<EOF 
@@ -360,7 +364,7 @@
     fi
     if ! [ -f /etc/prime/boot ]; then
         echo "last" > /etc/prime/boot
-    fi
+    fi 
     
     if [ -f /etc/prime/forced_boot ]; then
         echo "$(cat /etc/prime/forced_boot)" > /etc/prime/current_type
@@ -381,8 +385,8 @@
 function logout_switch {
     apply_current
     echo "N" > /etc/prime/boot_state
-    logging "HotSwitch: Reaching graphical.target [ boot_state > N ]"
-    systemctl isolate graphical.target &
+    logging "HotSwitch: starting Display Manager [ boot_state > N ]"
+    systemctl start display-manager &
     systemctl stop prime-select
 }
 
@@ -679,7 +683,8 @@
                done
                logging "user_logout_waiter: X restart detected, preparing 
switch to $2 [ boot_state > S ]"
                #stopping display-manager before runlev.3 seems work faster
-               systemctl stop display-manager
+               #systemctl stop display-manager
+               
                ;;
             
             #manually_started_X_case
@@ -698,8 +703,8 @@
         echo $2 > /etc/prime/current_type
        set_user $4
  
-        logging "HotSwitch: Reaching multi-user.target"
-        systemctl isolate multi-user.target &
+        systemctl stop display-manager
+        systemctl start prime-select &
        ;;
     
     systemd_call)


Reply via email to