Optional package with suspend fixes for Vaio Z laptops

This commit is contained in:
Joanna Rutkowska 2011-04-07 13:32:00 +02:00
parent d90040a726
commit 2230e67a39
4 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,8 @@
#!/bin/sh
. "${PM_FUNCTIONS}"
case "$1" in
thaw|resume) amixer sset Master 100;;
*) exit 0 ;;
esac

View File

@ -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

View File

@ -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

View File

@ -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