Marc's Public Blog


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Dining | Diving | Electronics | Exercising | Flying | Hiking | Linux | Linuxha | Monuments | Museums | Public | Rc | Sciencemuseums | Snow | Solar | Trips




More pages: April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 October 2003 August 2003 July 2003 May 2003 April 2003 March 2003 January 2003 November 2002 October 2002 July 2002 May 2002 April 2002 March 2002 February 2002 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 May 2001 April 2001 March 2001 February 2001 January 2001 December 2000 November 2000 October 2000 September 2000 August 2000 July 2000 June 2000 April 1999 March 1999 September 1997 August 1997 July 1996 September 1993 July 1991 December 1988 December 1985 January 1980



2018/12/27 Xmas with my Mom
π 2018-12-27 01:01 in Family
We went to see her and made a small Xmas party and went to the next door restaurant. Thanks to my brother for bringing the snacks and organizing the logistics:







2018/12/25 Another Xmas with my Dad, Tata and the Rest of the Family
π 2018-12-25 01:01 in Family
A nice Xmas lunch:








oh, we don't have these nice birds at home
oh, we don't have these nice birds at home



A bit of music:


even Diane's mom can still play plano
even Diane's mom can still play plano

We then went to see poor Tata who feel in the street and got bleeding in her brain as a result. Sadly it did affect her mental capacities significantly. We're hoping that she may improve, but it may not happen:


A few more dinners:

my dad tricking poor Jennifer again :)
my dad tricking poor Jennifer again :)

A few pictures I found:



For New Years Eve, we went to a nice restaurant:





the restaurant's cat came to visit Jennifer and spent most of the evening with her :)
the restaurant's cat came to visit Jennifer and spent most of the evening with her :)



On New Year, we had Martine and François Franc:


Patrick build an arduino based matrix, lower res than mine, but nicer build
Patrick build an arduino based matrix, lower res than mine, but nicer build







And that was it, thank you so much for my dad for all the nice lunches and dinners and it was a pleasure to see the rest of the family again

2018/12/24 Xmas 2018 in Paris and la Défence
π 2018-12-24 01:01 in Paris, Trips
We went to the Louvre underground shops which have nice decorations and stores that my dad, likes:









We then walked around the neighborhood:





and made it to les Halles and Mairie de Paris for their little Xmas houses:
















After seeing my mom another day, we walked around concorde and Madeleine:







We then headed to "grands magasins" (printemps/haussmann):





0 euro bills, cute
0 euro bills, cute

Another morning, we went to Musée de l'homme (museum of man) that had been recently rebuilt. It's right by the Eiffel tower:













From there, a few nice views:



We then headed towards la déefence where we hadn't been for 10 years. They had a big collection of Xmas houses, which sadly closed earlier than I planned, but we got to see quickly:











Then, we saw the houses:







The stores nearby were also nice, as well as the surroundings with lighting:









Our last Paris views were a few views from the new Google Paris building:




and after some food shopping, time to go home:


2018/12/20 Audio SF: Phoria Holiday Party with John Askew
π 2018-12-20 01:01 in Clubbing
Nice intimate party at Audio SF with John Askew. Great way to end the year:






2018/12/20 Accessing USB Devices In Docker (ttyUSB0, /dev/bus/usb/... for fastboot, adb) without using --privileged
π 2018-12-20 01:01 in Linux

Problem:You want to use devices like /dev/ttyUSB0 or need to access raw USB devices under /dev/bus/usb in a docker container

This is not going to work easily for a variety of reasons. Let's go through them.

Before I go there, yes, giving --privileged will "fix" all your problems but it will also give full access to everything in your container, where the container can wipe the host device, steal password from memory outside the container and so forth. Maybe that's ok for you anyway, but if not, read on:

/dev/ttyUSB0 does not show up under /dev in the container

This does 2 things: 1) create the device in the container, and 2) give the container write access to the block device (more or that later)

docker run --device=/dev/ttyUSB0 -i -t --entrypoint /bin/bash --cap-add SYS_PTRACE debian:amd64

