pcdshub / engineering_tools

A repository of scripts, configuration useful for the PCDS team
Other
4 stars 27 forks source link

FIX: pcds_conda, dev_conda: only set mesa if renderer is failing #133

Closed ZLLentz closed 2 years ago

ZLLentz commented 2 years ago

Description

Check if the server has a problem before switching the renderer library. This is WIP because it is messy and littered with echo and I'm not sure if it's even fully right.

Motivation and Context

Setting the __GLX_VENDOR_LIBRARY_NAME didn't work for all consoles. For many cases it actually created a problem rather than solving it.

Only do it if we definitely fail without it.

That is, when:

How Has This Been Tested?

Heavily interactively.

Where Has This Been Documented?

N/A

ZLLentz commented 2 years ago

Anecdotally, I think I never have hit the warning trigger, nor could I ever make it happen again in testing now. Previously I wasn't getting the return code out of the glxinfo command properly due to some things I was doing wrong, so I was parsing for the error text instead. But since I'm not messing that up any more it should suffice to just check the error code to see if there is a problem or not.

So I will:

ZLLentz commented 2 years ago

I think this is simplified to the important bits now, I still need to waltz to XPP for another check

ZLLentz commented 2 years ago

I've double checked that this works for my laptop to any -control, for tmo-control -> tmo-daq, for xpp psusr -> xpp-control, and from rix-console -> rix-montitor

I think the more concise expression in this version is pretty good

ZLLentz commented 2 years ago

I'm going to throw this into live latest for engineering tools to eliminate the echo statements and etc. and wait for Ken's approval too in case there's some way he sees that this can be cleaner

ZLLentz commented 2 years ago

Goal is to merge and tag engineering tools again afterwards