We develop an algorithm that solves the inverse kinematics of general serial 2RP3R, 2R2P2R, 3RP2R and 6R manipulators based on the HuPf algorithm. We identify the workspaces of the 3-subchains of the manipulator with a quasi-projective variety in $\mathbb{P}^7$ via dual quaternions. This allows us to compute linear forms that describe linear spaces containing the workspaces of these 3-subchains. We present numerical examples that illustrate the algorithm and show the real solutions.