Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
mawarannahr
May 21, 2019

cruft posted:

X11 was designed before anybody knew what was going to unfold when it came to graphics on computers. Wayland has the benefit of seeing what decades of user interfaces had in common.

Some things that jump to mind immediately:

X11 has at least two different clipboard standards, and every app has to implement both. It was based around 8-bit characters, so handling unicode requires yet another funky extension. 9wm (my window manager) just sidestepped the whole issue, getting to claim "hey we're a legacy Window Manager that's mostly of historical interest". Because rendering unicode strings requires fancy extensions and libraries and bonkers font setup on the server, nobody bothers: they just use GTK+ or Qt. Not only that, subpixel glyph antialiasing isn't implemented by the X server, so unless you like the 1997 look of chunky pixellated fonts on your 72dpi monitor, you have to render fonts client-side (in the app). That means you also have to reimplement text selection and all the other text crap that the server provides. Every modern app is pretty much just sidestepping the bulk of what X11 provides, doing rendering locally, and telling X "please update the screen based on this bitmap in shared memory". It's pretty much a klunkier version of Wayland's frame buffer model.

Your fancy local-font-rendering app also has to track every mouse movement, which is sent over a Unix domain socket, because X was designed to be network transparent. There's a ton of back-and-forth in a select loop, triggering pantloads of system calls and context switches just to move the damned mouse. This is not what X was designed to do.

If you use something written to use Athena widgets, like, say, xclock, or xfontsel, it's super fast. You can even run it on a remote system and display on your local workstation, and it uses the locally installed fonts. It probably seems bonkers to modern desktop users that you'd want to launch an app on a remote system and have it see your local fonts and widget preferences (theme), but that's what X was designed to do. You could even run an X server on low-cost desktop hardware and run the window manager and everything else on a big beefy server. This is how my roommate and I were set up in college: he used a Sun 3 with a 60 pound black and white cathode ray tube, that network booted from my Linux workstation, so everything he did was on my Linux box, including the window manager, login screen, and basically everything but the graphics.

And I'm just focusing on the two or three things I know about : there are dozens of problems with X11 like mode switching, multi-monitor dot pitches, and other things I'm not even aware of.

You don't need to understand anything I just wrote, though. It's enough to remember that X11 is from like 1982, and it's just old and creaky.

I love reading about this kind of stuff. Thank you for sharing :cheers:

Adbot
ADBOT LOVES YOU

xzzy
Mar 5, 2009

The best part of X in the 90s is security didn't exist yet so you could telnet into your friend's workstation, run 'xhost +' and fire up xterms in a while loop and render his desktop useless.

cruft
Oct 25, 2007

Even better, you could run xspy that my coworker wrote, and log every keystroke.

mystes
May 31, 2006

X11 is clearly about radical transparency*


*: As long as it's not true transparency

Klyith
Aug 3, 2007

GBS Pledge Week

cruft posted:

the ultimate post / username combo

Oh yeah that's the stuff.

I very much agree with the perspective that it doesn't matter what the devs like, if the user experience is worse. But my experience with Wayland has been that everything is improving at a pretty rapid pace. My experience with X was that stuff that bugged me in 2003 was still annoying in 2023. So I'm firmly of the belief that Wayland will be a better user experience than X in all cases sometime soon-ish.

Of course it helps that I don't have a lot of need for remote desktop or video capture so I'm not dealing with permissions popups all the time.


cruft posted:

It probably seems bonkers to modern desktop users that you'd want to launch an app on a remote system and have it see your local fonts and widget preferences (theme), but that's what X was designed to do. You could even run an X server on low-cost desktop hardware and run the window manager and everything else on a big beefy server.

It is bonkers, and I actually *did* that.

When I was in college, in the year 2000, the compsci assignments all had to be done on sun workstations in the lab rooms. I installed suse and figured out remote X desktop, so I could do them from my dorm. In related events, I became a computer toucher instead of a programmer.

Less Fat Luke
May 23, 2003

Exciting Lemon

Tad Naff posted:

Any Synergy users here? First day of work today and somehow it was fully broken on my main machine (Fedora 39). Luckily I had the previous version's RPM lying around but I spent a long time today trying to figure out the issue, never did. Broken version is 3.0.78.1, working version 3.0.77.2. The only clues I found were references to gdm. The packages from Symless say they're for Fedora 38, did something change around gdm for 39?
I can't help with your specific problem but after a lot of bullshit with Synergy I switched to Input Leap and it's been working solid for like a year now between my Windows and Linux PCs.

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.

Klyith posted:

When I was in college, in the year 2000, the compsci assignments all had to be done on sun workstations in the lab rooms. I installed suse and figured out remote X desktop, so I could do them from my dorm. In related events, I became a computer toucher instead of a programmer.

Around the same time my compsci department had Suns and SGI O2s in the class rooms. The O2s had Mozilla Thunderbird installed but were usually all in use. So I logged in to a Sun and then started TB remotely from random O2.

cruft
Oct 25, 2007

Saukkis posted:

Around the same time my compsci department had Suns and SGI O2s in the class rooms. The O2s had Mozilla Thunderbird installed but were usually all in use. So I logged in to a Sun and then started TB remotely from random O2.

This sort of thing BLEW THE GRADUATE STUDENTS' MINDS

mawarannahr
May 21, 2019

Why are fonts like this? They've been like this for a long time. Why doesn't someone do something?? The font formats support Unicode!!! It makes it annoying to choose a font and it often makes the font chooser slow to a crawl.

An example but it's not just Noto:

