welcome to cathode ray dude's blog. please be aware that i'm a lot cruder on here than on youtube.

you can subscribe via RSS. point your reader here: RSS Feed


linux on the steamdeck lol

the general response on e.g. reddit to “can I use [x] on the steamdeck” is “yes, because it's just a PC, so you can use anything that would work on a PC” and while i commend that response in the general case (the fact that the steamdeck is essentially Just A PC is incredibly vital to its usefulness and should be highlighted,) i suspect it's become a thought-terminating cliche.

break

what people are actually asking is,

  • have you tried [x] and found out that it's impractical on this platform for some non-obvious reason?
  • what's the driver situation? do physical buttons, the gamepad, etc. work?
  • is it straightforward or will i need to know a lot of specific tricks and tips?
  • will this, in general, be an uphill battle?

and i think it's reasonable to ask those questions before getting deeply invested into a project that might be a huge waste of time and, for all you know, could leave your steamdeck bricked.

i mean, you just don't know unless you know, right? did valve build in any weirdass management controller nonsense that gets confused if the OS doesn't have a driver loaded? is there a watchdog? is there some kind of secure boot nonsense? any of these things could be true given how appliance-ized the thing is, and while Valve does have a FAQ that says “it's just a PC,” it doesn't actually say that all those things are untrue.

as it turns out, they are untrue; the steam deck really has very normal PC-type behaviors. but can you blame someone for wondering if details are being left out? and also, there are just things that the average computer toucher will be completely unfamiliar with.

install / boot

for instance: while i'm led to believe that installing linux or windows is straightforward (you just write them to a USB, boot, install like normal) what if you don't want to erase the internal drive? you can absolutely run your steamdeck off an external drive indefinitely, it works quite well IME (update: it doesn't so much; more notes shortly), but the firmware lacks a boot order selector, so you're going to have to hold Volume Down and press power on every single restart to get the boot selector. i googled this problem and found people saying to use various funky third party utilities that look unreliable.

…or, you can just go into the EFI and set Boot > Add Boot Options to First. this puts the internal SSD at the bottom of the boot order, so if you have anything bootable at all connected, it'll always win, and otherwise it falls back to the SSD. this obviously works and it's not hidden at all, but it's also not a typical PC firmware setting, so i would want to be told about it! yet this did not appear in any of the google results i got, i had to figure it out myself.

installing an OS is out of scope, but fwiw i have been experimenting with a copy of linux mint xfce which i installed onto a crucial x9 pro on a completely different machine. as is typical, linux doesn't really care what you install it on and can be freely moved between systems, so i actually recommend setting it up on something other than the deck. i guess it doesn't make much difference if you have a dock, but if you don't, then using a normal PC will give you wired ethernet, a bigger screen, more USB ports etc. and then once you have the basics set up you can just move the drive over to the deck.

hell, that might even be true if you're using the internal drive, nothing stops you from popping the m.2 out of the deck and putting it in a laptop for initial setup. just food for thought

screen

the first problem you'll encounter once you boot an OS is that the screen is rotated. i think valve used a tablet LCD, so its native orientation seems to be portrait. i don't know if windows handles this well, but i have tried booting two different linuces on my deck and both came up with X sideways.

this happens on lots of tablets, and really that's a core issue with the deck: it's not “just a PC,” it's “just a tablet.” so it has very typical tablet PC behaviors, but how many people have ever used one of those at all, and how many linux users have used one? it's a pretty tiny fraction of an already small pool imo, so i think most people are going to be baffled when they run into this problem.

the solution is always two steps:

  • rotate the display: often accomplished from your DE's “Display” control panel. this worked under Mint XFCE just fine, but on some distros you'll need some CLI gibberish. for the Deck it's: xrandr –output eDP1 –rotate right
  • rotate the touchscreen: i have never seen this happen automatically. the display control panel will rotate the picture but the touchscreen will now be completely out of sync, left-right = up-down. you need to find some chunk of line noise to punch into a CLI to fix this, it's device-specific, and i'm not sure if the examples i found were even correct because i didn't try any of them.

    instead, on a whim i looked up “touchscreen” in the Mint software repo and found something called i think “x11-touchscreen-calibrator” which just instantly and persistently fixed it, somehow. this probably exists on most linuces so look for it.

keyboard

another common issue with linux on tablets is keyboards. yes, you can just use USB or bluetooth, but at that point you just have a weird laptop so it's out of scope. suppose you want to use the deck as a handheld, as intended, just not under SteamOS. i have no solution for this.

even SteamOS in desktop mode suffers here, because the on screen keyboard is absolutely atrocious and lacks multiple essential keys (like control, ffs) without which you simply cannot operate a linux machine. it sucks, and there's nothing you can do about it, you can't even change which keyboard comes up when you hit steam+X.

this is one of valve's biggest and most pointless own-goals, in a device that's kind of full of own-goals; most of them are just more charming than this one, which is really a showstopper. assuming you think using the thing in desktop mode is an important feature, that is - but given that valve themselves exposed and advertised that feature, i think we can call it a critical functional gap.

again, this isn't a deck-specific problem, it's really one of the big problems with PC tablets if you ask me, a complaint I've had since the 2000s: they should all really have dedicated hardware buttons that summon/dismiss the keyboard. you can get away without such a thing on a smartphone, because the keyboard is solely useful for plain text input to plain text fields, which are an extremely low-level OS concept. android and ios (and winCE, palm, etc. before them) always know when you are trying to enter text, and all UIs are designed with the idea in mind that the keyboard may be covering half the screen. there are also no keyboard shortcuts, no nonprintable characters, and no software that expects to see arrow keys or numpad keys or anything like that.

in other words, the platform is designed from the ground up to not allow any inputs that would make this problem hard to solve. this is not true for normal PC software. you need access to shit like Ctrl and the F-keys, particularly under linux. you also really need to be able to pull up and dismiss the OSK at any moment, and there's no convenient way to do that. sure, you can load up a generic OSK package (i'm using “Onboard,” which is decent) but with no hardware button you're going to have to summon it by tapping a system tray icon, and that sucks.

