Back when I used the Steam Deck as my main PC handheld, I forgot the sudo password I'd created the first time around.Naturally, I started to panic and thought I'd need to reflash my Deck and lose all my data, but then I found a solution that let me reset my Steam Deck's sudo password in just a few minutes.All you need for this is a wired keyboard (or a wireless keyboard with a dongle and a USB dock) and some focus, because there's some typing involved.
You only need a wired keyboard for this, preferably with a dedicated function row You can also use a USB dock and a wireless keyboard Close For this, you only need either a wired keyboard you can plug directly into your Deck or a wireless keyboard with a dongle and a USB dock.If you're using a wireless keyboard, plug the dongle into the dock and then connect the Deck to the dock.I recommend using a keyboard with a dedicated function row, but you can also use one that has the function keys as secondary functions of the number keys.
Just remember to hold the Fn key when you need to press a function key.Lastly, if your keyboard has a function row with media controls as secondary functions, it might not work because SteamOS will likely recognize the function keys as media control keys, such as volume and screen brightness controls.This was the case with my Lofree Flow keyboard, as SteamOS recognized its function keys as media control keys, so I had to use my old Keychron K2 to access the terminal screen.
The fastest way to check whether your keyboard will work is to press different function keys while in Game or Desktop mode and see whether they increase or decrease the volume or screen brightness.If they do, get a different keyboard.Alternatively, you can open your browser while in Desktop mode and try activating full-screen mode with F11 (Firefox, the default SteamOS browser, supports this).
If it doesn't work, you'll need a different keyboard.GAMAKAY TK75HE V2 Form factor 75% Switch options Magnetic Mercury, Magnetic Phoenix The GamaKay TK75HE V2 is a 75% wireless gaming keyboard featuring Hall Effect magnetic switches with ultra-precise 0.005mm rapid trigger accuracy, zero dead zone, and an 8kHz polling rate for near-instant response.Its 0.85-inch TFT screen, hot-swappable keys, and dynamic RGB lighting allow full customization for both gameplay and productivity.
See at Amazon Expand Collapse How to reset and change your sudo password It requires some typing, so be sure not to mistype anything Once you've got everything you need, shut down your Steam Deck.Now press and hold the Quick Access menu button (also known as the three-dot menu button), and then press the Power button.You should hear a sound and see the SteamOS boot menu, like in the screenshot below.
Navigate to the third option with the Down arrow and then press Enter.You should now arrive at the Select Operating System screen, where you should stay on the first option (SteamOS) and press the E key.The next screen dubbed GRUB might seem daunting, but it really isn't.
Simply press the Down arrow until you arrive at the start of the steamenv_boot line, as shown in the screenshot below.Then, press End, which will take you to the end of that line.You might see the same string of letters as in the screenshot, but perhaps not if you're running an older or newer version of SteamOS than I was when writing this guide (SteamOS version 3.8.16).
The important thing is to go to the end of the line, with your cursor positioned as shown in the screenshot below.Now, press Space once to place it as shown below.Next, type systemd.debug_shell and press Ctrl + X to reboot.
Your Steam Deck will now reboot, so don't fret when you see a bunch of letters showing up on the screen.In about a minute or so, the device will boot into Game Mode.Once you're in Game Mode, press Ctrl + Alt + F9 to open the Terminal screen.
Next, type passwd deck and press Enter.Now enter your new password and confirm it.Once you finish, press Ctrl + Alt + F1 to return to Game Mode.
If the command doesn't work with the left Ctrl key (as happened for me), try the right Ctrl key; it should work.That's about it.You will now see a string of letters appearing when restarting the device, but shutting it down and turning it back on again should return things to their normal state.
If you can't type any letters on the Terminal screen, you'll have to type the systemd.debug_shell command at a different location.Repeat the procedure until you reach the GRUB screen, then press the Down arrow again until you reach the start of the steamenv_boot line.Instead of pressing End, you'll have to press the Right arrow key until you move the cursor just past the fbcon=vc:4-6 parameter, as shown below.
Now, press Space once to move the cursor to the same position as in the screenshot below.The next step is to type the systemd.debug_shell command and press Ctrl + X to reboot.Now repeat the part that includes pressing Ctrl + Alt + F9 to access the Terminal, and you should now be able to type into it and reset the sudo password.
For what it's worth, I managed to type on the Terminal screen both when I typed the command at the very end of the line, and when I typed the same command right after the fbcon=vc:4-6 parameter.This fix is simple, but remembering your sudo password is a better strategy The first time I did this, it took me about 10 minutes to finish because I had to check every step more than a few times, as I was afraid I'd break something.But when I wrote this guide, I finished it both times in about five minutes.
In general, this is very straightforward to do, but I still recommend writing your sudo password down somewhere, especially if your Steam Deck is your only gaming machine and you don't have a keyboard lying around.Better safe than sorry!
Read More