Hardware known to work with KlipperScreen

pretty simple and cheap touch display with GPIO connection

I bench tested a Kuman 3.5" screen this weekend. It appears to be identical to the Elegoo linked above. It works, but with the small screen and low resolution text is a bit difficult to read in KlipperScreen.

Kuman 3.5" Touchscreen

5inch HDMI Display-B - LCD wiki working fine here

I got the VOCORE Screen running. But only in portrait mode.
startx shows an error if i set the rotate option.
It is nice to connect it simply with USB.

I got the VoCore working now.

#Update system and kernel
sudo apt-get update
sudo apt-get upgrade
sudo reboot
#install kernel-headers
sudo apt install raspberrypi-kernel-headers

#get vocore ande compile the driver
#use /temp to free the space after reboot.
cd /tmp
wget https://github.com/Vonger/vocore2/archive/refs/heads/master.zip
unzip master.zip
cd /tmp/vocore2-master/utils/fbusb/src
#make vocore driver
make -C /usr/src/linux-headers-$(uname -r ) M=$PWD modules
sudo insmod fbusb.ko
sudo cp fbusb.ko /lib/modules/$(uname -r)/kernel/drivers/

#Add fbusb.ko to load.d
sudo nano /etc/modules-load.d

#1. set screen to black: 
dd if=/dev/zero of=/dev/fb1 bs=1000 count=768

#2. set screen to random pixel: 
dd if=/dev/urandom of=/dev/fb1 bs=1000 count=768

#Set Console output to LCD
#add fbcon=map:10 to cmdline.txt
sudo nano /boot/cmdline.txt

#Test console
sudo FRAMEBUFFER=/dev/fb1 startx

#https://klipperscreen.readthedocs.io/en/latest/Installation/
#KlipperScreen Installation
cd ~/
git clone https://github.com/jordanruthe/KlipperScreen.git
cd ~/KlipperScreen
./scripts/KlipperScreen-install.sh

#remove fbturbo and use fbdev
sudo rm /usr/share/X11/xorg.conf.d/99-fbturbo.conf

sudo nano /usr/share/X11/xorg.conf.d/99-fbdev.conf
#Add this text ans save
Section "Device"
	Identifier "LCD"
	Driver "fbdev"
	Option "fbdev" "/dev/fb1"
	Option "Rotate" "CW"
	Option "SwapbuffersWait" "true"
EndSection

#Rotate the touch input too
sudo nano /etc/udev/rules.d/51-touchscreen.rules
#add to file
ACTION=="add", ATTRS{name}=="VoCore Touch", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1 0 0 1"

#In the KlipperScreen documentation is this metioned to test the touch rotation.
DISPLAY=:0 xinput set-prop "VoCore Touch" 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1
#But the /51-touchscreen.rules changes the 'libinput Calibration Matrix' and not 'Coordinate Transformation Matrix'.
#but you can test the 'libinput Calibration Matrix' as well.
DISPLAY=:0 xinput set-prop "VoCore Touch" 'libinput Calibration Matrix' 0 1 0 -1 0 1 0 0 1
1 Like

8 posts were split to a new topic: [How To] Klipper Screen on Android Smart Phones

WAVESHARE 4.3 inch DSI LCD works like charm. Without any additional settings needed.
https://www.waveshare.com/4.3inch-dsi-lcd.htm

1 Like


DFrobot DFR0550 works like a charm. Connect and run no settings change needed.
Colors sharpness are way better than the picture shows.

2 Likes

This thread is intended to be a list of screens known to work. If you’re having problems getting KlipperScreen to work, please start a new thread so this one doesn’t become cluttered.

2 Likes

Where did you get that case for it?

On the RPi4 it’s /dev/fb0 for me. On the RPi3 it was /devf/fb1.

And to get it to work you need to change this part.

Don’t use:

#Add fbusb.ko to load.d
sudo nano /etc/modules-load.d

