Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit suse-prime for openSUSE:Factory
Hello community,

here is the log from the commit of package suse-prime for openSUSE:Factory
checked in at 2019-04-03 09:27:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/suse-prime (Old)
and /work/SRC/openSUSE:Factory/.suse-prime.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "suse-prime"

Wed Apr 3 09:27:52 2019 rev:7 rq:690570 version:0.6.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/suse-prime/suse-prime.changes 2019-03-26
22:33:32.925689475 +0100
+++ /work/SRC/openSUSE:Factory/.suse-prime.new.25356/suse-prime.changes
2019-04-03 09:27:54.743812337 +0200
@@ -1,0 +2,36 @@
+Mon Apr 1 18:11:12 UTC 2019 - Mykola Krachkovsky <w01dnick@xxxxxxxxx>
+
+- Repair broken suse-prime-bbswitch package
+
+-------------------------------------------------------------------
+Mon Apr 1 14:03:36 UTC 2019 - Stefan Dirsch <sndirsch@xxxxxxxx>
+
+- Update to version 0.6.8
+ * Big Update (changes in systemd services)
+ + prime-boot-selector service deprecated, all features are
+ now handled with one only service.
+ + used journalctl to check if system is booting or if
+ "logout-switch" is needed
+ + no more multiple service enable/disable needed during
+ switch, prime-select service is enabled everytime
+ + removed all "prime-boot-selector" references in logging
+ and help command
+ + boot_status file has now only two states (S > wait for
+ switching, N > not waiting)
+ + changed systemd call from "prime-select apply_current"
+ to "prime-select systemd_call"
+ + updated README
+
+-------------------------------------------------------------------
+Fri Mar 29 14:13:29 UTC 2019 - Stefan Dirsch <sndirsch@xxxxxxxx>
+
+- Update to version 0.6.7
+ * Corrected DPI value in xorg-nvidia.conf (boo#1130723)
+
+-------------------------------------------------------------------
+Mon Mar 25 13:30:18 UTC 2019 - Stefan Dirsch <sndirsch@xxxxxxxx>
+
+- Update to version 0.6.6
+ * Add logging to journal as well
+
+-------------------------------------------------------------------

Old:
----
SUSEPrime-0.6.5.tar.gz

New:
----
SUSEPrime-0.6.8.tar.gz

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

Other differences:
------------------
++++++ suse-prime.spec ++++++
--- /var/tmp/diff_new_pack.6LV3FN/_old 2019-04-03 09:27:55.279812590 +0200
+++ /var/tmp/diff_new_pack.6LV3FN/_new 2019-04-03 09:27:55.283812592 +0200
@@ -17,7 +17,7 @@


Name: suse-prime
-Version: 0.6.5
+Version: 0.6.8
Release: 0
Summary: GPU (nvidia/intel) selection for NVIDIA optimus laptops
License: SUSE-Public-Domain
@@ -66,7 +66,6 @@
install -m 0644 09-nvidia-blacklist.conf %{buildroot}%{_sysconfdir}/modprobe.d/
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 prime-select.service %{buildroot}%{_unitdir}/
-install -m 0644 prime-boot-selector.service %{buildroot}%{_unitdir}/
echo "undefined" > %{buildroot}%{_sysconfdir}/prime/current_type
install -D -m 0755 prime-select.sh %{buildroot}%{_sbindir}/prime-select

@@ -78,15 +77,15 @@
fi

%pre bbswitch
-%service_add_pre prime-boot-selector.service
+%service_add_pre prime-select.service

%post bbswitch
%{?regenerate_initrd_post}
-%service_add_post prime-boot-selector.service
-systemctl enable prime-boot-selector.service
+%service_add_post prime-select.service
+systemctl enable prime-select.service

%preun bbswitch
-%service_del_preun prime-boot-selector.service
+%service_del_preun prime-select.service
if [ "$1" -eq 0 ]; then
# cleanup before uninstalling the package completely
export PATH=$PATH:/usr/sbin
@@ -95,7 +94,7 @@

%postun bbswitch
%{?regenerate_initrd_post}
-%service_del_postun prime-boot-selector.service
+%service_del_postun prime-select.service

%posttrans bbswitch
%{?regenerate_initrd_posttrans}
@@ -120,6 +119,5 @@
%{_sbindir}/prime-select
%config %{_sysconfdir}/modprobe.d/09-nvidia-blacklist.conf
%{_unitdir}/prime-select.service
-%{_unitdir}/prime-boot-selector.service

%changelog

++++++ SUSEPrime-0.6.5.tar.gz -> SUSEPrime-0.6.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SUSEPrime-0.6.5/prime-boot-selector.service
new/SUSEPrime-0.6.8/prime-boot-selector.service
--- old/SUSEPrime-0.6.5/prime-boot-selector.service 2019-03-19
15:38:44.000000000 +0100
+++ new/SUSEPrime-0.6.8/prime-boot-selector.service 1970-01-01
01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-[Unit]
-Description=Prime Select Service (Boot Selector)
-After=multi-user.target
-Before=display-manager.service
-
-[Service]
-Type=oneshot
-ExecStart=prime-select prime_booting
-
-[Install]
-WantedBy=multi-user.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SUSEPrime-0.6.5/prime-select.service
new/SUSEPrime-0.6.8/prime-select.service
--- old/SUSEPrime-0.6.5/prime-select.service 2019-03-19 15:38:44.000000000
+0100
+++ new/SUSEPrime-0.6.8/prime-select.service 2019-04-01 15:50:46.000000000
+0200
@@ -1,11 +1,11 @@
[Unit]
-Description=Prime Select Service
-After=multi-user.target
-Before=display-manager.service
+Description=SUSEPrime systemd service
+After=multi-user.target
+Before=display-manager.service

[Service]
Type=oneshot
-ExecStart=prime-select apply-current
+ExecStart=prime-select systemd_call

[Install]
WantedBy=multi-user.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SUSEPrime-0.6.5/prime-select.sh
new/SUSEPrime-0.6.8/prime-select.sh
--- old/SUSEPrime-0.6.5/prime-select.sh 2019-03-19 15:38:44.000000000 +0100
+++ new/SUSEPrime-0.6.8/prime-select.sh 2019-04-01 15:50:46.000000000 +0200
@@ -39,9 +39,8 @@
echo "get-current: display driver currently in use by this tool"
echo
echo "##FOLLOWING COMMANDS ARE USED BY prime-select SERVICEs, DON'T USE
THEM MANUALLY##"
- echo "apply-current: re-apply this script using previously set driver
(used by prime-select systemd service)"
+ echo "systemd_call: called during boot or after user logout for
switch"
echo "user_logout_waiter: waits user logout (used by prime-select systemd
service)"
- echo "prime_booting: sets correct card during boot (used by
prime-boot-selector systemd service)"
echo
}

