O mouse desliga após alguns segundos (Ubuntu 13.10, Windows 8.1) [duplicado]

0

Eu tentei lsusb e posso ver meu mouse na lista.

Eu tentei

for foo in /sys/bus/usb/devices/*/power/level;
> do echo on > $foo;
> done

Mas recebi esta resposta

bash: /sys/bus/usb/devices/1-4/power/level: Permission denied
bash: /sys/bus/usb/devices/2-2/power/level: Permission denied
bash: /sys/bus/usb/devices/5-1/power/level: Permission denied
bash: /sys/bus/usb/devices/5-3/power/level: Permission denied
bash: /sys/bus/usb/devices/usb1/power/level: Permission denied
bash: /sys/bus/usb/devices/usb2/power/level: Permission denied
bash: /sys/bus/usb/devices/usb3/power/level: Permission denied
bash: /sys/bus/usb/devices/usb4/power/level: Permission denied
bash: /sys/bus/usb/devices/usb5/power/level: Permission denied
bash: /sys/bus/usb/devices/usb6/power/level: Permission denied

Observe que isso só acontece sempre que meu laptop é desconectado.

    
por user1526570 06.04.2014 / 05:39

1 resposta

0

Seu código deve ser

for i in /sys/bus/usb/devices/*/power/level; do sudo echo on > $i; done

OR

for i in /sys/bus/usb/devices/*/power/level; do sudo sh -c "echo on > $i"; done
    
por Avinash Raj 06.04.2014 / 08:12