Use this instead:

#Load driver at startup
sudo /sbin/depmod -a

I successfully run KlipperScreen with touch on the:
Waveshare 7inch HDMI LCD (B) 800x480 v 1.1. (with reflashed firmware)

Open firmware for Waveshare 7" capacitive touchscreen

I took a .bin file from promzona1 (see project issues) and flashed with ST-link V2 under Windows.
The chip on my board is GD32F103.
Then i using it as 1024x600 screen with Raspberry Pi.
/boot/config.txt
disable_overscan=1
overscan_right=225 // these may be different
overscan_bottom=105 // these may be different
framebuffer_width=1024
framebuffer_height=600
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
max_usb_current=1
hdmi_cvt 1024 600 60 0 0 0 0
hdmi_drive=1

At this point you get well adjusted screen but X for the touch was swapped. I not try recompile firmware.
Install edev.

sudo apt-get install xserver-xorg-input-evdev
sudo mv /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf

edit /usr/share/X11/xorg.conf.d/45-evdev.conf

Section “InputClass”
Identifier “evdev touchscreen catchall”
MatchIsTouchscreen “on”
MatchDevicePath “/dev/input/event*”
Driver “evdev”
Option “InvertX” “true”
EndSection

Reboot.

Now all work fine!!!

Hi,

I can use and old phone or a tablet with Klipper Screen?

If yes… Where I can find a guide…

Mainsail control webpage its too dense for a 5" old phone…

MKS TS35, I have it working connected via SPi to raspberry by, tested with kernel 5.10.97-v7 and 5.10.63-v7

1 Like

ElecLab Raspberry Pi Touchscreen Monitor 5 Inch DPI IPS Capacitive LCD Display 480x854 Speaker Bracket for Raspberry Pi 4B 3B+ 3B 3A+ 2B A+ B+

Amazon Link

Super simple install:

cd ~
git clone https://github.com/brunnels/5inch_480x854
cd 5inch_480x854
sudo cp config.txt /boot/
sudo cp eleclab-dpi5inch.dtbo /boot/overlays/

If you want to rotate the screen follow these instructions

I did notice that if you use raspi-config to change settings in the /boot/config.txt file it will cause the kernel boot screen to not rotate so just edit that file manually if you need to.

It was a bit of a pain, but I got the Wave Share 5.5inch HDMI AMOLED.

Had to add the below to config.txt to get the display to show anything sensible

#AMOLED SETTINGS
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
#display_hdmi_rotate=1 //Doesn't work with RPi4
hdmi_force_hotplug=1
hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3
hdmi_group=2
hdmi_mode=87
hdmi_ignore_edid=0xa5000080

Rotating the screen to the proper orientation proved challenging. The config.txt rotate commands don’t work with the raspberry pi4. I couldn’t get the xorg configuration to rotate the display. When I added kernel commandline parameters to rotate the display, that worked for the initial verbose boot screen… but once KlipperScreen loaded, it was the wrong orientation.

I ended up having to modify the init function in screen.py as below, but it’s pretty hacky. Not sure if there’s a better way on a raspberry pi 4. But… it works

    def __init__(self, args, version):
        self.version = version

        configfile = os.path.normpath(os.path.expanduser(args.configfile))

        self._config = KlipperScreenConfig(configfile, self)
        self.lang = self._config.get_lang()

        logging.debug("OS Language: %s" % os.getenv('LANG'))

        settings = Gtk.Settings.get_default()
        logging.info("Font settings: %s" % settings.get_property('gtk-font-name'))

        self.lang_ltr = True
        for lang in self.rtl_languages:
            if os.getenv('LANG').lower().startswith(lang):
                self.lang_ltr = False
                Gtk.Widget.set_default_direction(Gtk.TextDirection.RTL)
                logging.debug("Enabling RTL mode")
                break

        _ = self.lang.gettext

        Gtk.Window.__init__(self)
        monitor = Gdk.Display.get_default().get_primary_monitor()