@@ -50,6 +49,7 @@
echo "##SUSEPrime logfile##" > $prime_logfile
fi
echo "[ $(date +"%H:%M:%S") ] ${1}" >> $prime_logfile
+ echo "${1}" | systemd-cat -t suse-prime -p info
}

function check_root {
@@ -176,15 +176,6 @@
fi

set_$current_type
-
- if [ "$(cat /etc/prime/boot_state)" = "S" ]; then
- echo "N" > /etc/prime/boot_state
- logging "Reenabling prime-boot-selector [ boot_state > N ]"
- systemctl disable prime-select
- systemctl enable prime-boot-selector
- logging "Reaching graphical.target"
- systemctl isolate graphical.target
- fi
fi
}

@@ -202,6 +193,38 @@
fi
}

+function booting {
+ if ! [ -f /etc/prime/boot_state ]; then
+ echo "N" > /etc/prime/boot_state
+ fi
+ if ! [ -f /etc/prime/boot ]; then
+ echo "last" > /etc/prime/boot
+ fi
+
+ if [ -f /etc/prime/forced_boot ]; then
+ echo "$(cat /etc/prime/forced_boot)" > /etc/prime/current_type
+ rm /etc/prime/forced_boot
+ logging "Boot: forcing booting with $(cat
/etc/prime/current_type), boot preference ignored"
+ logging "Boot: setting-up $(cat /etc/prime/current_type) card"
+ apply_current
+ else
+ boot_type=`cat /etc/prime/boot`
+ if [ "$boot_type" != "last" ]; then
+ echo "$boot_type" > /etc/prime/current_type
+ fi
+ logging "Boot: setting-up $(cat /etc/prime/current_type) card"
+ apply_current
+ fi
+}
+
+function logout_switch {
+ apply_current
+ echo "N" > /etc/prime/boot_state
+ logging "HotSwitch: Reaching graphical.target [ boot_state > N ]"
+ systemctl isolate graphical.target &
+ systemctl stop prime-select
+}
+
case $type in