quote:

  • Noto Sans Thai
  • Noto Sans Modi
  • Noto Sans Pahawh Hmong
  • Noto Serif Yezidi
  • Noto Sans Old North Arabian
  • Noto Sans Cypriot
  • Noto Sans Psalter Pahlavi
  • Noto Sans Warang Citi
  • Noto Sans Telugu UI
  • Noto Sans Lisu
  • Noto Sans Thai UI
  • Noto Sans Tamil UI
  • Noto Sans Sogdian
  • Noto Sans Mongolian
  • Noto Sans Limbu
  • Noto Serif CJK SC
  • Noto Sans Arabic UI
  • Noto Sans Ugaritic
  • Noto Sans Mono
  • Noto Sans Khmer
  • Noto Serif CJK TC
  • Noto Sans Armenian
  • Noto Sans Gujarati
  • Noto Sans Gujarati UI
  • Noto Sans Oriya
  • Noto Sans Wancho
  • Noto Sans Thai UI
  • Noto Sans Caucasian Albanian
  • Noto Serif Hebrew
  • Noto Sans Inscriptional Parthian
  • Noto Serif Hebrew
  • Noto Sans Mayan Numerals
  • Noto Sans Takri
  • Noto Sans Adlam Unjoined
  • Noto Sans SignWriting
  • Noto Naskh Arabic
  • Noto Sans Tifinagh Hawad
  • Noto Sans CJK HK
  • Noto Serif Telugu
  • Noto Sans Cuneiform
  • Noto Rashi Hebrew
  • Noto Serif CJK JP
  • Noto Serif CJK HK
  • Noto Serif CJK KR
  • Noto Sans Devanagari UI
  • Noto Serif Tamil
  • Noto Sans Syriac
  • Noto Sans CJK JP
  • Noto Sans CJK HK
  • Noto Sans CJK KR
  • Noto Sans CJK TC
  • Noto Sans Tifinagh
  • Noto Serif CJK KR
  • Noto Sans Sora Sompeng
  • Noto Serif Display
  • Noto Sans Ol Chiki
  • Noto Sans CJK KR
  • Noto Serif Tamil
  • Noto Serif Balinese
  • Noto Sans Myanmar
  • Noto Serif Gurmukhi
  • Noto Looped Thai
  • Noto Sans Gujarati UI
  • Noto Sans Marchen
  • Noto Sans Saurashtra
  • Noto Serif Ahom
  • Noto Serif Yezidi
  • Noto Serif Bengali
  • Noto Sans Tifinagh Tawellemmet
  • Noto Sans CJK SC
  • Noto Serif CJK SC
  • Noto Sans Bamum
  • Noto Sans CJK TC
  • Noto Sans CJK JP
  • Noto Sans Runic
  • Noto Serif CJK JP
  • Noto Serif Khojki
  • Noto Sans New Tai Lue
  • Noto Sans Kannada UI
  • Noto Kufi Arabic
  • Noto Sans CJK KR
  • Noto Sans Old Sogdian
  • Noto Looped Thai UI
  • Noto Sans Oriya UI
  • Noto Serif Gujarati
  • Noto Serif Armenian
  • Noto Serif Display
  • Noto Sans Canadian Aboriginal
  • Noto Sans Balinese
  • Noto Sans Lisu
  • Noto Sans
  • Noto Sans Tifinagh Air
  • Noto Sans CJK HK
  • Noto Sans Bhaiksuki
  • Noto Serif Khmer
  • Noto Sans Javanese
  • Noto Sans CJK SC
  • Noto Serif Malayalam
  • Noto Sans Display
  • Noto Sans Balinese
  • Noto Sans Linear B
  • Noto Sans Kannada
  • Noto Sans Lycian
  • Noto Sans Thai
  • Noto Sans Shavian
  • Noto Sans Bengali
  • Noto Sans Khudawadi
  • Noto Sans Yi
  • Noto Sans Linear A
  • Noto Sans Ol Chiki
  • Noto Sans Inscriptional Pahlavi
  • Noto Serif Dogra
  • Noto Sans Lydian
  • Noto Sans Tagalog
  • Noto Serif CJK SC
  • Noto Sans Osmanya
  • Noto Sans Hanunoo
  • Noto Sans Bamum
  • Noto Sans Devanagari
  • Noto Sans Meetei Mayek
  • Noto Serif Grantha
  • Noto Serif CJK TC
  • Noto Sans Khmer UI
  • Noto Sans Ethiopic
  • Noto Sans Old South Arabian
  • Noto Sans Oriya
  • Noto Sans Elbasan
  • Noto Serif Myanmar
  • Noto Sans Georgian
  • Noto Serif Tangut
  • Noto Sans Tifinagh Adrar
  • Noto Sans CJK SC
  • Noto Sans Lao UI
  • Noto Sans Grantha
  • Noto Serif CJK JP
  • Noto Sans Bassa Vah
  • Noto Serif CJK JP
  • Noto Serif CJK KR
  • Noto Serif CJK HK
  • Noto Looped Lao UI
  • Noto Sans Gurmukhi UI
  • Noto Serif Ethiopic
  • Noto Sans Gurmukhi
  • Noto Serif Sinhala
  • Noto Sans
  • Noto Sans Kharoshthi
  • Noto Sans Armenian
  • Noto Sans Rejang
  • Noto Serif CJK SC
  • Noto Serif CJK HK
  • Noto Sans Javanese
  • Noto Sans Medefaidrin
  • Noto Sans CJK KR
  • Noto Sans Sinhala UI
  • Noto Sans Medefaidrin
  • Noto Sans Meetei Mayek
  • Noto Sans Devanagari UI
  • Noto Serif Hmong Nyiakeng
  • Noto Serif
  • Noto Sans Nushu
  • Noto Serif Devanagari
  • Noto Sans Tai Viet
  • Noto Sans Duployan
  • Noto Sans Buhid
  • Noto Sans Thaana
  • Noto Sans Mro
  • Noto Sans Tamil
  • Noto Sans Display
  • Noto Sans Kayah Li
  • Noto Sans NKo
  • Noto Sans Deseret
  • Noto Sans Sundanese
  • Noto Sans Adlam Unjoined
  • Noto Sans CJK JP
  • Noto Sans CJK JP
  • Noto Sans Osage
  • Noto Sans Cham
  • Noto Sans Tifinagh Azawagh
  • Noto Sans Canadian Aboriginal
  • Noto Serif Ethiopic
  • Noto Serif Tamil Slanted
  • Noto Sans Lepcha
  • Noto Sans Lao
  • Noto Sans CJK JP
  • Noto Serif
  • Noto Serif CJK SC
  • Noto Sans Miao
  • Noto Looped Thai
  • Noto Sans Tifinagh APT
  • Noto Sans Hanifi Rohingya
  • Noto Sans Myanmar UI
  • Noto Serif Georgian
  • Noto Sans Khmer UI
  • Noto Sans Malayalam UI
  • Noto Serif Display
  • Noto Serif CJK TC
  • Noto Sans Old Turkic
  • Noto Serif Lao
  • Noto Sans CJK KR
  • Noto Sans Newa
  • Noto Music
  • Noto Serif CJK KR
  • Noto Sans Oriya UI
  • Noto Sans Egyptian Hieroglyphs
  • Noto Sans Imperial Aramaic
  • Noto Sans CJK HK
  • Noto Sans Devanagari
  • Noto Serif CJK HK
  • Noto Sans Math
  • Noto Sans CJK SC
  • Noto Serif CJK JP
  • Noto Sans Tirhuta
  • Noto Sans Tifinagh Ghat
  • Noto Sans Display
  • Noto Sans Malayalam UI
  • Noto Sans Buginese
  • Noto Sans Myanmar
  • Noto Serif Khmer
  • Noto Sans Old Italic
  • Noto Serif Thai
  • Noto Serif CJK SC
  • Noto Traditional Nushu
  • Noto Sans Myanmar UI
  • Noto Sans Masaram Gondi
  • Noto Serif Gurmukhi
  • Noto Sans Syloti Nagri
  • Noto Sans Bengali UI
  • Noto Sans Kannada UI
  • Noto Sans Avestan
  • Noto Sans Sinhala
  • Noto Sans CJK TC
  • Noto Sans Old Permic
  • Noto Sans Palmyrene
  • Noto Sans Malayalam
  • Noto Sans Sundanese
  • Noto Serif CJK SC
  • Noto Sans Ethiopic
  • Noto Serif Myanmar
  • Noto Serif
  • Noto Rashi Hebrew
  • Noto Sans Khojki
  • Noto Sans Gurmukhi
  • Noto Naskh Arabic UI
  • Noto Looped Lao UI
  • Noto Sans CJK SC
  • Noto Serif Armenian
  • Noto Sans CJK TC
  • Noto Serif CJK HK
  • Noto Nastaliq Urdu
  • Noto Sans Bengali
  • Noto Sans CJK JP
  • Noto Sans Soyombo
  • Noto Sans Pau Cin Hau
  • Noto Sans Gothic
  • Noto Sans Samaritan
  • Noto Sans Coptic
  • Noto Serif CJK HK
  • Noto Serif CJK KR
  • Noto Sans Malayalam
  • Noto Sans Kaithi
  • Noto Sans Tagbanwa
  • Noto Serif CJK KR
  • Noto Sans Adlam
  • Noto Sans Meroitic
  • Noto Sans CJK SC
  • Noto Serif CJK TC
  • Noto Sans Mono CJK TC
  • Noto Sans CJK KR
  • Noto Serif Kannada
  • Noto Sans Tifinagh Ahaggar
  • Noto Sans Mono CJK SC
  • Noto Sans Gunjala Gondi
  • Noto Sans Mono CJK KR
  • Noto Sans Mono CJK HK
  • Noto Sans Arabic
  • Noto Sans Mono CJK JP
  • Noto Sans Khmer
  • Noto Sans
  • Noto Sans Tamil Supplement
  • Noto Serif CJK TC
  • Noto Sans Old Persian
  • Noto Sans Anatolian Hieroglyphs
  • Noto Sans Tamil UI
  • Noto Sans Symbols2
  • Noto Serif CJK JP
  • Noto Sans Mono
  • Noto Sans Manichaean
  • Noto Looped Lao
  • Noto Sans Batak
  • Noto Serif Display
  • Noto Sans Sharada
  • Noto Sans Tai Tham
  • Noto Kufi Arabic
  • Noto Sans Hatran
  • Noto Serif CJK KR
  • Noto Sans CJK HK
  • Noto Sans Thaana
  • Noto Serif Hmong Nyiakeng
  • Noto Sans Sinhala UI
  • Noto Sans Multani
  • Noto Looped Thai UI
  • Noto Sans Lao UI
  • Noto Naskh Arabic UI
  • Noto Sans Cham
  • Noto Sans Arabic
  • Noto Sans Display
  • Noto Sans Gujarati
  • Noto Sans Carian
  • Noto Sans Kannada
  • Noto Mono
  • Noto Sans Chakma
  • Noto Sans Hanifi Rohingya
  • Noto Serif Devanagari
  • Noto Serif CJK TC
  • Noto Sans Tai Tham
  • Noto Serif Gujarati
  • Noto Sans Mono CJK SC
  • Noto Serif Tibetan
  • Noto Serif CJK HK
  • Noto Sans Mono CJK TC
  • Noto Sans Zanabazar Square
  • Noto Sans Cherokee
  • Noto Sans Brahmi
  • Noto Serif Georgian
  • Noto Sans Symbols
  • Noto Sans Mende Kikakui
  • Noto Serif Bengali
  • Noto Sans Vai
  • Noto Sans Lao
  • Noto Serif CJK TC
  • Noto Sans Elymaic
  • Noto Sans Sinhala
  • Noto Sans Symbols
  • Noto Serif Telugu
  • Noto Sans Mono CJK HK
  • Noto Sans Cherokee
  • Noto Sans Mono CJK KR
  • Noto Sans Mono CJK JP
  • Noto Sans Gurmukhi UI
  • Noto Serif Tibetan
  • Noto Naskh Arabic
  • Noto Sans Arabic UI
  • Noto Sans Georgian
  • Noto Sans Telugu
  • Noto Sans CJK TC
  • Noto Serif
  • Noto Color Emoji
  • Noto Sans CJK HK
  • Noto Sans Telugu UI
  • Noto Sans CJK JP
  • Noto Sans Hebrew
  • Noto Sans CJK KR
  • Noto Sans CJK HK
  • Noto Serif Lao
  • Noto Sans Mandaic
  • Noto Sans CJK TC
  • Noto Serif Tamil Slanted
  • Noto Sans Kayah Li
  • Noto Sans Mahajani
  • Noto Sans CJK SC
  • Noto Nastaliq Urdu
  • Noto Sans Old Hungarian
  • Noto Serif Thai
  • Noto Sans Indic Siyaq Numbers
  • Noto Serif Sinhala
  • Noto Sans Adlam
  • Noto Sans Tifinagh SIL
  • Noto Serif CJK JP
  • Noto Sans Bengali UI
  • Noto Sans Siddham
  • Noto Sans Ogham
  • Noto Serif Khojki
  • Noto Sans Telugu
  • Noto Sans Tai Le
  • Noto Sans PhagsPa
  • Noto Sans Phoenician
  • Noto Sans CJK TC
  • Noto Sans Tifinagh Agraw Imazighen
  • Noto Sans Tifinagh Rhissa Ixa
  • Noto Sans
  • Noto Sans Hebrew
  • Noto Sans Sora Sompeng
  • Noto Sans Tamil
  • Noto Serif Malayalam
  • Noto Serif Kannada
  • Noto Looped Lao
  • Noto Sans Glagolitic
  • Noto Sans Nabataean

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

