# Devterm printer kernelspace driver

**URL:** <https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490>\
**Category:** DevTerm\
**Created:** [November 28, 2021, 2:15pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490 "2021-11-28T14:15:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [November 28, 2021, 2:15pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/1 "2021-11-28T14:15:44Z")

</div>

> **[GitHub - korneliuszo/devterm-printer](https://github.com/korneliuszo/devterm-printer)**
>
> Contribute to korneliuszo/devterm-printer development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [November 29, 2021, 8:40am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/2 "2021-11-29T08:40:06Z")

</div>

Ink is running out.

 ![IMG20211129091122](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/5/503c8d14955f84b0a1517794d95200289b864352.jpeg)

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [November 29, 2021, 10:18am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/3 "2021-11-29T10:18:42Z")

</div>

Grayscale print

 ![IMG20211129111633](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/b/bff2a3bc4e0ebc441e88c861a6f5788d5f29ed05.jpeg)

---

<div class="post-metadata">

**Author:** ![Petrakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/petrakis/32/256_2.png) [@Petrakis](https://forum.clockworkpi.com/u/Petrakis)\
**Post date:** [November 29, 2021, 10:20am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/4 "2021-11-29T10:20:17Z")

</div>

Amazing print! I have to try it one of these days when I solve the pigment deposition issue.

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [November 29, 2021, 10:59am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/5 "2021-11-29T10:59:56Z")

</div>

hitherdither library

 ![IMG20211129115836](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/2/23909969c555fc0e1663248e894b4fd88ed11012.jpeg)

---

<div class="post-metadata">

**Author:** ![iamcco](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/iamcco/32/4547_2.png) [@iamcco](https://forum.clockworkpi.com/u/iamcco)\
**Post date:** [November 30, 2021, 1:32am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/6 "2021-11-30T01:32:29Z")

</div>

Can you explain what’s this?

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [November 30, 2021, 6:11am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/7 "2021-11-30T06:11:45Z")

</div>

It’s kernelspace driver which you use instead of devterm-printer.service  
no CUPS yet.  
See prepare ([No devterm linux headers package](https://forum.clockworkpi.com/t/no-devterm-linux-headers-package/7481)) and install files.  
see py scripts for userspace interface.

As burn parameters are exposed via ioctl it is possible to do grayscale image.

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [November 30, 2021, 5:32pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/8 "2021-11-30T17:32:51Z")

</div>

![b](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/e/eb53bbb70d0298bc016c6721fe23e47d45744dc5.jpeg)  
For me effect which I wanted is realised.

BTW: Font borrowed from 24-pin matrix - here python scripts to export/render this font in python [GitHub - korneliuszo/png2escp](https://github.com/korneliuszo/png2escp)

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [December 7, 2021, 4:26pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/9 "2021-12-07T16:26:38Z")

</div>

![image](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/d/d7a5400aa0f7da8fe73d7647051396b27605fbfa.jpeg)  
Done cups driver

---

<div class="post-metadata">

**Author:** ![Anthony\_Motyka](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/anthony_motyka/32/4764_2.png) [@Anthony\_Motyka](https://forum.clockworkpi.com/u/Anthony_Motyka)\
**Post date:** [December 10, 2021, 8:08am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/10 "2021-12-10T08:08:12Z")

</div>

This looks very cool, to install the cups driver do I need to follow the previous prepare and install instructions or just follow the cups install?

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [December 10, 2021, 1:38pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/11 "2021-12-10T13:38:12Z")

</div>

Yes you need to install driver.  
You can copy .ko file to /lib/modules/${uname -r}/ and do depmod for auto loading module

---

<div class="post-metadata">

**Author:** ![pnkizma](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@pnkizma](https://forum.clockworkpi.com/u/pnkizma)\
**Post date:** [December 15, 2021, 7:23pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/12 "2021-12-15T19:23:42Z")

</div>

new here, i’m trying to install this driver but i’m having problems to compile it.

appears an error if i try to compile… any tips or help please??

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [December 15, 2021, 7:56pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/13 "2021-12-15T19:56:13Z")

</div>

It’s probably problem which occured for me too.  
Linux kernel changed revision in armbian but devterm team didn’t update its linux build.  
Try installing [https://mirrors.dotsrc.org/armbian-apt/pool/main/l/linux-5.10.60-rockchip64/linux-headers-current-rockchip64\_21.08.1\_arm64.deb](https://mirrors.dotsrc.org/armbian-apt/pool/main/l/linux-5.10.60-rockchip64/linux-headers-current-rockchip64_21.08.1_arm64.deb)

---

<div class="post-metadata">

**Author:** ![pnkizma](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@pnkizma](https://forum.clockworkpi.com/u/pnkizma)\
**Post date:** [December 17, 2021, 9:04pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/14 "2021-12-17T21:04:22Z")

</div>

thanks a lot for the reply, solved my problem when i compile the driver 😃 but i think i’m making some mistakes when i try to make it autoload or similar ☹  
i tried insmod, modprobe, copy the .ko file on the modules directory, etc… but the driver didn’t load automatically on booting the system 😢  
how i can proceed for install the driver correctly (surely i’m wrong on some step when i try to install it)

another detail i found when i try the github codes it’s on the python scripts… keep appearing an error like this and make impossible to use it… any help??

> OSError: [Errno 25] Inappropiate ioctl for device

this error appear on mtp02\_ioctl.py :: get\_settings (looks like on the code the device is ‘iiii’ or maybe this is a problem related to driver installation…)

sorry for keep disturbing with these questions, and thanks a lot for any help 😃

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [December 17, 2021, 10:39pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/15 "2021-12-17T22:39:05Z")

</div>

I’ve put .ko into  
/lib/modules/5.10.60-rockchip64/mtp02/mtp02.ko  
and then run depmod, and it loads at start of system.

For ioctl I think you made file called /dev/mtp02.0 which souldn’t be made - it’s udev role to create it.

---

<div class="post-metadata">

**Author:** ![pnkizma](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@pnkizma](https://forum.clockworkpi.com/u/pnkizma)\
**Post date:** [December 28, 2021, 4:50am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/16 "2021-12-28T04:50:36Z")

</div>

(sorry was quite busy last days…)  
hope all of you had an awesome christmas 😃

back to topic, i tried the depmod and keeps without being automatically loaded…  
i found this error into “/var/log/kern.log” file:

> mtp02: loading out-of-tree module taints kernel.  
> mtp02: module verification failed: signature and/or required key missing - tainting kernel.

looks like exists some kind of error when the kernel load the module… and i tried to apply on the “Makefile” the line “CONFIG\_MODULE\_SIG=n” to bypass this check but looks like keeps having the same problem…

maybe you’re using other type of OS image or similar? (autocompiled or something?)

related to the /dev/ file, i checked and it’s automatically created, for this part looks like nothing wrong but keeps throwing the same problem when try to use the python codes.

Thanks a lot for any help 😃

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [December 28, 2021, 7:12am UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/17 "2021-12-28T07:12:37Z")

</div>

taint kernel is normal.

creating /dev/ means dtbo is applied correctly

2021-12-21 - I’ve changed ioctl structure - you need have module/python code in sync.

bwprint.py should work without problems.

can you strace ./grayprint.py ?

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [January 17, 2022, 4:13pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/18 "2022-01-17T16:13:23Z")

</div>

Made aur packages for tools from repo:

> **[GitHub - korneliuszo/devterm-aur](https://github.com/korneliuszo/devterm-aur)**
>
> Contribute to korneliuszo/devterm-aur development by creating an account on GitHub.

Needs image 20220117 or updated u-boot.  
For running dkms you need to install linux-clockworkpi-a06-headers manually.  
Also you need to append /boot/extlinux/extlinux.conf  
with line

```auto
FDTOVERLAYS /overlays/mtp02-a06-devterm.dtbo

```

---

<div class="post-metadata">

**Author:** ![sympodius](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/sympodius/32/6272_2.png) [@sympodius](https://forum.clockworkpi.com/u/sympodius)\
**Post date:** [May 2, 2022, 4:50pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/19 "2022-05-02T16:50:27Z")

</div>

Apologies, the forum wouldn’t let me post again in the manjaro-linux-support topic. But here is the print-to-file you requested. Thanks again for your help!

[output.pdf](https://www.dropbox.com/s/3wit7jken61rfm4/output.pdf?dl=0)

---

<div class="post-metadata">

**Author:** ![korneliuszo](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@korneliuszo](https://forum.clockworkpi.com/u/korneliuszo)\
**Post date:** [May 4, 2022, 3:44pm UTC](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490/20 "2022-05-04T15:44:41Z")

</div>

Fixed in new version of driver.

Update package from aur and modify printer in cups to reload ppd file

[Next page](https://forum.clockworkpi.com/t/devterm-printer-kernelspace-driver/7490.md?page=2)