apply-current)
@@ -228,9 +251,9 @@
exit 1
fi
fi
- if ! [ -f
/etc/systemd/system/multi-user.target.wants/prime-boot-selector.service ]; then
- echo "ERROR: prime-select service seems broken or disabled by
user. Try prime-select service restore"
- exit 1
+ if ! [ -f
/etc/systemd/system/multi-user.target.wants/prime-select.service ]; then
+ echo "ERROR: prime-select service seems broken or disabled by user.
Try prime-select service restore"
+ exit 1
fi
if ! { [ "$(bbcheck)" = "[bbswitch] NVIDIA card is ON" ] || [
"$(bbcheck)" = "[bbswitch] NVIDIA card is OFF" ]; }; then
bbcheck
@@ -382,11 +405,9 @@

check)

- if [ -f
/etc/systemd/system/multi-user.target.wants/prime-boot-selector.service ]; then
- if ! [ -f
/etc/systemd/system/multi-user.target.wants/prime-select.service ]; then
- echo "prime-select: service is set correctly"
- exit
- fi
+ if [ -f
/etc/systemd/system/multi-user.target.wants/prime-select.service ]; then
+ echo "prime-select: service is set correctly"
+ exit
fi
echo "prime-select: service has a wrong setting or is disabled
by user, please do prime-select service restore"
echo "If you are running this command in multi-user.target
please ignore this message"
@@ -395,8 +416,7 @@
restore)

check_root
- systemctl enable prime-boot-selector
- systemctl disable prime-select
+ systemctl enable prime-select
echo "prime-select: service restored"
logging "service restored by user"
;;
@@ -404,7 +424,6 @@
disable)

check_root
- systemctl disable prime-boot-selector
systemctl disable prime-select
echo -e "prime-select: service disabled. Remember prime-select
needs this service to work correctly.\nUse prime-select service restore to
enable service again "
logging "service disabled by user"
@@ -430,7 +449,7 @@
until [ "$(journalctl --since "$currtime" | grep
"pam_unix(gdm-password:session): session closed")" > /dev/null ]; do
sleep 0.5s
done
- logging "user_logout_waiter: X restart detected, disabling
prime-boot-selector and preparing switch to $2 [ boot_state > S ]"
+ logging "user_logout_waiter: X restart detected, preparing switch
to $2 [ boot_state > S ]"
;;

#SDDM_mode
@@ -438,7 +457,7 @@
until [ "$(journalctl --since "$currtime" -e _COMM=sddm | grep
"Removing display")" > /dev/null ]; do
sleep 0.5s
done
- logging "user_logout_waiter: X restart detected, disabling
prime-boot-selector and preparing switch to $2 [ boot_state > S ]"
+ logging "user_logout_waiter: X restart detected, preparing switch
to $2 [ boot_state > S ]"
;;

