any reason not to expect /sys/class/gpio/ not to work with ubuntu? my pin stays high, even after "echo 0 > ..."

BeagleBoardxM with Ubuntu from

I'm trying to control a pin on the expansion header, following both


Indeed, I have /sys/class/gpio/

but not /sys/class/gpio/gpio168. No problem,

# echo 168 > export
# ls
# cd gpio168
# echo "out">direction
# echo "0" value
0 value
# echo "1" value
1 value

but in all cases I measure 1.8 V on pin 24.

I did not mess with the mux, but neither did the two instructions above (makezine and avrfreaks). Should I have?

How can I verify what the mux settings are?

What am I doing wrong?


The default mux has most pins configured in their mode 0, instead of GPIO mode.
You can try using one of the pins that are GPIO by default, 157-159,
161-162, or 136-139. 136-139 can also work as inputs.
See beagle.h for default mux:;a=blob;f=board/ti/beagle/beagle.h;hb=HEAD
And you can check what your current pin config is in /sys/kernel/debug/omap_mux
Pin names:
and in the beagleboard manual
The only way to change the mux is to recompile:
The tutorial doesn't do mux because the pin 168 used to be configured
as GPIO before, but has been changed to mode 0 since then.

Thanks. I'll test this, and I'll also try to get the authors of those
other two pages (one is a friend) to update theirs.

Hi Igor,

Your solution was exactly what I needed. I summarized my results and documented your input here, in case it is of use to others: