Live data from Hacker News

Why don't we have Wayland on Raspberry Pi yet? (2018)

joshondesign.com

241–250 of 259 posts

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#241

Earlier quoted context omitted.

> incompatible with the proprietary Nvidia drivers (and no plan to ever fix that) I've heard that Nvidia is fixing this in KDE Plasma and maybe Gnome too. (Fuck proprietary drivers though, and fuck Nvidia.) > huge input lag that's odd. Gnome's compositor is not the fastest, but it generally works okay for many many people. > the reasons one should consider a switch nowadays - No screen tearing ever, every frame is pe…

> I've heard that Nvidia is fixing this in KDE Plasma and maybe Gnome too I'm sorry, are you saying that drivers now match specific DEs? That's a sufficiently hideous layering violation to make me automatically dislike Wayland, iff true.

That specific problem is related to NVidias refusal to support the open API components that every other player is standardizing around.

The reason it's becoming possible to run Wayland compositors on NVidia hardware just now is because the Gnome (and now KDE) teams have just given up and started implementing the NVidia-specific pieces. It's not really a Wayland problem, it's an NVidia problem.

You can run any Wayland compositor on AMD hardware without this issue.

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#242
post #68

Earlier quoted context omitted.

> as terrible as a shell scripting language That's a strong opinion. I'm not going to argue for lack of time, but suffice to say that 99% of my interactions with my computer and sometimes with my phone is with a shell scripting language. Shell scripting is awesome. > Have you ever read through a gnu configure file yourself, Yes. Generated scripts make for a boring read. > or do you just close your eyes and type "./co…

Oh god there's so many easy reasons why bash is terrible. * Significant whitespace in surprising ways (a=1 vs a = 1 or spaces following square brackets) * Word splitting * No data structures of note, nor any way to create them in any sort of non-hacky way * No data types, really, for that matter * Can't really deal with binary data * Awful error handling * Weak math * Weird scoping rules Honestly as soon as I have to…

They all have reasons.

> * Significant whitespace in surprising ways (a=1 vs a = 1 or spaces following square brackets)

Variables in the shell are nicely coupled with environment variables. As a feature, you can do:

  a=1 b=2 cmd
to concisely assign environment variables for a single command. How would you recommend that be redone? You'd need additional cumbersome syntax if you want whitespace to not be significant, and that sucks for a language meant to be used mostly interactively:

  a = 1, b = 2: cmd
Because shell languages are meant primarily to be used interactively, we want to be very light on syntax. We don't want to have to say `var` or something before our variable definitions. We don't want to have more syntax than we absolutely need for our calls. Nothing like `cmd(a,b)`. cmd can be any string. They're just executable files in some directory. We want to include as many of them as possible, and their arguments can be anything, including `=`. Commands get as much freedom as possible over how they're called to fit as many needs as possible. So, how do you differentiate between calls and variable assignments?

Under those criteria, the current situation of statements being words separated by whitespace and the first words having `=` in them being assignments seems like the ideal solution.

> * Word splitting

Makes it easier to build commands without working syntax heavy complex data structures. Here's an example where word splitting is useful:

  sudo strace -f $(printf " -p %s" $(pgrep sshd))
> * No data structures of note, nor any way to create them in any sort of non-hacky way

Complex data structure lead to more heavyweight syntax, and part of the appeal of shell languages is that everything is compatible with each other because everything is text. If you add data structures then not everything is text.

> * No data types, really, for that matter

Same point as above. Everything being text leads to increased compatibility. I wouldn't want to have to convert my data to pass it around.

That said, you could say that there are weak-typing semantics, since you can do `$(( $(cmd) + 2 ))`, for example.

> * Can't really deal with binary data

Because everything is text to encourage easily inspectable data exchange and compatibility between programs.

That said, while it's not advisable to do it, binary data is workable if you really need to do that. Pipes don't care. I can pipe music from ssh to ffmpeg to mpv, if I want. One just needs to be careful about doing text-things with it, like trying to pass it as a command argument. $() will remove a terminating newline if present, for example. That makes sense with text, but not with binary data.

> * Awful error handling

I don't get this. I think bash has very good error handling. Every command has a status code which is either no error or a specific error. Syntax like `while` and `if` work by looking at this status code. You can use `set -e` and subshells to get exception-like behavior. Warnings and error messages are, by default, excluded from being processed through pipes. What do you find lacking?

> * Weak math

Sure. I'll give you that bash doesn't support fractional numbers natively. zsh does support floating point.

> * Weird scoping rules

It's dynamic scoping, and it does have some advantages over the more commonly seen static scoping. You can use regular variables to setup execution environments of sorts. This somewhat relieves the need to pass around complex state between functions. It's kind of a different solution to the same problem that objects in OOP address.

The only problem is that static scoping became so popular that people now are generally not even aware that dynamic scoping exists or how to use it, so it's now not recommended to use it to not confuse people that don't know that part of the language they're using.

About that, I wish people would just learn more of the languages they use, and not expect every language to work the same, as they're not all meant for the same purposes or designed by the same criteria.

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#243

Earlier quoted context omitted.

I checked out Eric's work just - he's doing an amazing job! Much more thought put into the subject (security for GLSL being a huge topic on its own). The lack of MMU in the VC4 architecture is a huge pain point that probably sucks up most engineering cycles when it comes to arbitrary application environments using GPU resources like X11 or Wayland - when memory runs out, what to do? You can throw engineering resource…

The open source driver doesn't use VMCS, it instead puts aside a fixed block of memory (typically 256 MiB, which I think is also a limit due to some hardware bugs) for use through the Linux Contiguous Memory Allocator (CMA) that it then draws from. VMCS only comes into the picture if you use video decode, but I think Dave Stevenson from the foundation hacked the firmware side to support importing Linux allocated memo…

The HVS was a cool design - the only real issue if I recall was its limited line buffers meaning it was hard to determine what could be composited in real time, so we ended up always rendering to a triple buffer. It also did some amazing scaling in realtime, but this came with some crazy artifacts that were super painful to triage. The occasional "flash of bad pixels" in a live composition screen was really painful. I just remember I wrote the DPI and CPI peripherals that we brought up the HVS with - on a 4MHz FPGA complex, we had YUV camera input scaling up to a WVGA DPI screen running at 60fps on a distributed FPGA platform through the HVS. Fun times.

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#244
post #169
post #68

Earlier quoted context omitted.

> as terrible as a shell scripting language That's a strong opinion. I'm not going to argue for lack of time, but suffice to say that 99% of my interactions with my computer and sometimes with my phone is with a shell scripting language. Shell scripting is awesome. > Have you ever read through a gnu configure file yourself, Yes. Generated scripts make for a boring read. > or do you just close your eyes and type "./co…

> That's a strong opinion. I'm not going to argue for lack of time, but suffice to say that 99% of my interactions with my computer and sometimes with my phone is with a shell scripting language. Shell scripting is awesome. It really isn't though. (It certainly can be fun however). Switching from shell scripts, and avoiding to do things manually (like ssh), likely increases your success rate at managing *nix by order…

> All these "configuration management" tools like Puppet, Chef, SaltStack, Ansible etc. are pretty much just to avoid shell scripts and interactive ssh.

That's only true if your only use of the shell is for configuration, which isn't really intended to be the case. The shell was meant for any use of the computer, not just configuration. For example, I use ssh/scp when I copy some music files from my computer to my phone, or mpv when I want to play some music files. Indeed, I use the shell for nearly everything.

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#245
post #184

Earlier quoted context omitted.

I still find tearing to be problematic I have a machine with a supported Radeon card (open-source driver), another machine with a supported nvidia card (binary blob driver), and another two machines using different intel onboard graphics chips (open-source driver) the radeon and the intel (both drivers which work with it) have issues putting out a stable jitterless 60fps without tearing (with tearfree on, and various…

How did you test the fps? I'm using the intel driver as well, and it's definitely not perfect. But it's pretty close, at least for me - I get hardware-accelerated video decoding with VAAPI, no tearing, and excellent input latency (~3ms).

I've got a couple of videos I use that make the tearing/jitter obvious, e.g. https://www.youtube.com/watch?v=0RvIbVmCOxg (you can get a .mp4 too which eliminates the browser as a possible cause)

sadly I can see the jitter/tearing, vs. on Windows where it's perfect

(with 4k or higher frame rates it's far more obvious)

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#247
post #246

Earlier quoted context omitted.

Examples?

Brazos APU.

Good point. Historically AMD/ATI didn't provide official support for hardware for anywhere near as long as Nvidia and the open source gpu driver didn't provide near the same performance. For example devices could be available as new retail units one year and unsupported less than 3 years later.

To contrast that nvidia generally provided support for a decade. For example the latest release only days ago supports hardware as old as 2012 legacy drivers support hardware as old as 2003.

This is why I have bought nvidia hardware despite other issues however it looks like AMD open source support will be better going forward. This doesn't help anyone with old hardware.

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#248
post #217
post #68

Earlier quoted context omitted.

> as terrible as a shell scripting language That's a strong opinion. I'm not going to argue for lack of time, but suffice to say that 99% of my interactions with my computer and sometimes with my phone is with a shell scripting language. Shell scripting is awesome. > Have you ever read through a gnu configure file yourself, Yes. Generated scripts make for a boring read. > or do you just close your eyes and type "./co…

> Each language is good for different reasons. Shell languages are meant primarily to be used interactively, as opposed to languages like python or ruby. The fact that you can put your everyday interactions in a file and run that is an added bonus. While UNIX was playing with sh, there were already platforms with REPLs, graphical displays and integrated debugger. In fact Jupiter Notebooks are an approximation of that…

[deleted]

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#249
post #3

Earlier quoted context omitted.

Xorg remoting was poorly designed to accomodate DRI/DRM, video card acceleration and had adequate performance to only display primitives on screen. Thats the reasons of poor Xorg remoting adoption. I dont remember seeing anyone in this decade using it - it hands down lost to vnc/nx and rdp.

Yeah, VNC is just way better. Even running a local Docker container and using X11 forwarding is extremely slow.

Uh? I much preferred NX instead of VNC because I didn't have to define the resolution when starting the server, plus it felt faster

Re: Why don't we have Wayland on Raspberry Pi yet? (2018)

#250

Earlier quoted context omitted.

Just google "can't get linux to display correct resolution" You'll get plenty of results like this that are more recent than 1999. https://ubuntuforums.org/showthread.php?t=2012264

There are 2 things that cause this. Not having a driver installed and having it fall back to something which doesn't support the correct resolution or in fact bad cables. Most user installs will not encounter either problem. New amd has great support out of the box without installing anything and many distros support installing closed source nvidia or will work well enough for non gaming applications with the open so…

Windows is never going to be ready for the desktop at this rate.
Post reply on HN