#        self.width = self._config.get_main_config().getint("width", monitor.get_geometry().width)
#        self.height = self._config.get_main_config().getint("height", monitor.get_geometry().height)
        self.height = self._config.get_main_config().getint("width", monitor.get_geometry().width)
        self.width = self._config.get_main_config().getint("height", monitor.get_geometry().height)
        self.set_default_size(self.width, self.height)
        self.set_resizable(False)
        if self.width < self.height:
            self.vertical_mode = True
        else:
            self.vertical_mode = False
        logging.info("Screen resolution: %sx%s" % (self.width, self.height))
        self.theme = self._config.get_main_config_option('theme')
        self.show_cursor = self._config.get_main_config().getboolean("show_cursor", fallback=False)
        self.gtk = KlippyGtk(self, self.width, self.height, self.theme, self.show_cursor,
                             self._config.get_main_config_option("font_size", "medium"))
        self.keyboard_height = self.gtk.get_keyboard_height()
        self.init_style()

        self.base_panel = BasePanel(self, "Base Panel", False)
        self.add(self.base_panel.get())
        self.show_all()
        self.base_panel.activate()

        self.printer_initializing(_("Initializing"))

        self.set_screenblanking_timeout(self._config.get_main_config_option('screen_blanking'))

        # Move mouse to 0,0
        os.system("/usr/bin/xdotool mousemove 0 0")
        self.change_cursor()
        self.initial_connection()

        os.system("xrandr --output HDMI-1 --rotate right")
        os.system("xinput set-prop \"WaveShare WaveShare\" \'Coordinate Transformation Matrix\' 0 1 0 -1 0 1 0 0 1")

Yes: https://i.imgur.com/NiIddZY.png

  1. Using an Android device with KlipperScreen – Angel's Personal Blog
  2. GitHub - naruhaxor/AndroidKlipperScreen: a simple writeup /installer script to use android Devices and a UI for KlipperScreen for RaspberryPI
  3. [How To] KlipperScreen on Android Smart Phones

These are useful and almost identical, but have subtle nuanced differences that could prove beneficial. The first, for example, helped me by pointing me to java - adb devices => no permissions (user in plugdev group; are your udev rules wrong?) - Stack Overflow which helped with getting ADB to recognize that I had my phone connected as an adb target and also pointed me to an old version of XSDL that was needed for my old Android v6 phone. The second has some pointers about wireless that I’ve yet to try. On my Note 10+ I was able to get wireless adb running and was able to have a wireless KlipperScreen UI for the printer. On the Note 10+ I was able to use the current release of XSDL, from the Google Play Store, and did NOT need to load the old version manually via adb install.

Of note: On the newer versions of XSDL, there is indeed a ‘Desktop No Emulation’ mode for mouse emulation (which is the appropriate selection to make use of). However, on the older v1.11.40 version, I needed to select tablet/laptop emulation, then turned off all of the config options on the mouse emulation submenu, and finally calibrated the lcd, so that my touches would be passed through to KS so it could do it’s thing. If it looks like it is not functional, it may very well be that the mouse emulation is jacked up.

Also, be advised that it might look like the Web UI (Mainsail in my case) was not operable when KS was working. I found that once KS got started, if you close the web UI and then reopen it, that Moonraker is indeed able to serve both Mainsail UI web clients concurrently with the KlipperScreen device hooked locally to the Klipper Host (and Telegram Bot too, btw). I can’t speak for other MR clients like Fluidd or Mooncord. Other useful and likely relevant guidance:

OSOYOO 5" DSI V2.1 works very well incl. DPMS.

https://osoyoo.com/2019/09/20/instruction-for-raspberry-pi-5-dsi-touch-screen/

V1 and V2 does not support DPMS → Screen LEDs stay on.

G’day…Im having massive issues calibrating my touch on the VoCore any calibration suggestions?