Finding a laser printer that works out of the box for Linux (e.g. Ubuntu or Debian) is not so trivial: Open source drivers are rare [ycomb] [hack] [reddit], and even usually supportive producers like HP have only a limited selection of compatible printers. My sources are:
Notable printer producers are:
One speciality of this article: The printer must be compact, here meaning having less than 50x37cm (width, depth) ground area.
Back in the day, I bought a HP LaserJet 1100A (printer and scanner), which is an entry model: B/W, no duplex, no internal paper tray. Apart from hardware problems like paper separation, it can be installed directly under Debian using OP:L1100A open source drivers.
I have used my 1100A sporadically for 20 years now and apart from cartridge changes, only using single paper sheets, and the occasionally required reboot when using an HP JetDirect 170 print server, there are no issues. And with only 37x33x38cm (width, depth, height) it fits well within the 54x37cm (width/depth) of my Besta server cupboard.
As a list of possible color laser duplex printers, my 2020 version of James Hayden's 2019 collection:
The LaserJet M283fdw has Linux support since HPLIP 3.19.12 [book], unfortunately Ubuntu 18.04 (LTS) has 3.17.10 only, luckily Ubuntu 20.04 (LTS) comes with 3.20.3, and Ubuntu 22.04 (LTS) has 3.21.12. Has wired LAN and duplex too.
Dimensions of the M238fdw are 43x48x34cm (width, depth, height), a lot more depth than the Besta 37cm can contain. It seems that all of the color laser duplex printers have a similar depth problem, with Brother L3750CDW at 41x51x41cm, Lexmark MC3224dwe at 42x40x31cm (10cm better than the rest), Canon MF641Cw at 46x46x36cm, and Xerox 6515/DNI at 42x51x50cm.
As far as I know, the only compact color laser printer (without duplex) was the Samsung CLP-300N (2004) [manual] [fix] at 39x35cm, but OP:CLP300 Linux support consists of an outdated binary blob and the hope that foo2qpdl will work. Its design seems quite experimental and there are many user reports of unreliability.
Note that HP bought Samsung Printing in 2017 but no HPLIP integration took place, and the product line in general seems to be discontinued.
While compact color lasers are difficult, maybe monochrome and duplex is a valid combination with less than 37cm depth.
Looking at HP monochrome duplex printers, e.g. the M406dn at 38x36cm with wired LAN is small enough, and can work with HPLIP 3.21.2 while Ubuntu 20.04 (LTS) has only 3.20.3.
A side look at the HP color laser printers: The M255dw at 39x42cm is the smallest already, included in HPLIP 3.19.12.
The Brother monochrome duplex printer HL-L2350DW is small enough at 36x36cm, and runs partly under Linux according to the related OP:L2360D; nominally it supports Linux CUPS even in the presence of the dreaded Windows-only GDI. While "DW" apparently means "duplex, wireless" but no LAN, the L2370DN comes with LAN port, and the L2375DW has both.
Update 2023-01: I bought a L2370DN (LAN-only) and it works well with Ubuntu 2020 (Focal) and 2022 (Jammy), but not with 2018 (Bionic) even when installing the deb driver from the Brother website. Thanks to IPP Everywhere discovery, the printer is found without any OS setup and can be used immediately from e.g. LibreOffice. To confirm (and get the same printer twice), use ippfind. The 36x36cm [unbox] do not hold completely, as the power cable stub adds another 5cm at the rear, so I had to rotate the printer 90° to fit my cupboard.
A side look at the Brother color laser printers confirms that they are all in the rather large 41x49cm range, e.g. the L8260CDW with the related OP:L8360CDW indicating the same partial Linux support. Rather not recommended.
Over at Lexmark duplex printers (color and b/w), e.g. the monochrome B3442dw at 37x37cm does fit, while the color C3426dw at 42x40cm does not. Both claim Ubuntu 18.04 support, and OP:C3426dw and the older OP:B2442dw support this.
At Canon monochrome printers, e.g. the LBP226dw at 40x38cm is almost small enough, but has no OpenPrinting entry, with the nearest OP:LBP310 requiring a binary blob. On the front of Canon color printers, the LBP623Cdw at 43x42cm is too large, and according to the related OP:MF623Cdw hard getting to work. Rather not recommended.
At Xerox laser printers, e.g. the monochrome B210 at 37x34cm is pretty small but does not even have an OP:B210 entry though it claims to support Ubuntu 18.04 by binary blob. On another product line, the Phaser 3330 at 37x37cm claims "various Linux distributions" but again unmentioned in the OpenPrinting entries, which also detail a fair amount of grief with Xerox printers. Rather not recommended.
So compact B/W laser duplex printers are possible, unlike compact color laser duplex printers.
Color-wise, I am stuck so far with my 37cm depth requirement: Color laser duplex printers just take too much space, so a B/W auto-duplex printer had to do in 2023. If you have similar concerns, I hope you could get some knowledge. Have a good day!EOF (Jan:2023)