Joking aside, is there an actual legitimate reason to do this on a workstation? I understand why you would want to disable swap on something like a kubernetes cluster node but in my head, heaving at-least zram enabled is a good thing on a workstation so you *don't* get OOM killed... I call on thee, Linux wizards of HN, to help me understand the reasoning behind this.
This was always in a setup where I'd have ample RAM for my everyday tasks, and was doing numerics. Running OOM would invariably mean two things:
1. I had a bug in my scripts, which typically meant I'd accidentally materialized a huge sparse matrix or some such, and thus
2. The system wouldn't go "just a little" OOM but rather consume memory an order of magnitude over the actual system's capacity. And it would not recover.
In that scenario, the system would typically start swath-thrashing so hard that I'd just cold reboot. An OOM daemon fixed that and let me iron out my bugs.
This means there's a lot of available RAM capacity, that there's a hefty read cache to avoid the SD card, that when there are disk writes on writable storage it can still read from it, and with the lack of clustering and the speed of decompression there's no swapping lag whenever a page needs to be swapped back. This swap early, swap often is the complete opposite of the OOM-prevention swapping you used to use on disks, which was slow and interrupted IO whereas LZ4 in RAM is fast and doesn't interrupt IO.
I have been using this setup since 2022 and have not had any issues but I don't compile anything on those setups, though I see no reason why it would not be safer than compiling without zram at all.
There used to be a time where swapping out meant moving cogs and wheels full of heavy rocks and RAM frequencies could be approximated by waving a stick until it made whistling noises. At that time suddenly dealing with memory swap made the system unusably unresponsive (I mean unusable, not just frustrating or irritating). Advice about disabling swap and zram came from that time for “resource constrained” systems. Unfortunately the meme will never die because the wikis and now regurgitated LLM drivel will just never let it go because nobody has gotten around to fixing it.
Linux memory management works well for servers where you can predict workloads, set resource limits, spec the right amount of memory, and, in most cases, don't care that much if an individual server crashes.
For workstations, it either kicks in too early (and kills your IDE to punish you for opening too many tabs in Chrome) or it doesn't kick in at all, even when the system has become entirely unresponsive and you have to either mash magic sysrq or reboot.
Interestingly that was my experience on steam deck with its default 1gb swap. But after enabling both zram and larger ordinary swap (now also default setting for upcoming release) it became much more stable and responsive.
Experience has shown me over and over that you just want to feel the limits of the machine hard and fast so you can change what you're asking of it rather than thinking that there is some perf issue or weird bug.
It's the idea that swap is somehow useful that's old. It's not, it never worked right for interactive systems. It's a mainframe thing that needs to die.
Like one thing I learned some time ago: swap-out in itself is not a bad thing. swap-out on it's own means the kernel is pushing memory pages it currently doesn't need to disk. It does this to prepare for a low-memory situation so if push comes to shove and it has to move pages to disk, some pages are already written to disk. And if the page is dirtied later on before needing to swap it back in, alright, we wasted some iops. Oh no. This occurs quite a bit for example for long-running processes with rarely used code paths, or with processes that do something once a day or so.
swap-in on the other hand is nasty for the latency of processes. Which, again, may or may not be something to care about. If a once-a-day monitoring script starts a few milliseconds slower because data has to be swapped in... so what?
It just becomes an issue if the system starts trashing and rapidly cycling pages in and out of swap. But in such a situation, the system would start randomly killing services without swap, which is also not entirely conductive to a properly working system. Especially because it'll start killing stuff using a lot of memory... which, on a server, tends to be the thing you want running.
I had a machine freeze this month because it was trying to zram swap, and have hit shades of the problem over the last few years on multiple machines running multiple distros. Sometimes running earlyoom helps, but at that point what's the point of swap? So no, this isn't out of date.
Today, don't buy a computer (regardless of size) with less than 32 GB of ram. Yes, this applies to fruity products as well. Part from making it a more enjoyable experience it will also extend the usable life of the computer immensely.
(The weird crap about apple computers not needing as much RAM comes from iOS vs. android and is for different reasons, does not apply to real computers)
I am not sure why you would disable those in many scenarios.
htop froze, so i hit ctrl-c, but nothing happened. no mouse movement, no ssh'ing in, just totally hard-locked. i ended up having to physically powercycle the machine.
after that i turned off swap so that it killed the process rather than the machine (and remembered to pass -DLLVM_PARALLEL_LINK_JOBS=1)
Allocating 16/32/64/128GB of NVME storage to swap is mostly just a waste of disk space for me. When I had swap enabled, it was constantly showing 0 used. (Not "pretty much none", literally "0.0".)
Further, if I'm trying to use more than 64GB of RAM... I'm fine with things getting OOM killed. I don't know that I've ever had anything OOM-killed when something wasn't clearly misbehaving. (I count Chrome eating 50GB of RAM because I haven't closed any tabs all week as me clearly misbehaving for the purposes of this discussion.)
And as far as zram... I guess same sorta arguments. I'm not running out of RAM, so why use up CPU cycles (and presumably battery power)? why use up brain cycles setting that up?
Until I've maxed out my system's RAM, I'd rather just throw more RAM at it.
zram does basically nothing while your working set fits into memory, no performance penalty.
My laptop has 64GB RAM and 1TB NVME, I run with swap off because I want all storage usable should ideally not be pressed for memory.
I also have memory and storage allocation in my task bar to easily monitor the situation.
On a machine with FOUR GIGABYTES OF RAM at that.
I gave my wife an old Lenovo Yoga 2 in 1. That thing works nice using it as a flipped tablet to watch Netflix, but here also the performance isn't great.
Maybe just don't expect that much from these weird computers pretending to be tablets.
My wife needed a personal device because her company issued laptop was so locked down that she couldn't do a lot of basic personal admin stuff on it (for example online ordering of groceries).
We considered an iPad, but in the end chose the Surface Pro because it allowed multiple user profiles. Windows Hello works super well that for either of us as we pick it up and look at it it's pretty much instantly on the correct profile and thanks to cloud sync with OneDrive and Microsoft Edge, I'm at home on either my own machine or the Surface.
Only thing to mention is that the out of the box experience wasn't as good as I would have liked, especially compared to my experience with iPhones (despite liking iOS over Android, I have no love for macOS).
Firstly, it wasn't running the latest feature update of Windows 11 and trying certain apps (like Instagram) off the Microsoft Store failed to install with a largely undescriptive error. Eventually I realized it wasn't running the very latest Windows 11 feature update which resolved the issue once installed.
The other problem was that my user profile was laggy, but not my wife's. For example the Start Menu was very slow to come up. After a few days of this and no luck Googling the issue, I just formatted and re-installed Windows using Microsoft's official ISO download image. I normally do this with any new Windows PC I get, but assumed it wouldn't be essential for full on Microsoft hardware, but even though there was no obviously extra bundled rubbish software, something was clearly not 100%.
On the other side you'll have devices that feel really well built and graceful, but can actually do very little, or other ones fitting a very average vision of what a computer needs to do, and you'll be paying for additional devices to deal with the edge cases.
It'd be glorious, not that I'd ever happen - for multiple reasons. One of which being that ipadOS is essentially iOS, so no overlap with MacOS
All I can see right now is that it has a battery bump that people might object to.
My goals with any device is to be as slim and as vanilla Android as possible, which means Samsung can go to hell.
A friend said he liked the OnePlus tablet.
Use case: While traveling or at coffee shops, be able to switch between full laptop mode (as long as you have a table; doesn't work on your lap), and use with the pen for taking notes, drawing things etc. While not as critical as pen use, being able to take the keyboard off quickly when reading or watching videos saves space, and lets me get the screen closer.
The Samsung Galaxy Book 12 was about the perfect computer for my needs:
- decent-size high-resolution screen
- small enough to fit in a bag for when traveling
- Wacom EMR stylus --- I find this essential for drawing, sketching, annotating, and when I'm not inclined to connect a keyboard, writing
Performance was quite good, but then Fall Creators Update crippled the stylus down to an 11th touch input which scrolled in web browsers and made selecting text quite awkward, as well as making using older applications quite difficult. I rolled back to 1703 twice and stayed there until circumstances forced a replacement --- the best option I could find was a Samsung Galaxy Book 3 Pro 360 --- I have to keep the Settings app open so I can toggle the stylus between acting/not acting like a mouse.
It kills me that we had such great innovation in the tablet space once-upon-a-time (the ThinkPad was so-named because it was originally planned as a stylus computer) and my NCR-3125 (since donated to the Smithsonian) running PenPoint was one of my most-favourite computers and things seemed so promising w/ Windows 8... at least it's easy to write into text fields again.
Hopefully the Lenovo Yogabook 9i will be popular enough that someone will make a dual-screen device using Wacom EMR.
It was clearly designed to be used as a laptop, and never really as a tablet. This shows in myriad ways, from being uncomfortable to hold as a tablet (though its rounded edges are infinitely better than the Surface Studio Laptop's razor-sharp edges (which really can cut you when holding it as a tablet!), to there being NO GOOD WAY to adjust volume without opening it back up to get to the keyboard!
To be fair, half of what I hate about the Yoga is Win11. I'm definitely moving to a Linux desktop next time, if that's viable. The Starlabs StarLite would be perfect if I could get it with 32-64 GB of RAM and a fast ARM processor like the one used in the new Surface Pro
Have gotten multiple people a Surface Go 1 with 8GB ram and the keyboard and have never paid more than £80. Bizarre that they even made a 4GB model, let alone that they kept it until the second most recent version
I'm keen to try the arm version though, and the Minisforum V3 is interesting tho not much of an upgrade
I've been wanting to switch to Linux on my Pro X SQ2 for a while due to the WSL2 support on it being terrible (might be fixed now [1]) but always thought that most stuff such as LTE, webcam and surface connector wouldn't work [2].
[1] https://github.com/microsoft/WSL/issues/11274#issuecomment-2... [2] https://github.com/linux-surface/surface-pro-x/issues/1#issu...
But...if you can live with Windows on Arm (Which has improved greatly in the past year) the SP11 has been great. Battery life is incredible.
For me I was never looking to fully replace my actual laptop, but more to replace my iPad with something that is actually capable of doing any sort of development work if needed. The iPad is a much better tablet, hands down, but even just updating a static website on an iPad is an absolute chore and requires multiple apps to function.
Was yours a 4GB ram model like the article author's?
But I still do wish someone would make a Linux laptop that's as tightly integrated with the hardware as macOS is on a MacBook.
I feel that it has nothing to do with manufacturer, though, just not good enough Linux support for laptops.
I'm a huge XPS15 advocate at work and really love these machines as a Windows developer. But the standby just doesn't work. If I close the lid and throw it in my bag, then the battery will be empty and the bag will be hot as hell. This is a huge failure and makes me shutdown my XPS15 every evening. Which is just nonsense. I'm a Mac user at home and just never shut these laptops down ever.
Meanwhile, my other machine from work is a Precision workstation running Windows 10 and it gives me all kinds of power issues, more invasive updates, random restarts, random high fan RPMs, etc. Dell has already serviced the machine, twice. What a mess.
As a quick fix I assigned Ctrl-Meta-L to Sleep (Meta-L is screen lock - I'm using KDE btw). It didn't take long for me to automatically press this combo before closing the lid - I got so much used to it that I had stop stop and think when I got a new laptop later and installed linux fresh on it. And of course I just set it up like before, even though this one works :)
I feel like the forces around device driver development conspire to make sure this rarely happens, that is, we can’t have “commodity” hardware that has “cutting edge” device drivers because the time and expense of developing the driver isn’t justified with commodity pricing.
All those computers charge over USB-C with the full force of the port. This is fine. But the second the battery is completely drained, the port cannot revive that computer. You must use the laptop's crappy barrel plug.
Only Apple allows you to use only USB-C as a charger.
MacOS doesn't run on anything(1) but a Mac and people seem to be okay with that, but good grief, you tell them to pick a machine that is compatible with Linux and they lose their shit.
(1) Please don't be pedantic, I get it.
Then it is really an apple to orange comparison.
Unfortunately my SSD started to fail and battery life was poor enough that I ended up buying something else. The iFixit repair score reflects how much of a pain it would be to replace both of those. I do miss it sometimes, I really liked the 3:2 aspect ratio.
But for me, the biggest shortcoming of this arrangement is having to put up with Windows' UX. I hate every single second I have to interact with this steaming pile of crap.
Although most linux distros still have quirks (bluetooth issues, sleep/resume issues, no hibernation out of the box, high battery consumption, among a plethora a of other papercuts) I am sticking with it mainly because windows ux just sux so much.
Every new computer I buy I give the installed windows a try and oh my god, it becomes crappier with every version. For me Windows 2000 was the best... 20 years ago. It's been downhill from there.
Apple’s full vertical integration from chip on up gives them an advantage here. For example, the doubling of video playback battery life from iPhone 12 Pro Max to iPhone 13 Pro Max [1] probably came from a new low-power display plus a new video decoder in the A15 Bionic chip.
[1]: https://www.reddit.com/r/apple/comments/ppevl6/streamed_vide...
Some people don't need all that much battery life.
For me trains and buses, meeting rooms and at home there are outlets. It's a convenience thing when I want to sit at home on the couch without a cable attacked to my laptop.
> Things have improved over time but when I was using my Surface Pro 4, Linux support was still pretty lacking
I don't know why you would be surprised that Microsoft hardware fails to run Linux well.
I have this on the two touchscreen laptops I use (HP and Lenovo). So I guess that's not hardware related.
I have a bashed up Surface Pro 7 I took traveling with me. I upgraded my main PC to a Surface Pro 9 when I housed up and have been wondering what to do with with the Pro 7 because it's so battered from being thrown around and used outdoors for a year that it's not really sellable. I was thinking of turning it into a dedicated outdoor/travel computer, installing Fedora and Steam for point and click adventures, and maybe some MIDI/DJ controller software to play tunes. But I no longer have a keyboard for it, so I would need to be able to do the full Linux install by touchscreen. My other Surface is 100% bluetooth input devices to avoid cables, docks and dongles, so I could potentially pair one of those if it would help during install phase, but I wouldn't want it permanently paired. It seems like the advice online is generally "if you don't have a USB keyboard, don't bother", though. Do you think it's worth a shot?
I think you should be able to hardware reset without a keyboard - but in my experience - you really want console access when messing with bootloaders and alternative os'. Even if it is just to get to a point where on-screen/Bluetooth keyboard works... Often an USB Ethernet dongle can be useful as well (avoiding the catch-22 of needing network access to download wifi driver).
In my testing on a similar hardware (also Core M3 and 4gb RAM), Arch-based distros was the best with low RAM. And I tried like, probably 50 distros since last year...
Gnome on my HW with Arch, is as fast as KDE, and use less memory than KDE (in theory, I know RAM is a complicated subject).
Why fedora is problematic on low end hardware? Because well, Fedora uses packagekit, which is a ram hog, and this is pretty known. Is not the only reason though, I believe there's some other defaults that make it slower than arch on my HW, like zswap vs zram.
In my experience with weak CPU and low ram, was that zswap was actually the best choice. On such low RAM like 4gb, you'll really need a swap, you can't run from this. And zram won't be enough, in my experience.
Which I guess is one of the reasons why Arch go very well here, as is one of the few distros right now that does a nice default for zswap.
With Fedora, and most other distros, I get constant freezes when the RAM is full (which is pretty easy to do with 4gb), and this never happen on arch based distros.
Expected the difference with Ubuntu as it packs more out of the box for the enterprise behaviours, not so much with Fedora. I've had no freezes, faster startup and shutdown, generally more responsive desktop etc. with Arch.
Generally, though a rolling release it also has fewer moving parts as well - only having to deal with the main repo + flatpak (and a select few AUR pkgbuilds) is nice compared to Ubuntu where I had to layer deb repos + PPAs + flatpak + brew to get my tooling in place without having to script my own git-driven installers.
One thing that tripped me up on any distro - the defaults for TLP (vs power profile daemon) seem hyper conservative wrt performance, probably by design. I never bothered digging in, just switched back to PPD, but it definitely prioritises power savings above all else.
And of course just about everything has been updated many times at this point. Latest kernel, gnome, etc. Nice when a bunch of Intel driver performance improvements landed a few years ago. I got them right away after that kernel got released and noticed a slight difference. A few months ago, I noticed a few more improvements with performance when a bunch of btrfs fixes landed.
It's a good reason to stick with rolling releases. And since the Steam Deck uses Arch, getting Steam running on this was ridiculously easy. I'd use it professionally except I have a Mac Book Pro M1, which is really nice, and the Samsung laptop I run Manjaro on is not great, to put it mildly.
I check once in a while but there are a lot of compromises out there in terms of different laptops but none of them really come close to Apple. They all do some things well only to drop the ball on other things. You can have a fast laptop but not a quiet one. You can have a nice screen but then the keyboard or touchpad is meh. Or the thing just weighs a ton.
I think that was the point with the Surface Pro 4 in the article. It's a bit crap in terms of performance but the formfactor is nice-ish. Of course the touch support isn't great, which is no different with Manjaro. Except of course you do have access to all the latest attempts to address that.
I want to get away from windows completely but their support for laptops is much better.
But I'd say that's rather on the manufacturers, and not on Linux. They usually provide crappy drivers only for whatever version of windows they ship and call it a day. See all the junk that would stop working between major windows updates.
Also, how does that laptop work? Don't the screens just show up as two displays, or do they do something special?
> I want to get away from windows completely but their support for laptops is much better.
YMMV as they say... Speaking of displays specifically, we just got some brand spanking new 5k screens at work. My full intel hp enterprise laptop can't use them at 5K under windows [0], but Linux supports them perfectly, even two at a time in addition to the integrated panel. Even 4k@60 had be borked on Windows on this PC for something like 2 years after I bought it. Worked OK since day one on Linux.
---
[0] I actually did get it to work by installing the latest driver from the Intel website. But windows helpfully "updated" it back to the borked version after a reboot.
If you want a better Linux experience, you have to buy a Linux laptop, i.e. one that was designed (especially in firmware and chip selection) to run Linux, with support. You know, like you do for Windows.
And the new iPad with matte screen has a glossy frame around it. I tried it in a store and the glare around the otherwise nicely matte screen was uncomfortable.
Does anyone here have experience how well matte screen protectors for tablets work? I see them mostly discussed for they haptic feel when drawing on the tablet. I wonder how well they work to have a good experience when coding on the tablet.
https://store.minisforum.com/products/minisforum-v3
> The Minisforum V3 is a massive tablet PC with a 14-inch screen and a matte coating to reduce glare.
it's the same sort of hacks from teenage Android community to port binary blobs. if you're not familiar with that, just be glad.
in summary, old unpatched kennels with weird binary code nobody cares to understand.
The main developer is doing an amazing job, and the fact that Linux runs on so many Surfaces devices, including the ARM ones (like my SPX) is just amazing.
Linaro (Bjorn Andersson) helped quite a lot in the Linux on ARM environment, and qzed (Maximilian Luz) is doing all of the Surface reverse engineering and kernel driver in their own free time.
Sorry, I had to downvote you because this is just disrespectful on the amount of work awesome people are doing on their free time, and you clearly have no clue on what the linux-surface project is about.
[1]: https://github.com/linux-surface/kernel/commits/v6.9-surface...
At that price it should be exceptional not just good. That is not "hate" but disapointment.
One interesting thing happening in Linux now is bpf control over hid devices. Perhaps it might be possible to filter palm reads out at the kernel level with this, or eliminate ghost inputs. Hypothetically it should allow filtering the data arbitrarily. Classically I've used interception-tools in userland to do some light remapping, reading a device filtering and emitting as a virtual uhid, but this should be faster & slicker. https://www.phoronix.com/news/Linux-6.11-More-HID-BPF
I really need to switch from my Samsung Book 12 to another copy (which I already own); mine's OLED is pretty cracked: remarkably invisible when looking straight on at it, but the touch went from sometimes not working to never working. I also want to try a pen with it.
The 4GB of ram can be obnoxious. I feel like with a better nvme not sata SSD it wouldn't be such an issue but paging stuff out or in really makes the whole system lag badly sometimes, which is terrible.
I also hella recommend hibernate. I didn't trust it for years, but one day ran low on power while suspended & watched systemd wake my system up, then hibernate it, and was shocked shocked shocked that it resumed latter & worked. It takes ~10s to boot up but being able to put a project aside, and come back weeks later & pickup where I left off is amazing. Use hibernate! I think you can configure it to hibernate after X amount of time sleeping.
Guess what hibernate does? It restarts the system. After many years of carrying around a USB wifi card, when systemd hibernated my system on me, it also made the wireless card start working again! Hibernating fixed my broken wifi.
I had it swapped for a surface laptop. Forget what exactly but similar generation.
That had active cooling which I suspect made the difference. Still slow but somewhat tolerable
I tried the SP7 refurbished 3 years ago, and it was already kinda slow and not great, though it gave a clear idea of what Microsoft did with the line.
Switching to a 16G SP8 it's infinitely better. Still unreliable at times, but not that much if compared to an similar usage on an iPad pro. Battery life is workable (I get around 5~6 hours coding and compiling, usually have an external battery when out anyway).
I assume if you're looking at an M2 giving up x86 compatibility isn't an issue.
The most glaring issue on the Surface for me are too much reliance on Chrome/Edge for touch support, as Firefox is really not ready (mobile version is fine, don't know why desktop is so bad), and the port networking management in WSL2 where proxying VPNs can mess with wsl's port proxying. Otherwise I'mll be waiting for Apple to ever port macos to the iPad before reconsidering.
List of problems:
1. x86(-64) power saving (sleep) capabilities are poor; tablets are expected to consume very little battery (ie. last weeks in standby mode), while x86 eats batteries for lunch (in S-whatever); this doesn't even take into account Windows arbitrarily deciding to wake up the machine while in a bag/backpack
2. Surface Pro's and Surface Book's (the latter was state of the art in terms of tablet hardware by the time of SB1 and SB2) had OK hardware support from Linux, but it took a long while, and it wasn't very stable (eg. wifi)
3. Hardware touch support itself is not enough; software needs to be good, and there was (likely, is) no document reader with good UX and annotation capabilities on Linux
The solution for my use case was to dual boot, but points 1 and 2 were still a serious issue overall.
Nowadays:
1. there are ARM tablets, with performant power saving (sleep) mode
2. WSL sidesteps Linux hardware compatibility issues (assuming one tolerates running Windows as underlying O/S), and avoids dual boot
3. WSL also allows using better document readers/annotators
I fear WSL, but as a matter of fact, it's changing the landscape for Linux users.
In theory, Ipad Pro's would be the best of both worlds, but they have a toy O/S by design. /shrug
All I need now is a good replacement for OneNote that stores notes in an open format and supports pen input for sketching and handwritten note-taking...
The wifi stack is entirely handled by the shaddy driver, which is usually just the reference implementation from the chip manufacturer stuck in time.
That means your wifi stack will only support WPA2, and ancient cyphers with outdated parameters. No matter how up to date is your OS.
It's the lightest, most portable and comfortable laptop I've had.
* Battery life. 5-6 hours for moderate use simply does not cut it, especially since sleep drains battery like crazy because s0ix is not working properly, and debugging why is almost impossible. It's absolutely crazy how something that used to work just fine was deliberately botched because MS/Intel decided everything has to be a phone.
* So because of this, you need to shut down the tablet if not used, which wouldn't be too bad, but as TFA says, you need a keyboard to enter the LUKS decryption password.
* As a pure reading device, it's too heavy.
Apart from that, Firefox is basically unusable because backspace does not work properly because of this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1832876
So in the end, while it's working, there's still a lot of janky behavior, which makes the experience just frustrating.