I'm getting tired of waiting for HP to fix the switchable graphics driver for my laptop, but I think I can switch GPUs myself by calling ACPI methods. The switching works using vga_switcheroo in Linux, which is open source, so I know what methods I need to call, but not how to call them.
The two methods I need to call are in the SSDT namespace, if that matters, and I also need to pass integer arguments.