diff --git a/dom0/vaio_fixes/00sony-vaio-audio b/dom0/vaio_fixes/00sony-vaio-audio new file mode 100755 index 00000000..39009408 --- /dev/null +++ b/dom0/vaio_fixes/00sony-vaio-audio @@ -0,0 +1,8 @@ +#!/bin/sh + +. "${PM_FUNCTIONS}" + +case "$1" in + thaw|resume) amixer sset Master 100;; + *) exit 0 ;; +esac diff --git a/dom0/vaio_fixes/01sony-vaio-display b/dom0/vaio_fixes/01sony-vaio-display new file mode 100755 index 00000000..6c29cbd8 --- /dev/null +++ b/dom0/vaio_fixes/01sony-vaio-display @@ -0,0 +1,19 @@ +#!/bin/sh +# light up laptop screen for vaio VPCZ12 + +. "${PM_FUNCTIONS}" + +resume_lapscreen() +{ + if [ x$DISPLAY = x ]; then + export DISPLAY=:0 + export XAUTHORITY=`ls /var/run/kdm/.Xauth*` + fi + /usr/bin/xrandr --output DP3 --off + /usr/bin/xrandr --output DP3 --auto +} + +case "$1" in + thaw|resume) resume_lapscreen ;; + *) exit 0 ;; +esac diff --git a/dom0/vaio_fixes/99sony-vaio-audio b/dom0/vaio_fixes/99sony-vaio-audio new file mode 100755 index 00000000..345bfc50 --- /dev/null +++ b/dom0/vaio_fixes/99sony-vaio-audio @@ -0,0 +1,11 @@ +#!/bin/sh + +. "${PM_FUNCTIONS}" + +date + +case "$1" in + suspend) amixer sset Master 0;; + thaw|resume) amixer sset Master 0;; + *) exit 0 ;; +esac diff --git a/rpm_spec/core-dom0.spec b/rpm_spec/core-dom0.spec index 530543c7..893e720a 100644 --- a/rpm_spec/core-dom0.spec +++ b/rpm_spec/core-dom0.spec @@ -125,6 +125,11 @@ cp pm-utils/01qubes-sync-vms-clock $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ cp pm-utils/01qubes-suspend-netvm $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ cp pm-utils/02qubes-pause-vms $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ +# Optional scripts for Vaio (they go into separate package) +cp vaio_fixes/00sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ +cp vaio_fixes/99sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ +cp vaio_fixes/01sony-vaio-display $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ + mkdir -p $RPM_BUILD_ROOT/var/log/qubes mkdir -p $RPM_BUILD_ROOT/var/run/qubes @@ -286,3 +291,18 @@ fi %{_libdir}/libvchan.so %{_libdir}/libu2mfn.so /etc/sudoers.d/qubes + + +%package vaio-fixes +Summary: Additional scripts for supporting suspend on Vaio Z laptops + +%description vaio-fixes +Additional scripts for supporting suspend on Vaio Z laptops. + +Due to broken Linux GPU drivers we need to do some additional actions during +suspend/resume. + +%files vaio-fixes +/usr/lib64/pm-utils/sleep.d/00sony-vaio-audio +/usr/lib64/pm-utils/sleep.d/99sony-vaio-audio +/usr/lib64/pm-utils/sleep.d/01sony-vaio-display