I added SYS_PTRACE so that you can use strace -e trace=file command to debug access problems

/dev/bus or /dev/serial do not show up under /dev in the container

Try this:
docker run -v /dev/bus:/dev/bus:ro -v /dev/serial:/dev/serial:ro -i -t --entrypoint /bin/bash --cap-add SYS_PTRACE debian:amd64

This will make /dev/bus and /dev/serial show up as bind mounts in your container. Yet you will find that _fastboot devices or adb_ will not work. Strace will show you permission denied. What you want instead is this:

docker run --device=/dev/bus -v /dev/serial:/dev/serial:ro -i -t --entrypoint /bin/bash --cap-add SYS_PTRACE debian:amd64

See https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities

This mounts /dev/bus in your container and gives you access to all the block/character devices in there. Now, fastboot will work. Well, it will work until...

/dev/bus, fastboot/adb work until I disconnect/reconnect the device

Yeah, this is where things get more hairy. what the --device command above did was give access to all the block/character devices that existed when your container was created. If new ones appear (unplugging and replugging a device or rebooting it), those don't work.
I have not found a way to get docker to make them work after the container has started.

Thankfully there is a clue here: https://www.kernel.org/doc/Documentation/cgroup-v1/devices.txt

You want to go back to running

docker run -v /dev/bus:/dev/bus:ro -v /dev/serial:/dev/serial:ro -i -t --entrypoint /bin/bash --cap-add SYS_PTRACE debian:amd64

Then, grab the container ID in $A:

A=$( docker ps |awk '/bin.bash/ { print $1 }' )

Note the major number of your device:

root@fuchsia-tests-x64-lab01-0002:/sys/fs/cgroup# l /dev/bus/usb/004/* | head -1
crw-rw-r-- 1 root root 189, 384 Dec 18 17:51 /dev/bus/usb/004/001
Here it's 189. What changes it the minor number (384) when you plug/unplug devices.

Finally, tell the linux container via an opaque cgroup interface, that all character devices of major number 189, are allowed:

root@fuchsia-tests-x64-lab01-0002:~# echo 'c 189:* rwm' > /sys/fs/cgroup/devices/docker/$A*/devices.allow 

After that, things should work.

My /dev/ttyUSB device keeps changing and the new one isn't allowed

See above and run
root@fuchsia-tests-x64-lab01-0002:~# echo 'c 188:* rwm' > /sys/fs/cgroup/devices/docker/$A*/devices.allow 

Then inside the container, create them all:

root@f47dbbab392b:/dev# for i in $(seq 1 255); do mknod ttyUSB$i c 188 $i; done

Hope this helps!

2018/12/20 Getting Around USB3 xhci 32 Device Limit "Max number of devices this xHCI host supports is 32"
π 2018-12-20 01:01 in Linux
Are you stuck with xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 32 ?

Wait, you're saying, but USB should support 127 devices (which include hub ports), why only 32?
Well, xhci/USB3 actually has an extra limit of 96 endpoints and each device uses 3 endpoints, which leaves you with only 32 devices. Yes, this is terrible, I agree. It's also not well documented and few people know how to get around it.
https://forums.intel.com/s/question/0D50P00004905stSAA/hardware-limitations-on-usb-endpoints-xhci?language=en_US contains more details, although apparently some further details are only available under NDA, but it looks like a mess.

Originally I found this page which explains how to connect USB3 hubs with USB2 cables to save a few USB IDs, but ultimately it does not contain the real solution which is:
If you need more than 32 devices, do not use (and disable) USB3/xhci
Yes, it is that sad, intel has actually designed a newer USB that is much much worse than the previous version as far as number of devices is concerned.

What wasn't clear to me is that xhci supports USB2 and USB1 devices, but no matter what devices you use (USB2 or USB1), you're still limited by that artificial 32 device limit that is due to the broken design of xhci as long as the xhci controller is handling those USB2/USB1 devices for you.
I've been told that some motherboards auto assign their USB ports to an ehci controller or xhci controller depending on what you plug into them. If so, this is the time to plug your USB3 hub with a USB2 cable to force the port to be routed to EHCI. This didn't work on the motherboard I tried on, however.

