• Now's your chance win big! Join our community and get entered to win a RTX 2060 GPU, plus more! Join here.

    Meet Stan Dmitriev of SurrogateTV on the Pi Cast TODAY! The show is live August 11th at 2:30 pm ET (7:30 PM BST). Watch live right here!

    Professional PC modder Mike Petereyns joins Scharon on the Tom's Hardware Show live on Thursday, August 13th at 3:00 pm ET (8:00 PM BST). Click here!

Review Overclocking the Raspberry Pi 4

Giroro

Honorable
Jan 22, 2015
632
97
11,090
13
"Double-clicking on it in Raspbian is enough to show you its contents, but not to let you save any changes you make. For that, you’ll need elevated privileges. Open a Terminal with Control, Alt, and T, then type: "

How is it that in 25+ years of Linux development, they still haven't figured out a better way of making the GUI integrate with the terminal in an actually-useful way.... Or for that matter come up with a normal way of editing text. Editing text through a terminal is a -REALLY BAD- user experience, and linux is -still- virtually unusable without using the terminal every 5 seconds and re-navigating over and over to wherever you hit a roadblock in the GUI.
Just let people 'run as root' or whatever from the GUI. Or at least let us directly open a folder in the terminal from the GUI? Windows figured that out in, like, 1995. It really doesn't need to be this hard.

I rant about this, because in my first (and probably last) outing with Raspbian, it took me over -2 hours- to make a 1-line change to config.txt. It was a gigantic mess of disparate tutorials insisting the GUI text editor can actually save config.txt, getting sent to a smattering of poorly documented terminal text editors which tell you to save the file but don't give any indication on how to save a file without a menu... and way too many recommendations to just plug the microSD card into a normal computer and edit the file with Windows (my personal favorite)....If anybody would ever consider recommending you use a totally different OS just to edit a text file, then maybe the OS (still?!) isn't ready for prime-time guys.

Pointlessly complicated stuff like that is why Raspberry Pi appeals to a small niche of adult hobbyists, but never really caught on for it's original intended purpose of teaching kids to program python. I'm an engineer, and I still had my "forget this, I'd rather pull out a MCU and write bare-metal Assembly" moment.
If you really are stuck trying to use a linux computer to control hardware, do yourself a favor and just use the root account for everything.
 

bit_user

Splendid
Ambassador
Thanks for this article, but a few points:
  1. Please specify the exact model of heatsink-fan you used, as well as the thermal compound.
  2. I wish you benchmarked stock w/o heatsink, stock w/ heatsink, and OC w/ heatsink. As the original article showed, the SoC will thermally-throttle even at stock speeds. So, it would be nice to see what advantage can be obtained simply by virtue of adding the heatsink-fan.
  3. I wonder if the reason the GPU overclock hurt CPU benchmarks is due to generating more heat, so the CPU throttled sooner. To confirm this, it would be nice to pair temperature plots with the tests.
  4. Please start your graphs at 0. I was shocked at what a big difference the overclocking made, until I noticed that some of the graphs didn't start at zero. Then, I felt cheated.
Again, thanks. Please consider these points, and maybe do a follow-up article.
 
Last edited:

bit_user

Splendid
Ambassador
If you really are stuck trying to use a linux computer to control hardware, do yourself a favor and just use the root account for everything.
Really bad advice.

It's easy enough to use sudo. If you need to type a string of commands, you can even run "sudo su", to get a root shell session.

