Sziasztok.
Egy KDE alapú salixom van, és telepítéskor véletlenül ON-ra állítottam annak idején a numlockot.
Azóta a .profile fájlokba beleírtam tüneti kezelésképpen a
numlockx off
parancsot, de ez nem hat ki a suspend to RAM utáni újraélesztés után felveendő állapotra.
Kérdésem:
telepítéskor a slackware hova írja belé a numlock állapotára vonatkozó ON vagy OFF beállítást?
Grafikus felületen a KDE csodálatos, de idegesítő GUI-ján offra kapcsoltam a numlockot, de hatástalan.
Két fájllal kísérleteztem eddig, alább vannak:
a[acpi]$ cat /etc/rc.d/rc.numlock
#!/bin/sh
# Activate numlock on the console
case $1 in
start)
for t in 1 2 3 4 5 6 7 8 ; do
setleds +num < /dev/tty$t > /dev/null
done
;;
stop)
for t in 1 2 3 4 5 6 7 8 ; do
setleds -num < /dev/tty$t > /dev/null
done
;;
*)
echo "Usage: rc.numlock {start|stop}"
exit 1
;;
esac
######## a fenti fájlt nem piszkáltam, jön a másik gyanús file:
a[acpi]$ cat /etc/acpi/suspend2ram.sh
#!/bin/sh
if [ -e "/etc/acpi/power.lock" ]
then
exit 0
fi
if grep -q mem /sys/power/state ; then
echo "0 0 0 0">/proc/sys/kernel/printk
# asus+ :
WLANP=`cat /proc/acpi/asus/wlan`
if [ $WLANP == 1 ]; then
/etc/acpi/wlan.sh poweroff
fi
# asus+ : turn off webcam
CAMP=`cat /proc/acpi/asus/camera`
if [ $CAMP == 1 ] ; then
killall -9 ucview.real
fi
echo 0 > /proc/acpi/asus/camera
# asus+ : save the brightness value
BRN=`cat /proc/acpi/asus/brn`
# save system clock, if needed
# reset numlock - system wakes with numlock off
/usr/bin/numlockx off # itt kínlódtam ezzel
# flush the buffers to disk
sync
echo -n "mem" > /sys/power/state
# restore system clock, if needed
# reload network drivers, if needed
# restart the networking
# wait for X display to come up
sleep 3
# asus+ : turn on backlight
echo $BRN > /proc/acpi/asus/brn
# asus+ : signal the acpid to unlock a flag from suspend.
# (sleep 12;killall -SIGALRM acpid )&
# asus+ :
echo 0 > /proc/acpi/asus/wlan
sleep 2
if [ $WLANP == 1 ]; then
/etc/acpi/wlan.sh poweron
fi
fi
exit 0
a[acpi]$
- 4428 megtekintés