#lightdm_mode
@@ -446,7 +465,7 @@
until [ "$(journalctl --since "$currtime" -e | grep
"pam_unix(lightdm:session): session closed")" > /dev/null ]; do
sleep 0.5s
done
- logging "user_logout_waiter: X restart detected, disabling
prime-boot-selector and preparing switch to $2 [ boot_state > S ]"
+ logging "user_logout_waiter: X restart detected, preparing switch
to $2 [ boot_state > S ]"
;;

#xdm/kdm_mode
@@ -454,7 +473,7 @@
until [ "$(journalctl --since "$currtime" -e | grep
"pam_unix(xdm:session): session closed for user")" > /dev/null ]; do
sleep 0.5s
done
- logging "user_logout_waiter: X restart detected, disabling
prime-boot-selector and preparing switch to $2 [ boot_state > S ]"
+ 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
;;
@@ -464,46 +483,27 @@
while [ "$(pgrep -fl "xinit")" > /dev/null ]; do
sleep 0.5s
done
- logging "user_logout_waiter: X stop detected, disabling
prime-boot-selector and preparing switch to $2 [ boot_state > S ]"
+ logging "user_logout_waiter: X stop detected, preparing switch to
$2 [ boot_state > S ]"
;;
now )
- logging "user_logout_waiter: runlevel 3 mode, disabling
prime-boot-selector and preparing switch to $2 [ boot_state > S ]"
+ logging "user_logout_waiter: runlevel 3 mode, preparing switch to
$2 [ boot_state > S ]"
;;
esac

echo $2 > /etc/prime/current_type
echo "S" > /etc/prime/boot_state
- systemctl enable prime-select
- systemctl disable prime-boot-selector
- logging "Reaching multi-user.target"
+ logging "HotSwitch: Reaching multi-user.target"
systemctl isolate multi-user.target
;;

- prime_booting)
-
- #called by prime-boot-selector service
- if ! [ -f /etc/prime/boot_state ]; then
- echo "B" > /etc/prime/boot_state
- fi
- if ! [ -f /etc/prime/boot ]; then
- echo "last" > /etc/prime/boot
- fi
- if [ "$(cat /etc/prime/boot_state)" = "N" ]; then
- logging "prime-boot-selector: useless call caused by isolating
graphical.target [ boot_state > B ]"
- echo "B" > /etc/prime/boot_state
- elif [ -f /etc/prime/forced_boot ]; then
- echo "$(cat /etc/prime/forced_boot)" > /etc/prime/current_type
- rm /etc/prime/forced_boot
- logging "prime-boot-selector: forcing booting with $(cat
/etc/prime/current_type), boot preference ignored"
- logging "prime-boot-selector: setting-up $(cat
/etc/prime/current_type) card"
- apply_current
- else
- boot_type=`cat /etc/prime/boot`
- if [ "$boot_type" != "last" ]; then
- echo "$boot_type" > /etc/prime/current_type
+ systemd_call)
+ #checks if system is booting or switching only
+ if [ "$(journalctl -b 0 | grep suse-prime)" > /dev/null ]; then
+ if [ "$(cat /etc/prime/boot_state)" = "S" ]; then
+ logout_switch
fi
- logging "prime-boot-selector: setting-up $(cat
/etc/prime/current_type) card"
- apply_current
+ else
+ booting
fi
;;

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SUSEPrime-0.6.5/xorg-nvidia.conf
new/SUSEPrime-0.6.8/xorg-nvidia.conf
--- old/SUSEPrime-0.6.5/xorg-nvidia.conf 2019-03-19 15:38:44.000000000
+0100
+++ new/SUSEPrime-0.6.8/xorg-nvidia.conf 2019-04-01 15:50:46.000000000
+0200
@@ -34,5 +34,6 @@
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:X:X:X"
+ Option "DPI" "96 x 96"
Option "AllowEmptyInitialConfiguration"
EndSection


< Previous Next >
This Thread