[ltp] Bluetooth disabled at boot

Marius Gedminas linux-thinkpad@linux-thinkpad.org
Sat, 26 Apr 2008 04:52:58 +0300


--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Apr 25, 2008 at 10:11:51PM -0300, Henrique de Moraes Holschuh wrote:
> On Fri, 25 Apr 2008, Marius Gedminas wrote:
> > Bluetooth, but lately I've given up trying to get it to work.  (I blame
> > the hotkey mask that doesn't seem to stay set.)
>=20
> Send me proof, and I will add a lock to it.

Oh, I'm 95% sure the fault is all mine, I just cannot find the time to
sit down and figure it all out.

*tries*

Hey, my scripts work now after the upgrade to Ubuntu Hardy.  So even if
there was a bug somewhere, it got fixed in the meantime.

If anyone else wants a single-key Bluetooth toggle on Ubuntu (and
probably Debian, which, I think, also uses acpi-support), here are the
two files for it:

    # /etc/acpi/events/ibm-bluetooth
    # This is called when the user presses Fn-F6 button and calls
    # /etc/acpi/bluetooth.sh for further processing.

    event=3Dibm/hotkey HKEY 00000080 00001006
    action=3D/etc/acpi/bluetooth.sh

and

    #!/bin/bash
    # /etc/acpi/bluetooth.sh
    # Enable/disable builtin Bluetooth on IBM Thinkpads

    if grep -q enabled /proc/acpi/ibm/bluetooth; then
        echo disable > /proc/acpi/ibm/bluetooth
    else
        echo enable > /proc/acpi/ibm/bluetooth
    fi

Marius Gedminas
--=20
This loads a GDT entry into the "Task Register": that entry points to a
structure called the Task State Segment.  Some comments scattered though the
kernel code indicate that this used for task switching in ages past, along
with blood sacrifice and astrology.
                -- lguest source code

--UugvWAfsgieZRqgk
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIEor6kVdEXeem148RAtrSAJ9QnuqVnHoMbS2vS+GVu3KoJMb8FgCeNjg7
I94r3k5w13goeJozBalWSuo=
=M8jG
-----END PGP SIGNATURE-----

--UugvWAfsgieZRqgk--