touchscreens are already fumbly things and linux is not good at UI scaling yet, so you are going to miss and hit the wrong thing frequently. screen real estate is also at an absurd premium on a 1280×800 display, so making a larger target isn't really a good solution. but there are deeper problems - an OSK is an OS meta-feature, and having to perform an in-band action which defocuses the current app and input field in order to summon it is simply incorrect from UI and UX perspectives. it will never work well, and while valve could have solved it, they have made it pretty clear that they don't intend to.

again, this isn't a deck-specific problem, but it is a big nasty ugly one. it is solved by not expecting to use it as a fully handheld device, but until you try doing that, you don't realize how inconvenient it is. so if someone asked me “can i use linux on my steamdeck” i would proffer the fact that you can't really use this thing unless you have a physical keyboard available at a moments notice. that seems like essential info!

gamepad

finally there's the “gamepad” controls, e.g. sticks, triggers, etc. which don't fully work without Steam running. they only function in the “desktop” config, which i believe is as follows:

  • right touchpad is a mouse
  • triggers are left/right buttons
  • D-pad is keyboard arrows
  • A is enter
  • pause is escape

little of this is useful in games, and without steam you can't change any of it. i am unaware of any way to solve this and i don't think it's supposed to be solvable. as far as i can tell, while the deck controls appear to apps as a generic SDL xinput device, the kernel driver is plugging into an emulated software device which is fed by userspace code running inside Steam itself, allowing them to do their wacky control remapping trickery.

i can see why they did this, it's very clever, but the point is that even under SteamOS, if you close Steam, all the controls stop working. that means that if you don't want to install Steam, or if you've chosen a distro that can't run Steam (at least not without a ton of tedium you don't want to do,) then you're screwed; most of your gadget will not work. if you aren't playing games maybe this doesn't matter but then i don't know why you bought a steamdeck.

assuming you are okay with running steam all the time, you will then need to switch to “gamepad” mode to play most games. by default, just hold the “pause” button for a few seconds, and you'll see the gamepad mode popup, basically turning it into an xbox controller. to get back to desktop controls, hold L4 (the upper button on the back of the left side.) this, again, is something you have to do even in SteamOS itself if you're running in desktop mode.

in conclusion

i get that after the Deck came out, the Almost Live Area Codes Sketch played out on reddit et al for months or years. “can it run linux?” yes, it's a PC. “can it run windows?” yes, it's a PC. i get that people probably got tired of that, but here's one of my overriding opinions about posting on the internet:

if you're tired of answering the same question, stop answering it.

you aren't a paid employee. there are no KPIs to meet on reddit or stackexchange. nobody is forcing you to reply to every thread, so just: don't. if you can't be civil, shut the fuck up, let someone else answer it or don't answer it at all. and i don't need to say anything more than that, you'll either decide to be decent to people or not.

the reason we ask each other questions instead of experimenting is because experimenting takes time, possibly unlimited time, and can have unknown side effects; why spend four hours installing and tinkering with linux only to find out there's some glaring defect that will prevent it from ever doing what you want, a thing that happens really often, particularly with linux? why install Windows, then install a bunch of drivers and whatnot, only to find out that it has some foundational problem with audio output or something? why do these things when you could just ask, “hey, has anyone else tried this,” and save yourself countless hours? is that not why forums and reddit and stackexchange exist? isn't all the info “in the book” or available through empirical testing? if so, why even let people ask questions, and why show up to answer them?

one of the great things about humans is our ability to communicate, to share experiences so that we don't all have to learn things “the hard way.” why people online, particularly linux people, are so quick to discard that basic tenet of our existence is beyond me. all you have to do is say “yep, it works,” without the “obviously” at the end - or just say nothing at all. that one's incredibly easy. possibly the easiest choice

Discussion

hxka 2024/11/11 22:40

You can use SC Controller to remap Deck's controls without Steam.

Enter your comment. Wiki syntax is allowed:
 

Last modified: 2024/11/11 13:04