[Debian-eeepc-devel] eeepc-acpi-scripts + console + gnu screen ↦ staircase?effect

Trent W. Buck twb at cybersource.com.au
Tue Apr 13 11:17:49 UTC 2010


Damyan Ivanov <dmn at debian.org> writes:

> -=| Trent W. Buck, Mon, Apr 12, 2010 at 12:39:02PM +1000 |=-
>> Damyan Ivanov <dmn at debian.org> writes:
>> 
>> > -=| Trent W. Buck, Sun, Apr 11, 2010 at 12:52:01AM +1000 |=-
>> >> My normal work environment is Emacs in GNU Screen on the fbcon.  When I
>> >> hit e.g. Fn+F11 (the "raise volume" hotkey), eeepc-acpi-scripts writes
>> >> output (the new volume) to /dev/console.
>> >> 
>> >> Unfortunately, doing this in quick succession (e.g. cycling through SHE
>> >> states) results in a "staircase" effect.  How do I prevent that?
>> >> 
>> >> Curiously, output from the kernel (e.g. from plugging in a USB key) does
>> >> NOT have the staircase effect.
>> >
>> > What is a "staircase effect"?
>> 
>> It's where the receiver expects a ^M but the sender doesn't send one:
>> 
>> Starting foo... done
>>                     Starting bar... done
>>                                         Starting baz... done
>> 
>> Instead of:
>> 
>> Starting foo... done
>> Starting bar... done
>> Starting baz... done
>
> Ah, yes, not very nice indeed.
>
> Can you try with the following patch applied?
>
> diff --git a/etc/acpi/lib/notify.sh b/etc/acpi/lib/notify.sh
> index b476b53..d602e91 100644
> --- a/etc/acpi/lib/notify.sh
> +++ b/etc/acpi/lib/notify.sh
> @@ -12,7 +12,8 @@ notify() {
>      echo "$MSG"  # for /var/log/acpid
>  
>      if [ ! -S /tmp/.X11-unix/X0 ]; then
> -       echo "$MSG" > /dev/console
> +        # echo's behaviour wrt "\r" is shell-dependent
> +       printf "$MSG\r\n" > /dev/console
>         return
>      fi

This fixes things in screen, and doesn't seem to break things outside of
screen.  Thanks.




More information about the Debian-eeepc-devel mailing list