This is due to the Linux output modes not returning any GUID information, so your guid variable is retaining its uninitialized state. If you memset it before calling the function it will always come out as zero.

For Linux (as a work around) I’d recommend using the driver name directly (or as a hash) for the unique identifier.