I can give at least 3 good reasons not to run as root, when it's not necessary.
  1. Greater risk of breaking your system. When running as root, you can delete or overwrite almost anything. This makes it much more accident-prone.
  2. Security risks - if you fall victim to a remote execution exploit (i.e. via a browser or some malware or security flaw in a program you're running), then this gives the attacker 1-step control of your system. Otherwise, they need to pair a remote execution exploit with a privilege escalation exploit.
  3. Likely messing up of permissions on files that you want or need to access, when running as a normal user.
Therefore, it's strongly advised only to use root/sudo specifically for tasks that require it.

Back in the days of Windows XP, one reason Linux had a tendency to be more secure was that most XP users would run with admin privileges, whereas Linux users almost never do. MS took the clue and markedly improved security, when they started prompting for every operation requiring admin privileges in Windows Vista and beyond.
 
Reactions: jejones3141

k1664

Distinguished
Aug 29, 2009
15
0
18,510
0
I'm an engineer,
in my first (and probably last) outing with Raspbian, it took me over -2 hours- to make a 1-line change to config.txt
As convoluted as Linux can be, even though a great deal of it is for security to ensure people don't take your advice of running as root all the time, I feel good that as a non-engineer it took me less than 10 minutes to edit the same config.txt file.
 

Giroro

Honorable
Jan 22, 2015
632
97
11,090
13
As convoluted as Linux can be, even though a great deal of it is for security to ensure people don't take your advice of running as root all the time, I feel good that as a non-engineer it took me less than 10 minutes to edit the same config.txt file.
Hey props to Tom's for at least including the tutorial step that was actually a working way of doing it. There's a lot of bad info out there in the top search results.

But the security argument, I'm not so sure about that. Or, actually moreso:
Greater risk of breaking your system. When running as root, you can delete or overwrite almost anything. This makes it much more accident-prone.
Has there been any scenario where a Linux user had a command fail where they didn't immediately attempt the exact same thing again with a sudo in front?
I'm really asking, linux users, have you ever thoughtfully considered if you made a mistake before you add on that sudo, or do you just immediately retry? For people who really do need that kind of protection from themselves, why make them retype the entire command every time instead of a single character "Are you sure Y/N".. That's what always bothers with me linux, it deliberately uses the hardest and slowest ways of forcing users into its philosophy. Even when users agree with it they are still getting punished. Unless of course there actually is a way to use sudo through the GUI.
It feels more like training users to instinctively ignore the 'safeguard', so why not cut out all the added steps?

Security risks - if you fall victim to a remote execution exploit (i.e. via a browser or some malware or security flaw in a program you're running), then this gives the attacker 1-step control of your system. Otherwise, they need to pair a remote execution exploit with a privilege escalation exploit
Is this really that big of a concern for most Raspberry Pi projects? There's (a lot) of better options for surfing the web or as a normal desktop environment. I mostly see single-use offline hardware projects and retropie boxes with limited/no interaction with the terminal to get things running.

Likely messing up of permissions on files that you want or need to access, when running as a normal user.
But why would you ever go back to running as a normal user, when that's the problem in the first place?

----

Anyways, I get it, Linux devs want to keep things overly difficult/slow/complicated to keep the normies out. I would have just hoped that the Pi specific flavor would have figured out how to make things easier for their target audience of hobbyists and children than Fedora 10. The aging dev community needs to put some real thought into the future of Linux. There are kids these days raised on Android and iOS that not only don't know what a terminal is, they don't even really know what a folder is. They need more on-boarding than being forced into a deliberately obtuse linux terminal if you ever want them to someday start developing for it (and by extension, funnily, android).
 

bit_user

Splendid
Ambassador
Has there been any scenario where a Linux user had a command fail where they didn't immediately attempt the exact same thing again with a sudo in front?
From an experienced user: yes! I know which commands are likely to need root, but I'm not 100% sure about a few. So, I do sometimes try a command without sudo, before I try it with. Furthermore, I know which commands are likely to cause persistent modifications to my system. For the novice, this can obviously be more difficult.

Fortunately, some newer Linux filesystems have snapshotting features, which is like an instantaneous backup of your filesystem. This allows one to be a bit more adventurous, as long as you don't break it too badly and you actually know how to revert to a recent snapshot.

Linux GUIs are also better than they used to be, but I'm too old-school to follow these developments closely. The biggest problem is they tend to be too dumbed-down. However, a lot of things that would previously force users onto the commandline no longer do. Thank goodness I never have to fight with X Windows config, for instance.

For people who really do need that kind of protection from themselves, why make them retype the entire command every time instead of a single character "Are you sure Y/N"..
Um, what are you talking about? You can just hit the up arrow and edit the commandline to insert "sudo" at the front.

And asking "are you sure" doesn't confirm either that the user has the authority to execute admin commands or do anything to confirm the user's identity. "sudo" is really a way of granting elevated priviliges to a set of users, but it can also restrict the types of operations to which this applies. So, you want to confirm the identity of the user and it needs to know to which command it's being applied.

That's what always bothers with me linux, it deliberately uses the hardest and slowest ways of forcing users into its philosophy.
No, Multics was the hardest way of doing things. UNIX was designed as a simpler alternative.
; )

But I will agree with you on one small point, which is that UNIX was designed for a multi-user environment, where you also have a knowledgeable administrator. Sometimes, the multi-user baggage gets in the way. However, Windows has this too, as well as the idea of a super user.

Unless of course there actually is a way to use sudo through the GUI.
A lot of GUI-based administrative programs will pop up an authentication dialog, when you need to do something requiring admin privileges.

Is this really that big of a concern for most Raspberry Pi projects? There's (a lot) of better options for surfing the web or as a normal desktop environment. I mostly see single-use offline hardware projects and retropie boxes with limited/no interaction with the terminal to get things running.
In the age of cyber crime and cyber terrorism, even IoT cannot afford to skimp on security.

I would agree that many projects could do with a thinner, lighter OS, but that would simultaneously render the machine unsuitable for desktop-style use. So, a full-blown OS is definitely called for by the range of uses that the Pi Foundation sought to address.

But why would you ever go back to running as a normal user, when that's the problem in the first place?
See points #1 and #2, in my previous post.

Another reason would be on a system shared by multiple users - if you start using root for everything, you risk a scenario where you start messing up permissions and ownership on things, eventually forcing everyone to use root. At that point, it becomes a shared, single-user system and you might as well go back and use DOS and Windows 3.1.

Sometimes, I even make a dedicated account for certain automated processes. This is actually pretty standard practice, as you can see by reviewing all of the accounts on your system (hint: look at /etc/passwd).

Anyways, I get it, Linux devs want to keep things overly difficult/slow/complicated to keep the normies out.
It sounds to me like you're extrapolating far too much from one bad experience.

I'd agree that Linux usage is not always smooth sailing, but then I am something of a power user.

Something to keep in mind is that Android/ChromeOS are Linux-based. Macs are BSD-based. Microsoft is moving closer and closer to Linux, every year. Google, Facebook, and Amazon all use Linux. IBM bought Redhat. Many governments are now using Linux. They must know something, eh?
 

bit_user

Splendid
Ambassador
Hey props to Tom's for at least including the tutorial step that was actually a working way of doing it.
Also, did you see this?

https://www.tomshardware.com/reviews/raspberry-pi-command-line-commands,6159.html

It's a somewhat random smattering of tips and "Intro to the commandline". Probably worth a read, if you ever have another occasion to fire up the terminal.

I'm not saying it's the best out there, but it's a place to start & might have the info you need.
 

AllanGH

Reputable
...Just let people 'run as root' or whatever from the GUI...
Disallowing a root GUI session is actually a "fairly recent" move in Debian (what Raspbian is based upon), and that's a good move on the part of the devs. It's not worth delineating the benefits of the change, since you don't seem to view the development goals as legitimate.

It's easy to make config edits to restore the ability of root to login to a local X session, and despite trying the mods to see if they work (they do), I don't see it as a necessary change. Any administrative task that can be done through X can be done faster and easier through the CLI...it's a time saver, far more efficient and powerful than hunting around a bunch of menus with a mouse pointer.

...they still haven't figured out a better way of making the GUI integrate with the terminal in an actually-useful way...
As to accessing the console, CTRL+ALT+F1 will switch you to tty1 and you can login. You can CTRL+ALT+F7 to switch back to the running X session. Switch back and forth as much as you like, then exit the console session and go back to X.

Need multiple console sessions? CTRL+ALT+F[x]; (1 ≤ x ≤ 6)

This ignores the fact that you can open multiple terminals from within an X session, and have separate concurrent console sessions running under the same username. Enable multiple virtual desktops, and put each terminal session on its own desktop. Like magic...things are organized for an extended task, or series of tasks, and you switch desktops with a roll of the mouse scroll wheel.

That is useful.

...Anyways, I get it, Linux devs want to keep things overly difficult/slow/complicated to keep the normies out...
No. You really don't get it.

Nobody is excluding...LOL..."normies" from anything. All a person has to do is learn to use the tools provided by the OS; and, not to mention the man pages, the Internet is filled with documentation and HOW-TOs. After all, learning is just reading and remembering--easiest thing in the world to do--but nobody is going to hold your hand and spoon-feed you the knowledge. If you don't want to take the time to learn something...well, that's self-imposed exclusion, if you ask me.

You still have windows, so you don't have to join the legions of victims being punished by those demonic Linux devs.

...it took me over -2 hours- to make a 1-line change to config.txt....
Helpful reading for those who need to learn about BASH:
http://www.tldp.org/LDP/Bash-Beginners-Guide/Bash-Beginners-Guide.pdf
http://www.tldp.org/LDP/abs/abs-guide.pdf

It is unfortunate that Linux isn't the way you want it to be, but you aren't going to see anybody apologizing to you because of that. You aren't used to using anything except windows. Fine, but please don't rant about "fixing" what isn't broken, because you don't understand it; and don't wring your hands over Linux not being like windows--it's not supposed to be.
 
Last edited:

Giroro

Honorable
Jan 22, 2015
632
97
11,090
13
Um, what are you talking about? You can just hit the up arrow and edit the commandline to insert "sudo" at the front.
That's good to know.

And asking "are you sure" doesn't confirm either that the user has the authority to execute admin commands or do anything to confirm the user's identity. "sudo" is really a way of granting elevated priviliges to a set of users, but it can also restrict the types of operations to which this applies. So, you want to confirm the identity of the user and it needs to know to which command it's being applied.
The content of the message isn't important, It can just as easily say "Retry that last command with elevated privileges Y/N" The point is that there is a lot more that can be done to make the user's life easier without actually changing what's happening behind the scenes. Although I'm not sure how typing sudo confirms the user's identity when non-root accounts are allowed to use it.

In the age of cyber crime and cyber terrorism, even IoT cannot afford to skimp on security.
What I was getting at there, is that a lot of hardware focused Pi projects don't need to be online, at all. The older/cheaper boards don't even have WiFi. The best cyber security is to never connect to the internet in the first place.

It sounds to me like you're extrapolating far too much from one bad experience.
I've tried various flavors of Linux about a dozen times over the last 15 years or so. Compared to previous experiences my time with the Pi was relatively positive. Software actually installed the way it was supposed to, I didn't have to compile anything (except the code I was running to run an LED array over SPI), and everything was easy to install and sandboxed from my normal computer.
It's just that editing one config file and running some pre-written could should not have taken an entire day. It's frustrating to know you have to give up on a project because some hardware evaluation that should have taken 6 hours beginning-to-end ended up taking 8 hours just to follow a 3-step Pi-specific tutorial to get the demo code running.

No. You really don't get it.
Well actually, I do.
Reading the rest of your post, it's a typical example of the exact thing I'm complaining about. Linux power users complaining about Windows without realizing that they're failing to provide an alternative that somebody can learn in a reasonable amount of time. "Git Good" or any variation of that sentiment is off-putting, and doesn't actually do anything to fix the glaring problems with the user experience. Nor does it actually encourage anybody to actually put forth the effort. I WANT to like linux, but it is far from perfect and absolutely is not friendly to new users. I get the feeling you're in it so deep that I don't think you realize nothing you said actually means anything to somebody who doesn't already know what you're talking about (and tbh I'm probably not going to look up any of those acronyms, out of spite). FWIW, you lost me at "It's easy to make config edits ..." because that fact that it was actually pretty hard to learn a way to make a config edit was the reason I was complaining in the first place.

Helpful reading for those who need to learn about BASH:
http://www.tldp.org/LDP/Bash-Beginners-Guide/Bash-Beginners-Guide.pdf
Prerequisites/not in this course:
·You should be an experienced UNIX or Linux user, familiar with basic commands, man pages and documentation
· Being able to use a text editor
· Understand system boot and shutdown processes, init and initscripts
· Create users and groups, set passwords
· Permissions, special modes
· Understand naming conventions for devices, partitioning, mounting/unmounting file systems
· Adding/removing software on your system"
I don't know what BASH is, but it sounds too advanced for me. If I read (what I assume is another 175 page book) and then read this 175 page book.. will any part of that actually help with Pi hardware development? If learning the OS takes longer than the (electronics) project itself, then I feel like the OS hasn't actually done it's job. It should be there to speed up development, not to impede it.

Raspberry Pi isn't targeted toward linux power users. People who are only interested in using Linux as a desktop OS can just install it on their current computer for free. I wanted to use what was sold to me as a cool STEM toy to make some lights blink.
Honestly, I don't think my experience is atypical either; I imagine most people picking one up don't have any linux experience at all. That is why I feel that Raspbian could be doing more to get the OS out of the way of users who are primarily interested in the GPIO.
 
Reactions: TJ Hooker

bit_user

Splendid
Ambassador
I'm not sure how typing sudo confirms the user's identity when non-root accounts are allowed to use it.
sudo is usually configured to prompt for password. Forcing re-authentication is what confirms the user's identity.

When executing a series of commands, in rapid succession, you can also suppress the password prompt.

a lot of hardware focused Pi projects don't need to be online, at all.
That's a small minority of users. The Pi was designed to be a modern, cheap computer, first and foremost. In order to install packages, updates, use github, etc. you really need to be online.

Sure, you could make a custom image, burn it to SD card and never connect it to a network, but that's just not the reality of how they're used.

The older/cheaper boards don't even have WiFi.
Because there are USB wifi adapters, and they're pretty cheap.

The best cyber security is to never connect to the internet in the first place.
I think that option really stopped being viable somewhere in the early 1990's. ...or, I could suggest that perhaps you lead by example!
; )

It's like saying: the best way not to have your car stolen is not to have one. Well, that's fine if you don't need one, but it's really of no help to the majority who do.

It's just that editing one config file and running some pre-written could should not have taken an entire day.
What I don't understand is why this became an indictment of Linux, writ large? Why wasn't this a specific complaint that the Pi should have a GUI front-end for that config file?

Somehow, I feel like if the same sort of thing happened on Windows, you'd focus on the specific task, rather than trying to use it as an example of what's wrong with the entire Windows architecture and ecosystem.

And, TBH, Windows has plenty of arcane bits, too. Sometimes, I find myself following instructions from a web site and really delving into some dark corner of Windows I don't know at all.

Honestly, I don't think my experience is atypical either; I imagine most people picking one up don't have any linux experience at all. That is why I feel that Raspbian could be doing more to get the OS out of the way of users who are primarily interested in the GPIO.
The saddest thing is probably that while you're wasting all this time arguing with us, you could be putting your case towards someone who could actually do something about it.

 

bit_user

Splendid
Ambassador
All a person has to do is learn to use the tools provided by the OS; and, not to mention the man pages, the Internet is filled with documentation and HOW-TOs.
But the OS (encompassing popular desktop environments, et al) is not a static, fixed thing. It's evolving, and there are lots of folks who are interested in making Linux more accessible. I think it's a worthy goal, so long as it doesn't "break" Linux for power users.

After all, learning is just reading and remembering--easiest thing in the world to do--but nobody is going to hold your hand and spoon-feed you the knowledge. If you don't want to take the time to learn something...well, that's self-imposed exclusion, if you ask me.
As such, I think the attitude that it's the user's own fault for not investing enough time and energy to climb the learning curve somewhat misses the above point. People have other things they want/need to do in life than invest a bunch of time learning a new thing, especially if the end goal is something relatively modest.

I don't love Macs, but Steve Jobs repeatedly showed the world that computers don't have to be hard. First, with a custom-built OS designed to meet users on their terms, and then with an adaptation of BSD that has all the power and flexibility of any modern UNIX. I'm not saying that Linux should carbon-copy OS X, but there's a powerful lesson in that.
 
Jul 1, 2019
1
1
15
0
Has there been any scenario where a Linux user had a command fail where they didn't immediately attempt the exact same thing again with a sudo in front?
I'm really asking, linux users, have you ever thoughtfully considered if you made a mistake before you add on that sudo, or do you just immediately retry? For people who really do need that kind of protection from themselves, why make them retype the entire command every time instead of a single character "Are you sure Y/N"..
Yes, sometimes I do. I try to make a habit of it.

That's what always bothers with me linux, it deliberately uses the hardest and slowest ways of forcing users into its philosophy. Even when users agree with it they are still getting punished. Unless of course there actually is a way to use sudo through the GUI.
It feels more like training users to instinctively ignore the 'safeguard', so why not cut out all the added steps?
Yes, you can have windowing environments set up so that to run commands needing superuser privileges, it pop up a window asking for your password, and behind the scenes it is running sudo. On the command line, history is your friend. Hit up arrow, make sure you're at the start of the line, type sudo and a space, and hit enter, and poof! In a way you're right--"are you sure" prompts can condition one to thoughtlessly type "yes, yes, yes" followed by various expletives once you realize what you've done, but abandoning any and all safeguards is worse. It "makes things easier"--including destroying everything with no chance to consider what could happen.

The relevant principle is the Principle of Least Privilege. Run with the least privilege needed to do what you are doing at the time--which means only running with superuser privilege when necessary.

But why would you ever go back to running as a normal user, when that's the problem in the first place?
Some may think themselves incapable of error. I don't, so I run as me and sudo only when necessary. Yes, I can wipe my own files, but to crash the system takes work and encourages me to think about what I'm doing.
 
Reactions: bit_user

bit_user

Splendid
Ambassador
Would anyone care to post a guide on how to install linpack on a pi4 and running the benchmark?
I tried following this one (https://www.howtoforge.com/tutorial/hpl-high-performance-linpack-benchmark-raspberry-pi/) but it seems to be out of date (or I'm really stupid).
-Thx
Yeah, I'm sure you don't need to compile anything, these days. Probably, there's just a package you can install and then a commandline for actually running it.

Sorry, I can't advise, as I don't have a pi online, currently. I would try asking in a more active pi user community.
 

melibond

Honorable
Jun 16, 2014
84
1
10,640
4
Hello. I'm a newbie with Linux and Raspberry pi. I'm looking to isntall Lakka on my RBPi 4 which I overclocked to the exact same settings as you (2.147ghz CPU and 750mhz GPU). Since I have to install Lakka in another SD card and boot from there, will my overclock still stand ?
 
Reactions: ElTwin
Dec 19, 2019
2
0
10
0
Hello. I'm a newbie with Linux and Raspberry pi. I'm looking to isntall Lakka on my RBPi 4 which I overclocked to the exact same settings as you (2.147ghz CPU and 750mhz GPU). Since I have to install Lakka in another SD card and boot from there, will my overclock still stand ?
I have the exact question. Anyone can help?
 

ASK THE COMMUNITY

TRENDING THREADS