You don’t want a font that supports all of Unicode because loading the metadata for it would be huge and slow, and you don’t want every font to have to have every glyph in it in order to be used. Font selection for different glyphs (weights, sizes, ligatures, blah blah) should be picking the underlying fonts as needed, but I agree that font selection UI is a pile of butt generally. It should just let you say “use this whole family, ok?” and hide the component fonts unless you engage font-nerd mode.

cruft
Oct 25, 2007

Noto was a good one to pick: the goal of that font is to have "No Tofu". They want to map every single glyph in Unicode.

Maybe one day we'll have systems that can handle 3GB font files, but right now, it's more space efficient and easier on everybody to rely on "glyph borrowing" built in to basically everything. Then, if you're setting up a system and you're sure you will only need Latin, Klingon, and Tamil, you can only drop those font files, and save cost on not needing a massive Micro SD card for your gigantic font when you ship units.

Not to mention, embedding a 3GB font in a web page is going to make page loads slow as hell.

Basically, it'll happen, but we're not there yet. Back in college, everybody was struggling with color pallette switching. The VGA chip could only show 256 colors at a time, so if you went into Netscape, it would be like "I don't care what the other windows are doing, I need all 256" and your paint program colors would go bonkers until you clicked that back into focus. At the time, we were all "this sucks, one day we're going to look back on this and be glad we don't have to deal with it any more". And I'm here in the future to tell you that we were right: that was the worst.

cruft fucked around with this message at 20:08 on Jan 3, 2024

mystes
May 31, 2006

There are obviously reasons for splitting the physical files, both in terms of size and in terms of being able to set whether Chinese or Japanese versions of characters are the default on a device, but, yeah there should clearly be some way to collapse them into a single entry when selecting a font from a UI perspective.

mawarannahr
May 21, 2019