Now, the good news is that because motherboards try to work with older operating systems that may not support xhci, they usually provide an ehci controller too, the only issue is to get those USB ports assigned to the ehci controller(s).

How do you do this?

  • Turn off USB3 in the bios altogether (what I did). The supermicro motherboard I was using is old enough that it actually contains 2 ehci chips which then multiplied the number of devices you can plug in, gave me 8x more devices than when I had USB3 enabled (ehci can do close to 128 instead of 32 and 2 controllers instead of 1).
  • remove/blacklist the linux xhci driver modules. If the motherboard auto assigns xhci/ehci depending on what driver is loaded, this should work
  • If the motherboard only comes with an xhci controller, you are up a creek without a paddle, but you can still get an external USB2 PCI(-e) card: https://www.amazon.com/gp/product/B002RL8V7E "PCIe USB 2.0 Card - PCI-E USB 2.0 Card" actually comes with 2 USB1 controllers and one USB2 controller. It's not very clear how they are assigned (maybe dynamically depending on what is plugged into the ports). In either case the USB1 and USB2 have the high device limit you're looking for, but if somehow you're needing lots of devices (past 128), you may be able to get more out of the USB1.1 controllers (although at USB1 speeds, so that's probably not what you want). This is how that external card looks like
  • 06:04.0 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 62)
    06:04.1 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 62)
    06:04.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 65)

    Now, I found another interesting way to do this, on some motherboards you can reroute the USB ports to the USB2 chipset without changing the bios. See https://www.systutorials.com/241533/how-to-force-a-usb-3-0-port-to-work-in-usb-2-0-mode-in-linux
    In the case of my supermicro board, I didn't look at how the two EHCI (USB2) controllers were routed, but it had extra USB cables on the motherboard, so I bought USB headers installed them on the front, and moved some USB devices to them: https://www.amazon.com/gp/product/B00NMBXUXI .

    Note that you likely don't want to buy a USB-3 PCI(-e) card like https://www.amazon.com/gp/product/B00FPIMICA because it creates a new root hub but only allows a measly extra 30-ish devices to be added (vs 120+ with the USB2 card mentioned above).

    Big thanks to

  • Alan Stern who helped me figure this out in https://www.spinics.net/lists/linux-usb/msg175224.html
  • Ruchira Ravoori from fuchsia kernel team who explained things to me further and pointed me to https://forums.intel.com/s/question/0D50P00004905stSAA/hardware-limitations-on-usb-endpoints-xhci?language=en_US
  • 2018/12/15 Google Xmas Party
    π 2018-12-15 01:01 in Google
    We missed my new group's party last year as we were diving during that time, but this year we were back in time, and it was well worth it. Nice venue, not too crowded, and the food was much better than the last parties we attended.

    The Asian Art Museum was a nice venue:







    Seafood was actually good:





    As usual for those parties, people were dressed up nicely:



    And of course, we were in a museum, so some of the rooms were open for us too:



    We were there from open to close, and it was well worth it.

    See more images for Google Xmas Party
    2018/12/14 Trance Family SF Xmas Party: Cold Blue at Halcyon SF
    π 2018-12-14 01:01 in Clubbing
    This was a great year for Trance in San Francisco, time to top it off with a party.









    Video summary:

    2018/12/01 Diving Truk Lagoon with Truk Odyssey
    π 2018-12-01 01:01 in Diving
    Truk Lagoon (also called Chuuk), part of Micronesia, is a bit of a pain to fly to, mostly due to the fact that it gets very little air traffic and the 2 planes that fly there using a former Japanese built runway, do so at inconvenient times. It's SFO to HNL, then a long flight from HNL to Guam and one last flight from Guam to Truk. At least all of them use proper jet planes with normal luggage allowance.

    The history of the battle that happened in Truk Lagoon is fascinating, but in a nutshell, the Japanese forces were on the retreat and they knew they would be attacked, so they moved out all their big ships, but were not able to move out their smaller ships in time. They were all sunk in shallow waters, creating lots of artificial reefs that can now be dived. It is sobering to see the loss of Japanese life that happened there in all those boats that got sunk. At the same time, it is quite interesting to see this slice of history with bullets, bombs, tanks, parts of airplanes and trucks loaded on those boats, and sunk.

    Per recommendation, I booked with the Truk Odyssey, captained by Mike, an American who has dived all those wrecks probably more than anyone else, and did a really good video documentary on them, which we used for our dive briefings.

    Our Boat for the week
    Our Boat for the week

    The Truk Odyssey was a spacious boat with a great crew. The food was adequate but not beyond that, and the service was good but didn't match the Waow or Philippines Siren. That being said, it was more that good enough. A big plus was the knowledge of all the staff on the boat and their catering to people with rebreathers, double tanks, or fancy deco mixes. Their biggest downside IMO is that they only offer 5.5 days of diving while Trukmaster had the option of a 10 day trip instead of 7 days. Getting to Truk and back is a major pain, so doing a longer diving trip can make sense, and 8.5/9 days of diving may be a sweet spot.

    Back to Odyssey, we had a great dive guide, Bobo, who knew all the boats like the back of his hand and took us in dark corners we'd never have found or dared going on our own. His knowledge of all those wrecks sure came in handy and he was also quite funny:

    trying to fin the boat around to our buoy :)
    trying to fin the boat around to our buoy :)

    our dive guides spent deco time doing bubble ring wars, this one could make them with his fin, awesome!
    our dive guides spent deco time doing bubble ring wars, this one could make them with his fin, awesome!



    Even better, bubble rings with a fin kick:

    Some divers had a lot of heavy gear, so our boat had a nice lift to get you back out of the water:

    Truk had ok reefs that went on top of the sunk boats, but the sea life was still on the limited side compared to most places we've been to. Nonetheless, we saw a few nice things anyway:


    electric clam/anemone
    electric clam/anemone


    friendly looking leopard/zebra shark
    friendly looking leopard/zebra shark

    shark-ray
    shark-ray

    slipper lobster, cute eyes
    slipper lobster, cute eyes

    lots of nice soft corrals
    lots of nice soft corrals

    soft corals of all colors
    soft corals of all colors




    I was able to spot a humphead parrotfish, rare in that area
    I was able to spot a humphead parrotfish, rare in that area

    During the trip, Jennifer and I did the PADI wreck diving certification. It had some useful concepts, but its limitations made it not useful at all for the kinds of diving we did where we were deep in enclosed spaces (engine rooms) for up to 15mn or more at times. It would have been helpful if Jennifer and I did wreck diving on our own without guides, but it was so much more efficient to go with experienced guides, which we did have on the boat. At least we learned a few concepts like frog kicks to avoid silting out a wreck and making it hard to see. I also got to try a pony bottle, although I couldn't get certified for tech diving and doing deco on 50% or 100% O2.



    We did 4 dives per day on most day, with the option of a night dive, of which I did a few, but they were not earth shattering. We found lots of things on those boats, despite their age now, and many things having been eaten away by the seat.

    Random eating-ware, bottles, medicine vials, and also gas masks:


    lots of beer and sake bottles (sadly the corks failed and they were empty)
    lots of beer and sake bottles (sadly the corks failed and they were empty)





    drug vials
    drug vials


    Toilets and Japanese baths:




    Favourite parts of the ships were telegraphs (to send orders from one part of the boat to the other):




    Engine Rooms, lights:

    many doors taking us into the insides of the boats
    many doors taking us into the insides of the boats


    lots of light bulbs somehow survived the water pressure
    lots of light bulbs somehow survived the water pressure

    aptly named R2-D2 compressor
    aptly named R2-D2 compressor

    many light switches and plugs, it was tempting to try to turn them on :)
    many light switches and plugs, it was tempting to try to turn them on :)



    fire hose
    fire hose




    nice set of tools
    nice set of tools

    Gas cartridges, gas tanks, ammunition, bombs:


    bombs
    bombs

    bomb shells
    bomb shells



    Then, engines, plane parts, tanks, trucks, and more:

    truck engine, V6 maybe?
    truck engine, V6 maybe?


    plane parts, including wings, and fuel barrels
    plane parts, including wings, and fuel barrels

    nice propeller blades
    nice propeller blades

    airplanes fuel tanks
    airplanes fuel tanks

    airplane rotary engine
    airplane rotary engine


    baby tanks
    baby tanks


    The outside of the boats was interesting too. Several had huge canons, and others were laying on their side and you could see their prop


    Rio de Janeiro, formerly a cruise ship, was laying on its side
    Rio de Janeiro, formerly a cruise ship, was laying on its side


    We also went to dive one the Betty Bomber, a plane that had crashed and was at the bottom:


    Then, there was the San Francisco Maru, the deepest wreck you could dive. Deck is at 50m deep and it goes down to about 65m. We only went down to 55m, which allowed us to see the first level of the cargo hold (the lower ones were not safe for us to reach on our 24% nitrox mix). We prepared for that dive given how deep it was, and on 24% nitrox, we budgeted for only 12 minutes at the bottom. While it might seem like a long time, it sure wasn't, and even less so when I was fairly narc'ed (nitrogen narcosis), which for me caused me to struggle more at simple tasks:


    We had a fair amount of technical divers with proper dive gear, including rebreathers
    We had a fair amount of technical divers with proper dive gear, including rebreathers

    airplane rotary engine
    airplane rotary engine

    I was deep enough (55m) that my computer gave me a PPO2 warning (oxygen toxicity) instead of my depth
    I was deep enough (55m) that my computer gave me a PPO2 warning (oxygen toxicity) instead of my depth

    mines
    mines

    ladder down to even deeper where I couldn't go without trimix
    ladder down to even deeper where I couldn't go without trimix

    nice anchor
    nice anchor

    tank #1
    tank #1

    tank #2 and tank #3 on top of it
    tank #2 and tank #3 on top of it


    During the longish way up to deep deco stops on the way, Bobo, our guide, brought back the extra emergency air tanks none of us ended up needing:


    And that was it for the Odyssey: 24 dives (out of 27 possible) in 5.5 days of diving. While I wish we could have dived a bit longer and didn't have to wait 36H between our last dive and our flight, we sure got to see a lot during those dives, thanks again to our expert guide, Bobo, who made sure that each and every one of those dives counted.

    You can get a bit of a feel of what things looked like inside the boats with those videos:

    The last day, due to unfortunate timing of the rare United flight to Truk, we spent the entire day and a few hours of the night at Truk Blue Lagoon Resort for our flight nicely timed at 02:50 (ugh!)


    The founder of blue lagoon resort, a micronesian who documented what the Japanese did and started the first diving on those Japanese ships
    The founder of blue lagoon resort, a micronesian who documented what the Japanese did and started the first diving on those Japanese ships

    A nice map of all the dive sites in our area
    A nice map of all the dive sites in our area

    I got to see mud skippers for real, the coolest fish that can leave the water and hop on land
    I got to see mud skippers for real, the coolest fish that can leave the water and hop on land

    Lots of ruins left from the Japanese occupation
    Lots of ruins left from the Japanese occupation



    we went to say hi to the boat staff from a canoe
    we went to say hi to the boat staff from a canoe

    we're going to die! :)
    we're going to die! :)






    and after a mere 3H of sleep we had to wake up and go to the airport for TRK -> Guam -> HNL -> SFO. Sucky times.


    More pages: April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 October 2003 August 2003 July 2003 May 2003 April 2003 March 2003 January 2003 November 2002 October 2002 July 2002 May 2002 April 2002 March 2002 February 2002 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 May 2001 April 2001 March 2001 February 2001 January 2001 December 2000 November 2000 October 2000 September 2000 August 2000 July 2000 June 2000 April 1999 March 1999 September 1997 August 1997 July 1996 September 1993 July 1991 December 1988 December 1985 January 1980