One thing I forgot: "xrandr -o inverted" works as expected, but calling "xrandr -o normal" afterwards also causes the screen to go blank.