# Which current laptop is best suited to run PTB?

**URL:** https://psychtoolbox.discourse.group/t/which-current-laptop-is-best-suited-to-run-ptb/4019
**Category:** Hardware
**Tags:** linux, gpu
**Created:** [September 22, 2021, 11:46pm UTC](https://psychtoolbox.discourse.group/t/which-current-laptop-is-best-suited-to-run-ptb/4019 "2021-09-22T23:46:29Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)
#### Post date: [September 24, 2021, 7:37pm UTC](https://psychtoolbox.discourse.group/t/which-current-laptop-is-best-suited-to-run-ptb/4019/2 "2021-09-24T19:37:18Z")

</div>

> [@jdaume](#):
>
> Authentication token:
> 
> PESZDYNL-2021922152741:b13ec6d5b1f345fa3de058c47f3a4343313ab1a92470a11252a45099ce1f07b6
> 
> Hi,
> 
> this question has been asked earlier but the answers might already be a bit outdated. Our lab would like to buy a new laptop computer for running visual stimulation experiments. Since linux Ubuntu seems to be the best solution, this would be the OS of our choice. Is there any current linux laptop model that is best suited to run PTB on? We are thinking of something in this direction, but are of course open to other recommendations in case these laptops are not well suited for Linux or PTB:

Hi Jonathan. The answers are likely the same. Linux is the right choice. Ubuntu 20.04.3-LTS is currently the distribution best tested and recommended for most use cases, although other similar distros might work as well – unsupported and untested in case of problems though.

**Disclaimer:**

Wrt. hardware, irrespective of operating system choice, I can only mostly guarantee that hardware works flawlessly with any given operating system version, that i have tested myself.

Given the minimal financial resources we have, because way too few labs contribute by buying community memberships with priority support, and therefore lack of money to buy and test new hardware, my tested hardware is usually multiple years behind the state of the art.

Atm. PTB on Linux is actively tested on a 11 years old MacBookPro 2010, a 4 years old MacBookPro 2017, a 3 years old Microsoft Surface Pro 6 from 2018, and a cheap \> 3.5 years old ~500 Euros, AMD Ryzen 5 2400G PC from early 2018’ish. The test set for Windows is only the 3.5 year old PC and Surface Pro tablet. macOS Catalina is only tested on the MBP 2017.

Any other advise is just based on feedback i see here on the forum, or theoretical knowledge, or other 3rd party info from Google searches. That said, i’m pretty knowledgable about that, so i hope my advices is usually not too much off.

In principle any machine with Intel or AMD graphics should work well with Linux + Psychtoolbox, unless a Google search indicates specific problems. In general, buying not the very latest machine, but maybe \>= 6-12 months old, will increase the chance of good hardware support in current Linux distributions out of the box. There are also companies which provide dedicated Linux laptops, so if you can buy from them and avoid machines with NVidia graphics, that would be a quite safe choice. Companies like Dell or i think Lenovo and others also have some dedicated Linux offerings.

For highest performance and best functionality, you’d want to get AMD, so your two proposed laptops already check that box. Both look suitable on paper for not too demanding use cases, and what you describe - static image presentation or short movies, no fancy special external displays / HDR monitors / special visual stimulators / VR applications / high resolution and framerate displays - falls into the category of not too demanding use cases.

That said, something that is not easy to judge is the quality of the laptop internal flat panel display wrt. color/contrast reproduction, pixel response time, viewing angle, glare etc. So if you need very precise timing, the limiting factor for your stated use cases wouldn’t be PTB/Linux or the graphics card, but the quality of the display.

Wrt. visual timing/timestamping, both Intel and AMD gpu’s under Linux provide the highest technically possible precision and reliability. Timestamps are almost microsecond accurate and frame accurate timing should be perfect, as long as you don’t overload the gpu with too much drawing or write highly suboptimal code in your script. This recent thread gives various tips for performance optimizations on underpowered gpu’s: [Timing issues/Missed frames on Dell XPS13 Ubuntu 18.04](https://psychtoolbox.discourse.group/t/timing-issues-missed-frames-on-dell-xps13-ubuntu-18-04/3751)

The timing/timestamps however always refer to when a new frame arrives at the input of the display panel controller. How well that translates into the actual timing of emitted light depends on the properties of the specific display panel, and only photodiode measurements or similar external hardware measurements can give certainty.

> [@](#):
>
> Lenovo IdeaPad5 15.6" FHD Premium Laptop 8-Core AMD Ryzen 7 4700U AMD Radeon RX Vega 7 16GB RAM DDR4 512GB M.2 NVMe SSD  
> [https://www.amazon.com/Lenovo-IdeaPad5-Premium-Fingerprint-Accessories/dp/B098LXMSDQ/ref=sr\_1\_5?dchild=1&keywords=amd+radeon+rx+laptop&qid=1632352193&sr=8-5](https://www.amazon.com/Lenovo-IdeaPad5-Premium-Fingerprint-Accessories/dp/B098LXMSDQ/ref=sr_1_5?dchild=1&keywords=amd+radeon+rx+laptop&qid=1632352193&sr=8-5)

With the caveat that display quality of both laptops is unknown, I would probably recommend this machine for you, ie. the Lenovo IdeaPad5 15.6" FHD Premium Laptop 8-Core AMD Ryzen 7 4700U.

According to a Phoronix test under Ubuntu 20.04-LTS, the Lenovo IdeaPad5 with Ryzen 7 4700U seems to perform very well on Linux - i think this is literally the machine you proposed:

> **[I've Been Running The AMD Ryzen 7 4700U + Ubuntu 20.04 As My Main System](https://www.phoronix.com/news/Ryzen-7-4700U-Daily-Driver)**
>
> For about one and a half months now I have been using the AMD Ryzen 7 4700U as my main laptop paired with Ubuntu 20.04 LTS

The hardware in this machine is also more modern than the one in the Lenovo Thinkbook 14s, and AMD processors + integrated gpu’s are currently considered much better price/performance than Intel. Especially on the graphics side.

However, both should be fine, at least on paper.

> [@](#):
>
> Lenovo Thinkbook 14s Premium Business Ultrabook, Linux Mint, Intel Quad Core i5-8265U, 256B PCIe SSD, 16GB RAM, 14" FHD IPS 1920x1080, Radeon 540X 2GB Graphics  
> [https://www.amazon.com/Lenovo-Thinkbook-Business-Ultrabook-1920x1080/dp/B084ZVPYFS/ref=sr\_1\_2?dchild=1&keywords=linux+laptop&qid=1632353559&refinements=p\_n\_operating\_system\_browse-bin%3A7817221011%2Cp\_n\_size\_browse-bin%3A2423840011&rnid=2242797011&s=pc&sr=1-2](https://www.amazon.com/Lenovo-Thinkbook-Business-Ultrabook-1920x1080/dp/B084ZVPYFS/ref=sr_1_2?dchild=1&keywords=linux+laptop&qid=1632353559&refinements=p_n_operating_system_browse-bin%3A7817221011%2Cp_n_size_browse-bin%3A2423840011&rnid=2242797011&s=pc&sr=1-2)
> 
> Most important to us is an excellent visual stimulation timing. We mostly present static pictures, but some experiments also contain short movie clips. Sound is currently not important. We use Cedrus response boxes and would like to use the Cedrus C-Pod to send TTL event markers to our Neuralynx depth electrode recording system. All stimuli would be presented on the laptop screen itself, so no second screen setup is currently needed. Luminance and color properties are also somewhat secondary but of course not unimportant.

From what i’ve quickly read, the Cedrus C-Pos should be accessible via USB-Serialport emulation. Their sample Matlab code claims an awful 5-7 msecs precision, but it uses Matlab’s serial port functions, which i haven’t tested in a while, but in the past they had very inferior timing performance compared to PTB’s IOPort driver, so i’d guess rewriting that sample code to use IOPort might give better results. Unless ofc. this is a problem of the Cedrus device and firmware. In the past, Cedrus wasn’t great in that area, but 10 years have elapsed since my last tests, so maybe that is less of an issue now.

> [@](#):
>
> Thanks for any advice and recommendations!
> 
> Best,  
> Jonathan

Hope the advice is useful,  
-mario

[Time spent on support request: 2 hours - priority support contingent used up for this license.]

---

_[View the full topic](https://psychtoolbox.discourse.group/t/which-current-laptop-is-best-suited-to-run-ptb/4019)._
