Trying to use Raspberry Pi 4 as a desktop: results and impressions

Hi, Habr.



Since the introduction of the Raspberry Pi 4, there have been many more people wanting to use this microcomputer as their main PC. The processing power of the Pi4 is already pretty good, and full-fledged Linux on board sounds promising. I have long been interested in the possibility of using a portable and silent PC for simple tasks like typing this text, where the "real" desktop is redundant and the tablet is inconvenient. I bought a top-of-the-line Raspberry Pi 4 with 8GB of memory - it's time to see how it works.







For those who are interested in what came of it (spoiler - not everything works yet), see the details under the cut.



Why is this necessary?



Of course, the motivations for using the Raspberry Pi can vary. Someone may need an inexpensive Linux desktop for learning. Someone may have no money at all for a full-fledged PC. I have long wanted to have a 100% silent and low-power computer to use as a media center and "typewriter". I have already described the experience of using Samsung DeXas a desktop, and the overall experience was very positive - for typing and watching videos on the big screen, the power of my Galaxy S10 is enough. But the amount of software for Android that can fully work in desktop mode is very limited, and not every site is displayed correctly for Android in desktop mode. For example, here on Habré there are no tooltips for text formatting icons and comments, apparently the site programmers did not take into account that someone on Android would use a mouse.



But DeX is still Android. Linux is another matter - complete freedom in terms of installing any libraries, components, a full-fledged console, USB, GPIO and work with hardware. Sounds promising, let's see how it works.



Before starting, let me remind you that to fully use the Raspberry Pi as a desktop, you need good cooling. Because I basically didn't want to have a cooler, I bought such a case;







The case showed itself well in terms of heat dissipation, even with prolonged load there was no overheating or freezing.



As you know, a version of Ubuntu for the Raspberry Pi was released recently, and we will also test it. But first, it became interesting to see the good old Raspbian, which has been familiar to DIY lovers for many years.



First impressions



First, let me remind you of the characteristics of the Raspberry Pi 4:



  • processor Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
  • 2/4 / 8GB LPDDR4-3200 SDRAM memory
  • WiFi 2.4 / 5.0 GHz, Bluetooth 5.0, BLE
  • Gigabit Ethernet port
  • 2 USB 3.0 ports; 2 USB 2.0 ports.
  • support for 2 monitors, micro-HDMI connectors (up to 4kp60 resolution)
  • Support H.265 (4kp60 decode), H264 (1080p60 decode, 1080p30 encode)


According to the description, everything is fine. But the very first launch showed that the system was working very slowly. The solution is simple - the processor frequency needs to be increased. By default, the OS works in a "sparing" mode, because The Raspberry Pi comes with no heatsink and no cooler, and otherwise the system will simply freeze. Solution: edit the config.txt file with the sudo nano /boot/config.txt command and uncomment two lines:



over_voltage=2
arm_freq=1750


After that, everything became noticeably more pleasant. The web benchmark showed an increase of 36 to 48 "conventional units".



The disadvantage that causes inconvenience is the lack of a power button and sleep mode for the Raspberry Pi. If the system is turned off, you can turn it on only by pushing the power supply. There is no way to switch the OS to sleep mode either, there is no power management system on the board.



Electricity consumption, by the way, is quite moderate, when playing video through a browser, a little less than 5 W is consumed:







Compilation to 4 cores with the make -j4 command gives about the same power consumption, and when typing this text in the browser, about 3 W is consumed.



Browser



With the browser, things turned out to be not so simple. First, the Chromium browser comes with Raspbian. And Chromium! = Chrome. I don’t know if they have the same core, but some news sites didn’t open the video, and Amazon Prime refused to work at all, giving a message about an incompatible browser. The movie window itself opens normally:







But when you try to play something, an error message is displayed:







Attempts to replace the User Agent did not lead to anything, the error was issued elsewhere.



Youtube opens fine, but clicks were heard when playing audio. It seems that this should not be the case, because the manufacturers of Raspberry Pi 4 promised support up to 4K. As it turns out, this is a known issue in Linux when playing audio over HDMI, and is being addressedby editing the file /etc/pulse/default.pa . After which the sound became normal.



Other sites like Gmail and Google Docs work, although not fast.







Editing text here on Habré works without problems, but inserting pictures into habrastorage via the clipboard does not work.



The web.basemark.com benchmark worked for quite a long time, and as a result gave a score of 64.8 "parrots":







For comparison, the last Microsoft Surface X produces 457 in the same test - the difference is almost the same as the price difference between the devices.



In the comments there was a question about WiFi speed, these are the results shown by SpeedTest:







The Galaxy S10 smartphone showed twice the download speed (64.3 MBps) and the same (19.6 MBps) upload speed with the same WiFi. Perhaps the speed does drop due to the metal case of the Raspberry Pi, but 33 MB / s is sufficient for real use.



Programming



With programming, everything can be said, not bad. Of course, the professional desktop Raspberry Pi 4 will not replace, but in principle, almost all languages ​​and libraries, from Python to Fortran, can be run on the Raspberry Pi.



For Python, by the way, there is a simple but convenient editor Mu:







For very little ones, Scratch is available:







In general, for teaching programming or just for learning and experimenting with linux, the Raspberry Pi is very suitable. And even the absence of a disk is rather a plus here - even if the system is completely locked, the SD card can be pulled out and the image can be reloaded in 5 minutes.



As for Linux itself, console commands, bash and others - everything works in a standard way and "as expected", there are no difficulties here. An example of displaying the system load in htop with a running browser and several programs: The







load of CPU cores, as you can see, is not high, but video playback in a browser increases it to about 70%. If you make a kind of "stress test" by opening several browser tabs with large documents, youtube, a graphical editor, explorer, then the CPU load is limited to the maximum (which is not surprising), but there is enough memory with a large margin:







We can assume that version with 8 GB of storage is overpriced and a 4 GB model would be fine. Finally, information about the processor:







Conclusion



This article is typed on a Raspberry Pi. So far, the impressions of the device are ambiguous. On the one hand, in comparison with the old models, the performance gain is quite good, and the system, in principle, can be used almost 100%. On the other hand, not everything is working yet, although it is hoped that future updates will fix some of the problems. And finally, it would be strange to demand a lot from a $ 50 PC - in terms of price / quality ratio, the system can be considered quite good.



If the ratings on the article are positive, in the second part I will test Ubuntu on a Raspberry Pi.



All Articles