# Hyperpixel 4.0" Portrait, Raspbian Stretch Lite

**URL:** <https://forums.pimoroni.com/t/hyperpixel-4-0-portrait-raspbian-stretch-lite/9033>\
**Category:** Support\
**Created:** [October 30, 2018, 10:27pm UTC](https://forums.pimoroni.com/t/hyperpixel-4-0-portrait-raspbian-stretch-lite/9033 "2018-10-30T22:27:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [October 31, 2018, 12:15pm UTC](https://forums.pimoroni.com/t/hyperpixel-4-0-portrait-raspbian-stretch-lite/9033/2 "2018-10-31T12:15:45Z")

</div>

There’s an alternate driver for the HyperPixel4 touchscreen which might help- details here- [https://github.com/pimoroni/HyperPixel4TouchScreen/tree/master/driver](https://github.com/pimoroni/HyperPixel4TouchScreen/tree/master/driver)

And also discussed at great length here: [https://github.com/pimoroni/HyperPixel4TouchScreen/tree/master/driver](https://github.com/pimoroni/HyperPixel4TouchScreen/tree/master/driver)

Granted this repository doesn’t tell you that you need to `make build` and `make install` to replace the `hyperpixel4.dtbo` with a modified one before using the rotation commands documented at the top. ( I need to fix that )

Edit: For clarity the rotation settings specified in the normal hyperpixel4.dts for the normal driver are just for 0 and 180 degrees landscape modes. It’s been a while, but I think I remember issues with portrait that the alt driver fixed.

Edit 2: for brevity:

```auto
wget https://github.com/pimoroni/HyperPixel4TouchScreen/releases/download/v1.0/hyperpixel4-goodix-dkms_1.0_all.deb
sudo dpkg -i hyperpixel4-goodix-dkms_1.0_all.deb
git clone https://github.com/pimoroni/HyperPixel4TouchScreen
cd HyperPixel4TouchScreen/driver
make build
sudo make install

```

And then in `/boot/config.txt` use:

- `dtoverlay=hyperpixel4:rotate_0` - Portrait, USB ports on top
- `dtoverlay=hyperpixel4:rotate_1` - Landscape, USB ports on left
- `dtoverlay=hyperpixel4:rotate_2` - Portrait, USB ports underneath
- `dtoverlay=hyperpixel4:rotate_3` - Landscape, USB ports on right

These all match the number you supply to `display_lcd_rotate=`.

Note: both Portrait orientations must have `framebuffer_width=480` and `framebuffer_height=800` specified instead of the defaults in `/boot/config.txt`.

---

_[View the full topic](https://forums.pimoroni.com/t/hyperpixel-4-0-portrait-raspbian-stretch-lite/9033)._
