News for hackers. Stuff that matters.
Re:Wine 3.0 Released by jl6 on Thursday January 18, 2018 @12:22PM (#16178965)
I wonder if Wine is now capable of running more Windows software than any one version of Windows is?
Re:Wine 3.0 Released by SwellJoe on Thursday January 18, 2018 @01:37PM (#16179930)
I was just marveling at how well Wine+Linux works with my old music and audio hardware. A lot of my old gear hasn't had functional Windows drivers since XP...but, Linux picks it right up. And, a few days ago I thought, "What the heck, let's see if the sysex editor/librarian for this old beast will work in Wine?" And, it did! It saw that the driver wasn't the official driver from the manufacturer (since it was the ALSA driver) when starting and it warned about it, but it still worked, and still detected the device and loaded up all the patches and such.

Historically for these abandoned devices, I'd just use MIDI for communicating with it; since MIDI hasn't changed in decades, it all continues to work just fine (in Windows and Linux). But, it's certainly convenient to just plugin the synth itself via USB and have it all Just Work.

But, yeah, to speak to your point: There are mountains of old software (and hardware!) that won't work on Windows anymore, but will run fine on Linux with Wine. That's pretty amazing to me. I couldn't believe how smooth it all was; I remember spelunking docs for hours to figure out how to make things work. Now, I just run the installer (or just run "wine app.exe") and there it is. I'm sure there are exceptions, but damned if I'm not still impressed.

I rarely consider any program important enough to reboot to use it, since I'm most comfortable and productive in Linux, and Wine becoming so good over the past few years makes it even less of an issue. I still keep a Windows partition on my laptop, Just In Case, but I haven't needed it in months.

Re:Wine 3.0 Released by samplatt on Thursday January 18, 2018 @09:05PM (#16183547)
I'm getting a new laptop soon to start tinkering a bit more with my keyboard and a synth, and I'm considering a Macbook for the first time in my life based on a recent HN article regarding latency.

Have you found that a linux machine has noticable latency when playing/recording music and applying filters?

Re:Wine 3.0 Released by SwellJoe on Friday January 19, 2018 @12:28AM (#16184324)
Linux is not ideal for recording audio, but it has improved remarkably in recent years. It used to require a bunch of kernel patching to get low latency recording (though once you jumped through those hoops, it was lower latency than most Windows environments), but now most of those patches have been mainlined, and you just have to add your user to the realtime group on your system to allow JACK to use realtime scheduling.

I don't notice the latency, but I also haven't measured it, and I just do it as a hobby, so spending some of my time tinkering with quirky stuff is fine (though it's not really that quirky anymore...tons of stuff Just Works).

If it were my job, I would probably consider a mac. It's not; my job is software, where Linux is the clear winner. But, I don't think it's nearly as clear as it used to be that Linux isn't suitable for pro audio work. I think a reasonable person might give it a try, whereas five (or ten, or twenty, which is when I first started poking at audio on Linux) years ago it would have been madness to try to do real audio work on Linux.

Re:Wine 3.0 Released by snvzz on Friday January 19, 2018 @06:48AM (#16185522)
In my own experience, for desktop/workstation/audio, linux-rt (the -rt patchset) is the kernel to use, hands off.

Nevermind the lower latency, it does feel way better to use. It's like using a different operating system, one that's actually a decent desktop OS.

Re:Wine 3.0 Released by SwellJoe on Friday January 19, 2018 @04:40PM (#16190099)
I wouldn't think just the rt stuff would make a difference for normal desktop stuff since processes have to opt in to realtime scheduling (and the processes that don't can then be pushed aside to meet deadlines for the RT processes). But, maybe there are other scheduler changes present in the patch set.

I just use whatever RT features are shipping with current Fedora, and it works well enough for me. I don't miss patching a kernel every couple of weeks as was required back in the bad old days of doing audio on Linux. (Though CCRMA made it easier with their package repository, so it hasn't really required a completely DIY process for many years.)

Re:Wine 3.0 Released by snvzz on Saturday January 20, 2018 @03:18PM (#16195193)
>I wouldn't think just the rt stuff would make a difference for normal desktop stuff since processes have to opt in to realtime scheduling (and the processes that don't can then be pushed aside to meet deadlines for the RT processes).

The same sort of opt-in as in mainline. SCHED_FIFO or SCHED_RR. Yes, it makes a difference even without opting in.

By all means. Arch makes trying linux-rt very easy. Try rt-tests on Linux and on Linux-rt. See the examples at: https://wiki.archlinux.org/index.php/Realtime_kernel

I get spikes beyond a ms within minutes on mainline, on all my hardware.

In practice, without even setting SCHED_FIFO or SCHED_RR, I can play sfc(snes) games on higan on linux-rt. This is not possible on mainline, not even with SCHED_FIFO, as even with higher audio buffer sizes, it cuts constantly. Same with audio work with jackd and low latency buffer sizes.

>I just use whatever RT features are shipping with current Fedora, and it works well enough for me.

No such luck for me, and I've even tried ck's patchset and such. It barely provides any improvement. Yet linux-rt is radically better.

And, while unrelated, even the usual disk i/o stalls that plague Linux (on any hardware, using any common distro standard kernel) haven't happened at all to me on linux-rt. It's as if using an entirely different OS. It feels responsive.

>I don't miss patching a kernel every couple of weeks as was required back in the bad old days of doing audio on Linux. (Though CCRMA made it easier with their package repository, so it hasn't really required a completely DIY process for many years.)

Me neither, as AUR makes linux-rt very convenient.

Re:Wine 3.0 Released by squarefoot on Saturday January 20, 2018 @05:33AM (#16192881)
If you get high latency on a Linux machine when doing audio stuff you probably have hardware problems or software is misconfigured. Years ago I moved everything I had under XP (Reaper+plugins) to a Wine directory, reinstalling those plugins that didn't like to be moved, and never looked back. I'm using the kxstudio repositories software (RT kernel, Wine etc). http://kxstudio.linuxaudio.org/ Latency is very low, even on old PCs such as Core Duo ones, and compatibility is very high.

The only problem I encountered with Reaper under Wine is that it needs a lot of time to buffer a very big audio track when it's being added to a project. Say I record my band on our portable recorder then I drag and drop the big sample (2-3 hours stereo 44.1khz x16bit stereo uncompressed .wav) on a Reaper track, it starts eating all PC's memory to buffer it hanging the machine for a a good minute. Once the track is added, the memory gets released and it works perfectly though, so it's not technically a bug and I have no idea if it depends on Wine or Reaper.

A few months ago I also started to use the native Linux Reaper port which is fantastic and lately got a lot more stable, but all my attempts to have Windows plugins working in parallel with it through Wine failed although they say it is possible, so although there are some interesting plugins out there, they're not remotely comparable to what is available for Windows (but that would be the case for every other native application): using Wine is still the best option if you are not just strictly recording and need external plugins. I also explored the possibility to have musical software working on a Windows VM with disconforting results so far: computing power is there, but latency is a nightmare. As of today, to me Wine still offers the best options if one needs both low latency and compatibility.

Re:Wine 3.0 Released by pera on Thursday January 18, 2018 @12:47PM (#16179334)
For everything previous to XP (and maybe even including XP) it is, without any doubt.

It would be funny if someday Microsoft decides to include Wine with WSL, but I wouldn't be surprised to be honest.

Re:Wine 3.0 Released by Y_Y on Thursday January 18, 2018 @02:08PM (#16180275)
You don't need it for WSL, wWine can already run on Windows natively: http://www.kegel.com/wine/wow.html
Re:Wine 3.0 Released by yorby on Thursday January 18, 2018 @08:01PM (#16183189)
Windows might become a Linux distribution someday, the way it's going...
Re:Wine 3.0 Released by JdeBP on Friday January 19, 2018 @01:07PM (#16188307)
Very unlikely. Linux distributions are based upon Linux, and the whole architecture of the Windows Linux Subsystem, after all, is not having Linux there.
Re:Wine 3.0 Released by freeone3000 on Thursday January 18, 2018 @12:48PM (#16179363)
It's not bundled, but it works.
Re:Wine 3.0 Released by simion314 on Thursday January 18, 2018 @12:50PM (#16179374)
I had issues playing TES Oblivion in Windows 10, I got black screens , I tried all workarounds I found on Google, in the end I got it working and with mods in Wine.
Re:Wine 3.0 Released by DoofusOfDeath on Thursday January 18, 2018 @01:09PM (#16179623)
Something about your phrasing reminded me of the customer reviews for the "three wolves" t-shirt on Amazon [1]. Thanks for brightening my day!

[1] https://www.amazon.com/Mountain-Three-Wolf-Short-Sleeve/prod...

Re:Wine 3.0 Released by simion314 on Thursday January 18, 2018 @02:07PM (#16180261)
please let me know how can I improve my phrasing, what mistakes I made, I am not a native speaker so I am aware I can build my phrases in a weird way.
Re:Wine 3.0 Released by devthane on Thursday January 18, 2018 @02:37PM (#16180552)
Just trying to help. I'm not an English major or anything myself, but here is one issue I noticed.

Don't overuse commas. After you get a complete idea out there, just end and start a new sentence. For example: "Please let me know how I can improve my phrasing and what mistakes I made. I am not a native speaker, so I am aware I can build my phrases in a weird way."

Re:Wine 3.0 Released by simion314 on Thursday January 18, 2018 @03:15PM (#16180921)
Good to know, thanks.
Re:Wine 3.0 Released by AareyBaba on Thursday January 18, 2018 @03:44PM (#16181217)
The book that really help me gain confidence in writing is https://en.wikipedia.org/wiki/The_Elements_of_Style.

It is a small book that can be read in an afternoon - you can probably find pdfs online.

Re:Wine 3.0 Released by shmerl on Thursday January 18, 2018 @12:25PM (#16178992)
Wine is surely better at running old Windows programs than Windows itself. Especially ones that use 16-bit code.
Re:Wine 3.0 Released by AnIdiotOnTheNet on Thursday January 18, 2018 @12:34PM (#16179129)
I'm curious how WINE accomplishes that, since my understanding was that the reason it can't be done on Windows x64 is because there is no way to switch the processor back to 16 bit mode from long mode. Is this incorrect or does WINE just go ahead and emulate 16 bit x86?
Re:Wine 3.0 Released by leeter on Thursday January 18, 2018 @12:43PM (#16179284)
IIRC 16bit code on a 32bit version of windows runs in 32bit mode with some thunking for selectors. The issue is more that HANDLEs can have values up to half the sizeof(HANDLE) and supporting 16bit would have significantly harmed the value of 64bit code or required special consideration of where a HANDLE was getting allocated. Then you have to deal with a 64bit process creating a HANDLE and giving it to a 16bit process. Very quickly it turns into a corner case nightmare.
Re:Wine 3.0 Released by monocasa on Thursday January 18, 2018 @01:27PM (#16179814)
This is the correct answer. There's nothing stopping you from setting up a 16 bit protected mode descriptor in your GDT and using it. The issue was in thunking HANDLEs.

https://msdn.microsoft.com/en-us/library/aa384249.aspx

> Note that 64-bit Windows does not support running 16-bit Windows-based applications. The primary reason is that handles have 32 significant bits on 64-bit Windows. Therefore, handles cannot be truncated and passed to 16-bit applications without loss of data. Attempts to launch 16-bit applications fail with the following error: ERROR_BAD_EXE_FORMAT.

Re:Wine 3.0 Released by chocolatebunny on Thursday January 18, 2018 @01:02PM (#16179538)
Do you have a source for that? running 16 bit code in 32bit mode doesn't sound like it would work. All the instructions would do 32bit operations instead of 16bit operations. So if a program did what it thought was a 16bit write to a memory location it would actually end up doing a 32bit write and would clobber the adjacent 16bit memory location.
Re:Wine 3.0 Released by eesmith on Thursday January 18, 2018 @01:20PM (#16179740)
I know nothing about the topic. I'll only point out that https://bugs.winehq.org/show_bug.cgi?id=36664 says ".. the reality in the past the 16 bit code was not a issue because the [Linux] kernel always supported it." and "...3.15 after 16 bit support by [Linux] kernel is optional on 64 bit systems."

That links to lmkl posts like https://lkml.org/lkml/2014/4/14/207

>> Afaik 64-bit windows doesn't support 16-bit binaries, so I just assumed Wine wouldn't do it either on x86-64. Not for any real technical reasons, though.

> Yes, there is still a significant number of users, and we still regularly get bug reports about specific 16-bit apps. It would be really nice if we could continue to support them on x86-64, particularly since Microsoft doesn't ;-)

Re:Wine 3.0 Released by leeter on Thursday January 18, 2018 @01:28PM (#16179827)
I would not be surprised to see MS introduce a dockerized '16bit compatibility' mode for Enterprise versions of windows. The only reason 32bit windows is still around is to support 16bit apps for these companies.
Re:Wine 3.0 Released by doesnt_know on Thursday January 18, 2018 @03:41PM (#16181184)
They previously had their "Windows XP Mode"[1], run via the Windows Virtual PC[2]. Obviously not a container and it's dead now but yeah...

[1] https://www.microsoft.com/en-nz/download/details.aspx?id=800... [2] https://en.wikipedia.org/wiki/Windows_Virtual_PC

Re:Wine 3.0 Released by yjftsjthsd-h on Thursday January 18, 2018 @01:58PM (#16180140)
> The only reason 32bit windows is still around is to support 16bit apps for these companies.

Pretty sure it's also used in some Atom tablets.

Re:Wine 3.0 Released by monocasa on Thursday January 18, 2018 @06:08PM (#16182477)
Atoms have been 64bit since 2010.
Re:Wine 3.0 Released by TheKitchenSinc on Thursday January 18, 2018 @06:26PM (#16182598)
The HP Stream 7, a tablet released in late 2014 on the 64-bit Atom Z3735G, shipped with 32-bit Windows. This was presumably to avoid the memory overhead of 64-bit pointers, as it came with 1GB of RAM, so every bit counted.
Re:Wine 3.0 Released by leeter on Thursday January 18, 2018 @01:20PM (#16179742)
Inferences from https://blogs.msdn.microsoft.com/oldnewthing/20081020-00/?p=... . I also know that 32bit programs could load 16bit modules without issue. In fact that was one of the things that MS was harping on people to not do; was stop using 16bit modules in their 32bit applications (which would have otherwise run fine on 64bit systems). I'm pretty sure it worked because 32bit system DLLS all got a 32 appended to them so the linker and loader would know which version they were going to and ensure that call was routed appropriately.

Edit: It's also worth noting that 32bit and 16bit instructions are different because of register size operands.

So to speak you're absolutely right... a 16bit read/write COULD do that... but it's a feature, not a bug.

Re:Wine 3.0 Released by dfox on Thursday January 18, 2018 @03:28PM (#16181053)
Whether instructions operate on 32b or 16b quantities is not dependent on mode the processor is in, but on combination of bits in code segment descriptor, in essence these bits can change on every far call. In native long mode descriptor tables have different format, but these bits are still there and have effect.
Re:Wine 3.0 Released by dfox on Thursday January 18, 2018 @03:23PM (#16181009)
This is one issue, another issue is that the method used to implement 16-bit compatibility in 32b windows involves virtual 8086 mode and running instance of DOS inside of that even for native 16b windows applications.

In all, I assume that it was droped mostly because it involved too much work for somewhat questionable benefit.

Re:Wine 3.0 Released by JdeBP on Friday January 19, 2018 @01:11PM (#16188354)
That won't have been the issue. Win16 programs never ran in v8086 mode, even on DOS-Windows 3.1. They ran in the normal 16-bit protected mode.
Re:Wine 3.0 Released by makomk on Thursday January 18, 2018 @01:17PM (#16179704)
If I recall correctly, you can still switch the processor to 16-bit mode but virtual 8086 mode is not available from x86-64. So more recent 16-bit Windows applications can be made to work but DOS applications and older 16-bit Windows applications that rely on more legacy DOS-style APIs don't work.
Re:Wine 3.0 Released by JdeBP on Friday January 19, 2018 @02:03PM (#16188768)
The "older 16-bit Windows applications" (actually a misnomer because there isn't this distinction in practice) actually used DPMI, which does not involve v8086 mode.
Re:Wine 3.0 Released by merb on Thursday January 18, 2018 @04:04PM (#16181440)
well which is probably only possible if you don't run on efi only hardware. (no cs/m, which sometimes happens, especially on mac hardware)
Re:Wine 3.0 Released by JdeBP on Friday January 19, 2018 @01:32PM (#16188508)
The actual machine firmware has been irrelevant for v8086 ever since the time of OS/2 2.0 and DOS-Windows 3.1. Both used virtualized machine firmwares to run in the v8086 virtual machines. OS/2's was dealt with by a virtual device driver called VBIOS.SYS, for example.
Re:Wine 3.0 Released by lloeki on Friday January 19, 2018 @08:25AM (#16185990)
This is precisely why DOSBox took a significant performance hit when going from x86 to amd64 back in the day.
Re:Wine 3.0 Released by shmerl on Thursday January 18, 2018 @02:26PM (#16180444)
Apparently it's a Windows limitation, rather than hardware one, since Linux supports it on x86_64. It got broken at one point, but then Linux kernel developers enabled it back, with even Linus Torvalds himself inquiring about this issue.

See https://lkml.org/lkml/2014/4/14/207

Re:Wine 3.0 Released by jandrese on Thursday January 18, 2018 @12:41PM (#16179247)
IIRC Wine is still typically installed as a i386 binary these days, so 16 bit compatibility is still an option.
Re:Wine 3.0 Released by chungy on Friday January 19, 2018 @12:58AM (#16184419)
64-bit Wine prefixes are perfectly capable of running Windows programs in all varieties from 16-, 32-, and 64-bit.
Re:Wine 3.0 Released by jklehm on Thursday January 18, 2018 @01:59PM (#16180156)
wine-devel discussion around 16bit support[1].

[1]https://www.winehq.org/pipermail/wine-devel/2017-January/115...

Re:Wine 3.0 Released by Q6T46nT668w6i3m on Thursday January 18, 2018 @12:28PM (#16179041)
If you stretch your definition to problematic but usabile, it’s certainly true for recent versions of Windows. Moreover, it’s likely been true for a few years!
Re:Wine 3.0 Released by wadkar on Thursday January 18, 2018 @01:12PM (#16179654)
> If you stretch your definition to problematic but usable,

One common example of a use case for wine is games, so maybe we can measure it as the number of games wine has it in its database over the years.

> it’s certainly true for recent versions of Windows.

Sounds very much likely given the fact that D3D 11 is now supported. D3D was an enabler or catalyst if you could call it like that, for the games and GPU industry. Who knows what’s in store with UWP

There were other enablers as well like infiniband networks. I wonder what the performance currently is in the niche market of HPCs with infnibands enabling RDMA networks: https://en.wikipedia.org/wiki/RDMA_over_Converged_Ethernet