I wrote some C to interpret and update tables within a TTF file before. There are a lot of tricks in the format to save as much memory as possible -- practically everything is specified in terms of offsets and lengths. It's been a long time but think it should be possible to avoid loading the entire font into memory (at worst, mmap to make it easier). The main thing is an UI issue though. I just really wonder why it's like this as it's a very common PITA and I don't get why it was done this way :(

cruft
Oct 25, 2007

mawarannahr posted:

I wrote some C to interpret and update tables within a TTF file before. There are a lot of tricks in the format to save as much memory as possible -- practically everything is specified in terms of offsets and lengths. It's been a long time but think it should be possible to avoid loading the entire font into memory (at worst, mmap to make it easier). The main thing is an UI issue though. I just really wonder why it's like this as it's a very common PITA and I don't get why it was done this way :(

I love the notion that mmapping a 2023 font would exhaust the addressable userspace memory on a 32-bit architecture.

I have this little LEGO Margaret Hamilton on my desk. She's standing there with her pile of books, containing printouts of the Apollo code. I like to imagine her judging my decisions. That this font exists is absolutely appalling to 1960s LEGO Margaret Hamilton.

mawarannahr
May 21, 2019

cruft posted:

I love the notion that mmapping a 2023 font would exhaust the addressable userspace memory on a 32-bit architecture.

lol I hadn't considered the format might break due to integer overflow in offset/length fields but I assume otf fixed that / new tables could have fixed it. they do have some tricks though like using offsets from powers of 2 to keep the format tight.

vv mmap isn't necessary, probably more convenient than what was kind of like reading from some sort of tape. But just grouping the fonts by metadata would fix the UI issue.

mawarannahr fucked around with this message at 21:01 on Jan 3, 2024

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

having to shift mmap windows during text layout (and again for rendering!) to conserve address space would have really made the Linux desktop feel zippy

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
Is there a VNC setup I can use in this day and age that will start up before a local login? I've particularly been trying Tiger VNC and KDE's own krfb. Both require that I have fully logged in to the actual machine on its local screen first. So the only solution I'd have is to enable auto-login, and I really don't want to do that.

Mr. Crow
May 22, 2008

Snap City mayor for life
I haven't had to do that in a while esp. since wayland, if your on X I think something like this should work?

https://wiki.archlinux.org/title/TigerVNC#With_systemd

No idea with wayland, no machine maybe might support it?

Nitrousoxide
May 30, 2011

do not buy a oneplus phone



Rocko Bonaparte posted:

Is there a VNC setup I can use in this day and age that will start up before a local login? I've particularly been trying Tiger VNC and KDE's own krfb. Both require that I have fully logged in to the actual machine on its local screen first. So the only solution I'd have is to enable auto-login, and I really don't want to do that.

Perhaps ssh into the account and a dbus command to start a wayland session (assuming that's your compositor)?

code:
dbus-run-session -- gnome-shell --display-server --wayland
https://stackoverflow.com/questions/31213773/how-to-start-gnome-wayland-session-from-command-line-tty

Armauk
Jun 23, 2021


mawarannahr posted:

I wrote some C to interpret and update tables within a TTF file before. There are a lot of tricks in the format to save as much memory as possible -- practically everything is specified in terms of offsets and lengths.

Can you share the code?

mawarannahr
May 21, 2019

Armauk posted:

Can you share the code?

GitHub wasn't around yet but here's Apple's docs. It was kind of fun to figure out once I got the idea. Lots of bit twiddling and big endian poo poo. A good way to learn C imo (I would also reimplement the same as a learning project for other languages, even Ruby). Unfortunately I feel like I'm not as smart as I was back then... misspent youth :allears:

You can see more clever tricks like the stuff below everywhere in the format. Incidentally, someone posted a blog a few days ago pn HN about their more recent experience working with the format: Writing a TrueType font renderer

Anyway
Character to Glyph Mapping Table - TrueType Reference Manual

developer.apple.com posted:


### 'cmap' format 4

Format 4 is a two-byte encoding format. It should be used when the character codes for a font fall into several contiguous ranges, possibly with holes in some or all of the ranges. That is, some of the codes in a range may not be associated with glyphs in the font. Two-byte fonts that are densely mapped should use Format 6.

The table begins with the format number, the length and language. The format-dependent data follows. It is divided into three parts:

  • A four-word header giving parameters needed for an optimized search of the segment list
  • Four parallel arrays describing the segments (one segment for each contiguous range of codes)
  • A variable-length array of glyph IDs

'cmap' format 4


UInt16 format
Format number is set to 4

UInt16 length
Length of subtable in bytes

UInt16 language
Language code (see above)

UInt16 segCountX2
2 * segCount

UInt16 searchRange
2 * (2**FLOOR(log2(segCount)))

UInt16 entrySelector
log2(searchRange/2)

UInt16 rangeShift
(2 * segCount) - searchRange

UInt16 endCode[ segCount ]
Ending character code for each segment, last = 0xFFFF.

UInt16 reservedPad
This value should be zero

UInt16 startCode[ segCount ]
Starting character code for each segment

UInt16 idDelta[ segCount ]
Delta for all character codes in segment

UInt16 idRangeOffset[ segCount ]
Offset in bytes to glyph indexArray, or 0

UInt16 glyphIndexArray[variable]
Glyph index array

The number of segments is specified by the variable
segCount. This variable is not explicitly used in the
Format 4 table, however it is the number from which all of the table parameters are derived. The segCount is the number of contiguous code ranges in the font. The searchRange value is twice the largest power of 2 that is less than or equal to
segCount.

The searchRange, entrySelector, and rangeShift fields are not used on Apple platforms but should be set correctly for compatibility with other platforms.

Example Format 4 subtable values are shown in this table:

segCount
39
Not calculated; determined from the organization of the glyph indices

searchRange
64
(2 * (largest power of 2 <= 39)) = 2 * 32

entrySelector
5
(log2(the largest power of 2 < segCount))

rangeShift
14
(2 * segCount) - searchRange = (2 * 39) - 64


Each segment is described by a startCode, an endCode, an idDelta and an idRangeOffset. These are used for mapping the character codes in the segment. The segments are sorted in order of increasing endCode values.

To use these arrays, it is necessary to search for the first
endCode that is greater than or equal to the character code
to be mapped. If the corresponding startCode is less than
or equal to the character code, then use the corresponding
idDelta and idRangeOffset to map the character
code to the glyph index. Otherwise, the missing character glyph is returned. To ensure that the search will terminate, the final endCode value must be 0xFFFF. This segment need not contain any valid mappings. It can simply map the single character code 0xFFFF to the missing character glyph, glyph
0.

If the idRangeOffset value for the segment is not 0, the mapping of the character codes relies on the glyphIndexArray. The character code offset from startCode is added to the idRangeOffset value. This sum is used as an offset from the current location within idRangeOffset itself to index out the correct glyphIdArray value. This indexing method works because glyphIdArray immediately follows idRangeOffset in the font file. The address of the glyph index is given by the following equation:

glyphIndexAddress = idRangeOffset[ i ] + 2 * (c - startCode[ i ]) + (Ptr) &idRangeOffset[ i ]

Multiplication by 2 in this equation is required to convert the value into bytes.

Alternatively, one may use an expression such as:

glyphIndex = *( &idRangeOffset[ i ] + idRangeOffset[ i ] / 2 + (c - startCode[ i ]) )

This form depends on idRangeOffset being an array of UInt16's.

Once the glyph indexing operation is complete, the glyph ID at the indicated address is checked. If it's not 0 (that is, if it's
not the missing glyph), the value is added to idDelta[ i ] to
get the actual glyph ID to use.

If the idRangeOffset is 0, the idDelta value is added directly to the character code to get the corresponding glyph index:

glyphIndex = idDelta[ i ] + c

NOTE: All idDelta[ i ] arithmetic is modulo 65536.

mawarannahr fucked around with this message at 16:49 on Jan 4, 2024

BlankSystemDaemon
Mar 13, 2009



The best thing about X is that it's called that because it was "one better than" the windowing system called W on an OS called V.

Rules of pun also apply to how XFree86 got to be called that, because it was the free reimplementation of X386, which was a proprietary port for X to the i386, when the latter was still new.

Computer viking
May 30, 2011
Now with less breakage.

Wayland really should have been called Y.chaos or some other dumb pun on X.org .

xzzy
Mar 5, 2009

Unfortunately we no longer live in the era of pun names, we live in an era where it needs to be easy to get the top result in a google search.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

see also Xr =~ Cairo

Toshok of lesstif and other fame had a Y window system hobby project for a while too, IIRC

Pablo Bluth
Sep 7, 2007

I've made a huge mistake.

Rocko Bonaparte posted:

Is there a VNC setup I can use in this day and age that will start up before a local login? I've particularly been trying Tiger VNC and KDE's own krfb. Both require that I have fully logged in to the actual machine on its local screen first. So the only solution I'd have is to enable auto-login, and I really don't want to do that.
It's RDP not VNC and it's currently doomed by Wayland, but xrdp works as you need. It's how i use my linux desktop from my windows desktop.

Nitrousoxide
May 30, 2011

do not buy a oneplus phone



On the topic of dumb names... One of Redhat's pipeline projects, bootupd which, among other things, should let the user reboot to apply (non-kernel) updates without doing a full back-to-the-bios/uefi reboot doesn't actually use a daemon despite the name's implication

quote:

Why is bootupd a daemon?

It's not, really. The name was intended to be "bootloader-upDater" not "bootloader-updater-Daemon"; the choice of a "d" suffix is in retrospect probably too confusing.

pseudorandom name
May 6, 2007

Subjunctive posted:

see also Xr =~ Cairo

Toshok of lesstif and other fame had a Y window system hobby project for a while too, IIRC

We could've been using Berlin on GGI.

Volguus
Mar 3, 2009

Rocko Bonaparte posted:

Is there a VNC setup I can use in this day and age that will start up before a local login? I've particularly been trying Tiger VNC and KDE's own krfb. Both require that I have fully logged in to the actual machine on its local screen first. So the only solution I'd have is to enable auto-login, and I really don't want to do that.

Hmm, I have a VM that I VNC to, but only via a SSH forwarded port (works from windows and linux). And now that you asked, I looked to see what am I using and how I configured things:

- Display manager is lightdm (no VNC support configured for it)
- Session is openbox
- VNC server is TigerVNC

And I have no loving clue what is going on and how they're configured. Done this a decade ago and it's working and I have no idea what's what.

In /etc/tigervnc/vncserver.users I have defined my user to a specific VNC display number: :1=user
I have the vncserver@:1 service enabled and started. The display-manager is enabled and started. I ssh to the computer, then I can nicely VNC to it via the local forwarded port.

I ... think it automatically logs in but I'm not 100% sure. Just SSH-ing to the thing, it shows me the following processes:

pre:
    433 ?        S      0:00 xinit /etc/lightdm/Xsession /usr/bin/openbox-session -- /usr/bin/Xvnc :1 -alwaysshared -geometry 1920x1080 -localhost -auth /home/user/.Xauthority -desktop VM:1 (user) -pn -rfbauth /home/user/.vnc/passwd -rfbport 5901
    442 ?        S      0:00 /usr/bin/Xvnc :1 -alwaysshared -geometry 1920x1080 -localhost -auth /home/user/.Xauthority -desktop VM:1 (user) -pn -rfbauth /home/user/.vnc/passwd -rfbport 5901
    444 ?        S      0:00 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX
I hope this poo poo never breaks, cause I don't know how to fix it.

cruft
Oct 25, 2007

Volguus posted:

I hope this poo poo never breaks, cause I don't know how to fix it.

This post reminded me of Lilo and x modelines.

CaptainSarcastic
Jul 6, 2013



cruft posted:

This post reminded me of Lilo and x modelines.

I think Mandrake used Lilo instead of GRUB, back in the day.

Also, was it Gnome that relied on Compiz for compositing, or was it more general? The reference to Cairo earlier made me remember Compiz for some reason.

Voodoo Cafe
Jul 19, 2004
"You got, uhh, Holden Caulfield in there, man?"

CaptainSarcastic posted:

I think Mandrake used Lilo instead of GRUB, back in the day.

Also, was it Gnome that relied on Compiz for compositing, or was it more general? The reference to Cairo earlier made me remember Compiz for some reason.

by default gnome 2/3 use metacity/mutter as their windowmanager respectively but you could install compiz and use it instead for your wobbly window needs

also jesus i never would have put the cairo pun together in 100 years

Tad Naff
Jul 8, 2004

I told you you'd be sorry buying an emoticon, but no, you were hung over. Well look at you now. It's not catching on at all!
:backtowork:
I'm probably SOL but thought I'd ask anyway. I have an ancient Macbook Air running Fedora 39 and have just discovered the joys of PD. I got a nice USB4 (is that a thing? AliExpress says it is) cable rated for 120W and a power supply. It powers fine. Anyway, I want it to suspend/hibernate at night but still have the power connected, because I want to destroy all rechargeable batteries and insist on having them powered all the time. OK not really, but I'm an old with Habits. The thing is, when I close the lid and put it on the floor by the bed at night the magsafe connector inevitably joggles a bit because the cable is thick and stiff, and the Macbook helpfully fires up again because I obviously want it to at 2AM when I'm going to sleep. Rinse, repeat until I give up and power down and disconnect the cable.

I've found how to disable "AutoBoot" on old pre-M(1|2) Macs ("sudo nvram AutoBoot=%00"), but that only works if you haven't blown away OSX and installed Fedora. I optimistically did a "dnf whatprovides */nvram" but that only gives me some stuff from QEMU and MAME. How do I disable this feature that it's hard to imagine anyone wanting? I'm not averse to surgery, if there's a sensor I can disconnect or something like that.

pseudorandom name
May 6, 2007

That'll be an EFI variable, you can use the efivar command or /sys/firmware/efi to manipulate them.

Tad Naff
Jul 8, 2004

I told you you'd be sorry buying an emoticon, but no, you were hung over. Well look at you now. It's not catching on at all!
:backtowork:

pseudorandom name posted:

That'll be an EFI variable, you can use the efivar command or /sys/firmware/efi to manipulate them.

So there's hope!

But I'm not seeing AutoBoot anywhere here:

code:
root@brahma:~# efivar -l|grep -i boot
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootCurrent
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootOrder
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0002
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0001
7c436110-ab2a-4bbb-a880-fe41995c9f82-boot-gamma
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0000
7c436110-ab2a-4bbb-a880-fe41995c9f82-efi-boot-device
7c436110-ab2a-4bbb-a880-fe41995c9f82-efi-boot-device-data
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0080
62bf9b1c-8568-48ee-85dc-dd3057660863-boot-feature-usage
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0081
7c436110-ab2a-4bbb-a880-fe41995c9f82-efi-backup-boot-device-data-data
7c436110-ab2a-4bbb-a880-fe41995c9f82-efi-backup-boot-device
7c436110-ab2a-4bbb-a880-fe41995c9f82-efi-backup-boot-device-data
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0082
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootFFFF
I don't want to go changing those without clue. Searching for that 8be... GUID got me this page which doesn't shed much light. Seven "Boot"s? On a machine with one drive with 4 partitions, only one of which is bootable? Those Apple scamps, always thinking different... anyway, looking at the values in there they seem to be OS identifiers of some sort, 0000 has 'ubuntu' in it which is the first distro I tried (Ubuntu didn't work too well). Apple shows up in 0080. But no 'Auto' anywhere ("boot-feature-usage" looked promising, but nope).

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I ended up starting a tiger VNC server in a separate session in a virtual frame buffer. When I connected the machine to the lab equipment, the video forced the physical screen frame buffer to 1280x1024. I have no idea of RDP can work on a separate buffer like that, but I'd want to try that too in case it's faster.

I'd still much rather have it right next to me, of course. How abnormal is it these days if you're day-to-day engineering work is Linux that you have to use a Windows laptop for everything? I'm pretty sure I'm not being crazy on this being ridiculous.

mawarannahr
May 21, 2019

just want to say turbovnc is good and you should try it if you aren't committed to tigervnc. They very recently had a new release too.
TurboVNC | About / What About TigerVNC?

turbovnc.org posted:

The TigerVNC Project was founded by some of the former TightVNC developers, Red Hat, and The VirtualGL Project in early 2009, with the goal of providing a high-performance VNC solution based on the RealVNC 4 and X.org code bases. Throughout 2010 and 2011, The VirtualGL Project contributed many hours of labor (probably half of them pro bono) to the development of TigerVNC, in hopes of turning TigerVNC into "TurboVNC 2.0." Ultimately, however, it became apparent that, both from a technological and a political point of view, making TigerVNC into a TurboVNC work-alike was going to be like fitting a square peg into a round hole. Unlike TurboVNC, TigerVNC is not focused on 3D and video applications, so its developers were not generally very concerned with making such applications performant by default. Furthermore, there was resistance to including some of TurboVNC's 3D-specific features, such as automatic lossless refresh, in TigerVNC. In general, there was also just an irreconcilable clash of project management styles. Thus, with the release of TigerVNC 1.2.0, The VirtualGL Project stepped down as a contributor and supporter of TigerVNC in order to focus on moving TurboVNC forward.

The following summarizes the strengths of TigerVNC and TurboVNC, from an end user's point of view.

TurboVNC

  • Very stable -- has been enterprise-tested and productized since 2004 and has thousands of seats in large corporations and academia

  • Multiple simultaneous VNC sessions under the same user account

  • Dynamic VNC display number assignment (TigerVNC requires VNC display numbers to be statically assigned to user accounts by the system administrator)

  • Users can start/stop VNC sessions (TigerVNC sessions must be started/stopped by the system administrator.)

  • The ability to set global security/authentication policies for a particular server machine (including disabling clipboard transfer and reverse connections, limiting the remote desktop size, requiring SSH tunneling, and disabling particular authentication methods)

  • One-time password support (useful when building web portals around TurboVNC)

  • User access control lists (for sharing sessions with specific users)

  • More attractive and feature-rich VNC viewer GUI
    • Uses the system's look & feel rather than FLTK

    • Provides a toolbar for easy access to common features

    • Provides an application menu on macOS


  • Support for the full-screen application feature in OS X/macOS 10.7 "Lion" and later

  • Client-side remote desktop scaling

  • More configurable and flexible full-screen and multi-screen support
    • Supports offset monitors and monitors with differing resolutions

    • Allows the user to specify whether a non-full-screen viewer window should span one or multiple monitors

    • Automatic selection of single-monitor or multi-monitor spanning based on the remote desktop resolution

    • Allows the user to remotely configure any multi-screen Xinerama layout on the server, or to specify a multi-screen layout using the server's
      code:
      -geometry
      argument

    • In both windowed and full-screen modes, automatic desktop resizing chooses a server-side screen layout that honors the client's screen boundaries and taskbar/menu bar location.


  • Full documentation and complete man pages

  • Lossless Tight encoding method for high-speed networks (has approximately the same network footprint as Hextile while using about half the CPU time)

  • More configurable and flexible keyboard grabbing feature (TigerVNC can only grab the keyboard in full-screen mode)

  • Default settings are designed to provide peak LAN performance for 3D and video applications.

  • Self-contained X server code base that is fully integrated into the TurboVNC build system

  • Better support for IPv6

  • Java viewer can achieve native levels of performance by calling libjpeg-turbo through JNI.

  • Fully integrated SSH support
    • -via and -tunnel options on all platforms

    • Built-in SSH key management in the Java viewer

    • GUI support for SSH tunneling in the Java viewer


  • Approx. 8-10x better aggregate viewer performance on macOS than TigerVNC

  • TLS encryption using OpenSSL, which has better performance than GnuTLS

  • Remote X Input and Wacom tablet support

  • NV-CONTROL extension support

  • Built-in UltraVNC Repeater support

  • Can connect to encrypted Vino sessions

  • Direct integration with VirtualGL, which allows users to easily run compositing window managers with 3D hardware acceleration

  • Built-in SIMD-accelerated zlib implementation, which improves the performance of Tight encoding significantly on SSE2-equipped CPUs

  • The TurboVNC Session Manager, which allows a user to remotely start a TurboVNC session on the TurboVNC host or to seamlessly and securely connect to, remotely kill, or generate a new one-time password for any TurboVNC session running under their account on the host

  • Built-in SSH client with support for OpenSSH config files and password-less public key authentication (using ssh-agent or Pageant)

  • Seamless integration with noVNC
    • The TurboVNC Server has built-in support for WebSockets, so a WebSockets proxy is not needed.

    • The TurboVNC Server optionally starts a simple web server to serve up noVNC and prints a URL that can be used to connect to the TurboVNC session.


  • The TurboVNC Viewer can initiate connections to multiple VNC servers simultaneously, as well as tile multiple connection windows.

  • The TurboVNC Viewer maintains a different set of options for each unique TurboVNC host.


Note that we do not track the development of TigerVNC very closely, so if you feel that any part of this comparison is erroneous, please contact the TurboVNC maintainer.

TigerVNC

  • X.org module for providing VNC access to the "root" X display (requires building TigerVNC against the same version of X.org that your system uses.) Our alternative to this is to use x11vnc with libvncserver 0.9.9 or later, which uses the TurboVNC encoder.

  • Native language support

  • Multi-threaded Tight decoding (investigating, but the feature in general is something of a mixed bag)

  • Alpha-channel-enabled remote cursors

## Differing Approaches

TigerVNC, owing to its RealVNC heritage, is really designed to be built against a distribution-supplied X server code base and SDK. There are advantages to that approach. For starters, it offloads the burden of fixing X server issues to the O/S distributor, and there is less chance of incompatibilities between Xvnc and the window managers that are bundled with the distribution (since Xvnc is essentially running the same X server code as the "root" X server.) However, there are drawbacks to TigerVNC's approach as well. The biggest is that building TigerVNC from source requires a distribution-specific procedure, which is typically undocumented and difficult for many developers to figure out. We attempted to work around this by providing a "cross-compatible build" of TigerVNC, but that has a whole different set of issues. It requires building all of the X.org infrastructure from source, which is very slow and cumbersome, and if any issues are discovered in that specific X.org code base, they are difficult to address without upgrading one or more of the components (which creates all new issues.) Additionally, the cross-compatible build required a separate static build of GnuTLS and, on some platforms, gettext, which required the maintainer to keep abreast of security changes in those packages. In short, TigerVNC is really meant to be supplied by an O/S distributor.

TurboVNC's approach is instead to integrate a well-known X server code base into its source tree, so any issues that are discovered with it can be fixed within our project. This means that interaction issues between new window managers and our version of Xvnc have to be addressed by us, not by the distribution vendor. However, it also means that once an issue is fixed, it is fixed on all platforms. Using an in-tree X server code base makes our server much easier and quicker to build, and it puts us in complete control over the quality of the solution.

## Performance

TigerVNC 1.2.x, 1.3.x, and 1.4.3 and later can be configured to provide similar performance to the most common modes of operation in TurboVNC (assuming that multithreading is not being used, and assuming a Windows or Linux client. The TigerVNC Viewer currently suffers from a severe performance loss on macOS, due to unknown reasons.) The following table lists equivalent settings between the two solutions:

TurboVNC SettingsTigerVNC 1.2.x/1.3.x/1.4.3+ Settings
JPEG Image Quality = 92
JPEG Chrominance Subsampling = 1X
Compression Level = 1
Interframe Comparison = off
(Rough equivalent to "Tight + Perceptually Lossless JPEG", but with slightly lower image quality)
Compression Level = 1
JPEG Quality Level = 8
JPEG Image Quality = 77
JPEG Chrominance Subsampling = 2X
Compression Level = 6
Interframe Comparison = on
(Rough equivalent to "Tight + Medium-Quality JPEG", but with slightly lower image quality and more Zlib compression)
Compression Level = 2
JPEG Quality Level = 5
JPEG Image Quality = 29
JPEG Chrominance Subsampling = 4X
Compression Level = 7
Interframe Comparison = on
(Rough equivalent to "Tight + Low-Quality JPEG", but with slightly lower image quality)
Compression Level = 2
JPEG Quality Level = 1

However, it should be noted that, due to a performance regression, TigerVNC 1.4.0 - 1.4.2 cannot be configured to perform as well as TurboVNC under any circumstances. More information can be found here.

Framboise
Sep 21, 2014

To make yourself feel better, you make it so you'll never give in to your forevers and live for always.


Lipstick Apathy
Hey! Sorry for the late reply, I've been busy with holiday/family stuff for the past two weeks so I haven't had time to sit and mess around with my PC and have only been online here and there.

For reference to things I'll be replying to below, my original post:

Framboise posted:

Dunno if this is the right thread for this since my question is probably really base level compared to most, but:

I've been considering switching over to Linux-- mostly because I'm in the mood for something different, but also because while I was fine with Windows 10, as it approaches the end of its lifespan, I'm not really interested in 11 from what I've seen so far. I've been dabbling with different distros on VMs for a while and the one I keep coming back to is Arch as I like the feeling of being able to completely personalize my experience. That's been all well and good-- I'm still learning and I've been enjoying the experience of learning, but I've been having a lot of trouble with anything that's Wayland-based. KDE with Wayland mostly works, but it feels really clunky compared to the X11 version. I also want to learn how to use a tiling window manager like Hyprland or Sway or i3, but I can't get the former two to work properly at all in a VM, and I'm concerned that they're going to be a pain when I install for real since I've got a Nvidia GPU. It'd be a bummer if I couldn't use the former two because I've seen some really nice clean setups with fluid animations and I'm a sucker for that kind of thing.

Am I just better off staying away from Wayland until I get around to upgrading my computer so I can get an AMD GPU, or is it just the VM being weird and I'll be fine once I get the Nvidia drivers installed?

Also, I'm planning on dual-booting with Windows still just in case there's a game I want to play or program I need to use that's having compatibility issues with Linux-- I'd be able to access files from either OS so long as I just push saved images/documents/videos/steam installs to the same directory on a separate partition, right?

VictualSquid posted:

Mounting windows partitions in linux works fairly well these days. And WSL should be able to mount a linux partition, though I never actually tried it. Having a third drive/partition does work, the same as using a removable drive.

Wayland is in a strange state where some things work much better then x11 and others work much less well. For kde specifically, the next version in january is supposed to add lots of features for wayland.

EndeavorOS is arch with a sane installer, and you might try it. They also have usable defaults and a tutorial for one of the tiling wms. Though it didn't click for me and I went back to kde. This was on my laptop which has an nvidia gpu.

So long as it works, I'm good. That way I can just redirect anything I save or want to access from either OS in one directory. Would that also work with Steam installs, or are those installed in completely different ways?

I'm content to stick with X11 for now; it's just that I don't really understand what distinguishes the two and why wayland is so fussy with nvidia. I just see a lot of neat desktop designs in tiling managers like Hyprland and Sway posted on reddit and twitter and stuff so I kinda had my eye on those as a "well, that must be what the cool kids are using! :shrug:" kinda thing.

I've heard of EndeavorOS and have been meaning to try it! I haven't really had much issue with Arch so far and feel like most issues I've had are less the OS or my lack of understanding moreso than it just is VM compatibility hiccups. But I could be wrong! (And probably am!) One thing I've realized as I've been exploring Linux that for every question I seek answers to, I generally find at least three different answers that give me more questions. It's hard to know what the gently caress you're doing as someone new as far as what "right answers" are.


cruft posted:

I'm going to suggest you physically disconnect that Windows disk so you can feel free to drink around with distributions and reinstall a lot, without having to worry about accidentally nuking the OS you're familiar with.

No I've never done that why would you assume such a thing

Shouldn't be an issue then really. I currently have Windows 10 installed on my old SSD, but the new SSD I just bought will only work on my PC's board if I disconnect the other one (I basically get the SATA SSD I've been using for the past 8 years or so, or the NVMe one I just bought, and it won't work if I've got both hooked up), so all I'd need to do is reconnect the old drive if I really gently caress something up, but I'm also not really all that scared of working with partitions and installing things anymore after doing a manual Arch install. The only thing I'm afraid of is losing all my files, and I can back all that stuff up.

mystes posted:

The proprietary nvidia drivers suck with wayland and sway won't work with them at all. I'm not sure what the state of the open source drivers is. I would suggest sticking with x11 and i3 for now unless you want to switch to an amd gpu

Is your computer a desktop and does it have integrated graphics as well? it's kind of a pita so I'm not sure I should suggest it but you could do gpu passthrough and use the integrated graphics for linux

It's a desktop, yeah. I've had it since 2016 and it's served me well, but I am looking to upgrade it this year.

Currently running NVIDIA GeForce 980Ti, 16 GB of RAM, Intel i7-4790K CPU.

Not really sure what integrated graphics means or how I'd know if I do, or what gpu passthrough is, though I've read something about just using Windows on a VM in Linux using gpu passthrough rather than dual booting or something like that, which sounds nice too.

Mr. Crow posted:

Wayland and nvidia arent there yet by all reports and sounds like your just confirming it. Maybe try it with the next big KDE release but I'm guessing you'll need to wait on the open source nvidia driver (NVK i think?) or some update by nvidia themselves.

You can share Windows partitions on Linux pretty easily ya, but be aware it may not be as seamless as you hope, due to things like different line endings. Theres utils like dos2unix/unix2dos to easily and quickly change text files but if you plan on doing it back and forth repeatedly its not gonna be a streamlined experience.

All I really want to do is exclusively have a partition specifically for images/documents/videos/music/Steam stuff, etc. I'd hope most of that is generally friendly between both systems.

ziasquinn posted:

yeah if you have Nvidia just use the proprietary drivers tbh and stick to X11 for now at least.

Can do. I do intend to get an AMD GPU when I get around to upgrading so I won't have to worry about that anymore.

feedmegin posted:

Windows cannot see Linux partitions (ext4 eg) natively so be aware of that. You'd want to have a Windows (NTFS) partition you mount from Linux not the other way around.

The CR/LF thing with plain text files is a thing but generally if Windows sees a Unix-style (LF only) text file you created on the Linux side it won't gently caress around with it these days. Binary files such as jpegs or whatever shouldn't be an issue.

Also if you haven't tried WSL2 on Windows, give it a go. It's basically real Linux running in a tightly integrated Windows VM and ngl it's pretty good these days.

I've played with WSL a little bit before I just started exploring Linux more in VMs. I'll play around with it a bit more.

And good to know, yeah. Hopefully if what I heard about just using Windows in a VM with gpu passthrough or whatever, I won't need to rig up something that both systems play nice with and can just keep everything in my home partition, yeah?

Computer viking
May 30, 2011
Now with less breakage.

Framboise posted:

Shouldn't be an issue then really. I currently have Windows 10 installed on my old SSD, but the new SSD I just bought will only work on my PC's board if I disconnect the other one (I basically get the SATA SSD I've been using for the past 8 years or so, or the NVMe one I just bought, and it won't work if I've got both hooked up), so all I'd need to do is reconnect the old drive if I really gently caress something up, but I'm also not really all that scared of working with partitions and installing things anymore after doing a manual Arch install. The only thing I'm afraid of is losing all my files, and I can back all that stuff up.

This typically means that your SATA SSD is connected to a port that's shared with the M.2 slot: The M.2 connector can supply both PCIe (for NVME drives) and SATA, and I've seen several motherboards where a couple of the SATA ports are badly documented or just marked on the board as "only works when M.2_1 is not in use" or similar. There's typically a handful of SATA ports that do not have this issue.

Framboise posted:

Not really sure what integrated graphics means or how I'd know if I do, or what gpu passthrough is, though I've read something about just using Windows on a VM in Linux using gpu passthrough rather than dual booting or something like that, which sounds nice too.

"Integrated graphics" means there's a small graphics card directly inside your CPU. It's how most laptops work, and they're also fairly common on desktop CPUs that could end up in an office PC - it saves the manufacturer from having to add a whole GPU just to render some spreadsheets. If you have an HDMI (or DisplayPort) connector on your motherboard, it's for this. Your i7 4790K comes with "Intel® HD Graphics 4600".

GPU forwarding needs a bit of background.
I don't know if you've ever used a SNES emulator or anything like that? Virtual machines are the same kind of idea. You run a program that pretends to be a completely separate computer.

The biggest difference between this and a SNES emulator is that your "real" machine and the VM are basically the same. That means that instead of needing to run a lot of code to simulate e.g. a SNES, you can just fence off a bit of your CPU and run the VM directly, which is incredibly much faster; there's nearly zero overhead. The problems come when you want to use any other devices. Storage is easy enough, just inject a fake device into the VM that looks like a hard drive, and on the outside we can redirect it to whatever we want, like a file or an actual disk. Graphics is harder, because it's much more demanding. A graphics card isn't meant to be driven by two operating systems at the same time: If both Linux and Windows tried to use it simultaneously, it would instantly mess up for both of them. To keep this from happening, you're just not allowed to give a VM control of a card that's already in use.

There's three ways around this:
- You can create a fake graphics card in the VM, like we do with storage. That works, but it's not fast enough for gaming - it's comparable to windows remote desktop.
- You can buy one of the stupid expensive server cards that actually support being driven by multiple OSes (by pretending to be multiple cards) - though I don't even know if those support graphical output or if they're only for accelerating AI things
- You can put two graphics cards in your PC: One for Linux and one for the virtual machine. On the linux side, you set it up so it reserves the second GPU and doesn't touch it, and then you let the Windows virtual machine get full control over that card. This is GPU forwarding - Linux just passes one GPU on to the virtual machine.

In your case, you actually have two GPUs: The integrated intel graphics, and the nVidia 980. You probably need to find a BIOS setting for "activate the integrated GPU even if I have a separate GPU plugged in", though.

Computer viking fucked around with this message at 16:01 on Jan 8, 2024

Adbot
ADBOT LOVES YOU

Klyith
Aug 3, 2007

GBS Pledge Week

Framboise posted:

I'm content to stick with X11 for now; it's just that I don't really understand what distinguishes the two and why wayland is so fussy with nvidia. I just see a lot of neat desktop designs in tiling managers like Hyprland and Sway posted on reddit and twitter and stuff so I kinda had my eye on those as a "well, that must be what the cool kids are using! :shrug:" kinda thing.

X11 and Wayland are doing the same thing: they're protocols rather than software, setting up how an app communicates with the OS display software. X11 is ancient and has many problems due how old and decrepit it is. Wayland is new and has many problems due to being new and unfinished.

Nvidia is fussy with Wayland because Nvidia doesn't give a poo poo about linux, particularly not consumer desktop linux. (CUDA and non-display server stuff works fine.) They waited until Wayland was actually being widely used before they got serious about support.

What the cool kids post in "check out my new desktop" on reddit isn't what most people are using. Most people use gnome or KDE. The cool kids are the people who get entertainment from setting up the new FOTM desktop environment. Not that there's anything wrong with that, or the DE that's the current new hotness. If a tiling WM works well for you, go with it.

Framboise posted:


One thing I've realized as I've been exploring Linux that for every question I seek answers to, I generally find at least three different answers that give me more questions. It's hard to know what the gently caress you're doing as someone new as far as what "right answers" are.

Linux definitely has a lot of three correct answers going on, and in most cases the correct choice is "go with your distro's default unless you have a strong reason otherwise". That's a lot of what a distro does -- pick from among sets (A,B,C) and (X,Y,Z) in ways that avoid problems between B and Y. This is one of the reasons arch isn't recommended for newbies, it has fewer defaults and makes you pick for yourself. And if B and Y have problems together, well that's on the wiki, you read the wiki first didn't you?

Framboise posted:

Currently running NVIDIA GeForce 980Ti, 16 GB of RAM, Intel i7-4790K CPU.

Not really sure what integrated graphics means or how I'd know if I do, or what gpu passthrough is, though I've read something about just using Windows on a VM in Linux using gpu passthrough rather than dual booting or something like that, which sounds nice too.

The integrated graphics is on your CPU, it's what comes out the video port (probably DVI at that vintage) on your mobo. It's good enough for desktop 2d stuff.

I was also intrigued by windows on a VM in linux with hardware passthrough. Then I discovered all my games work fine in linux. Since games were the only thing I needed that for, I never bothered getting a 2nd GPU and setting it up. A windows VM using spice video is good enough for non-game software.

Framboise posted:

All I really want to do is exclusively have a partition specifically for images/documents/videos/music/Steam stuff, etc. I'd hope most of that is generally friendly between both systems.

Only fat32 and exfat are totally friendly between both systems. Fat isn't great.

Linux can see NTFS fine but running steam games off in linux a NTFS partition is not recommended.

Also, having a single partition that is writable by two OSes at the same time (ie the linux host and a windows VM) is very very bad. Only a matter of time until your data is corrupted bad. The two OSes will make changes that the other doesn't see, so will be working from incorrect state.

So tldr it's kinda hard to have two co-equal OSes even with the VM method. If you are frustrated with Windows or MS, I would say just go whole hog and try to move over. If you're into linux as a fun project or to learn, do a dual-boot and keep windows as the main OS.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply