Results 1 to 34 of 34

Thread: Jedi Knight on Linux

  1. #1
    Administrator
    Posts
    7,418

    Jedi Knight on Linux

    Not sure if this has been discussed before. I mentioned in a thread previously that some dude emailed me about running JK on a mac using WINE. WineHQ states that JK support under wine is "gold" level (meaning it works really well). They state that MP doesn't work properly without some effort, and that 3d acceleration doesn't work. I didn't try MP at all but I was able to get the installer, single player, and 3d acceleration working flawlessly on my laptop. It's a Thinkpad X1 Carbon running Ubuntu 16.04 with Cinnamon.

    It actually works about a billion times better than windows. To install it, I installed wine (sudo apt-get install wine). Then I put the CD in an external USB cd drive (bought to rip some CDs) and then ran the installer using wine:

    wine /media/brian/JEDI_1/install/setup.exe

    This started the gui installer. I installed it just like on windows. Everything looked just like on Windows. I chose high-res sounds and high-res mode (I think they consider 640x480 high res). When the installer was finished it popped up the little launcher thing and I clicked the Play button.

    When the game started I was surprised that it played in full screen mode with the intro cutscene working flawlessly. I went into the options and enabled 3d acceleration, set the res at 1280x1024, and set up my controls. Again everything was in full screen mode, it never dropped to windowed mode like it did on windows 7 all the time.

    I started the game and again the cutscene played flawlessly. During the game, the cd audio even worked great.

    After I play through the game again I'm going to pick up the latest level pack levels and play them.

    Oh also, since I'm going to play the game again, what patches should I actually install? There's like a high res texture pack right? And something else that maybe makes the sabers look cooler but doesn't change the gameplay at all?

  2. #2
    Administrator
    Posts
    7,418
    I tried Jedi Knight Enhanced (https://www.massassi.net/levels/files/3087.shtml) and it didn't go well. The models look fantastic but the rest of the textures in the game are messed up I don't know if this is an artifact of using wine/linux or if I did something wrong in the install. I tried the latest unofficial jk patch from jkhub and also the one included in Jedi Knight Enhanced and got the same results.

    Click image for larger version. 

Name:	JSHOT003.jpg 
Views:	25 
Size:	76.8 KB 
ID:	27643

  3. #3

    NIKVMVS-REX-TODOA

    Posts
    16,951
    That JKE screenshot looks like the common "loading an old savegame after installing a mod that was not originally used with the savegame" error.

    AFAIK, this is still the most recent version of the hi-res texture pack: http://www.jkhub.net/project/show.ph...tion=downloads

  4. #4
    I wonder if there will come a time when Microsoft releases a theoretically not backwards compatible OS and just bundles it with Wine.
    Sorry for the lousy German

  5. #5
    Administrator
    Posts
    7,418
    Thanks Nikumubeki. Just starting a brand new game fixed it all. I didn't realize (or maybe just forgot) that I had to start a new game. The new models in JKE look really good.

  6. #6
    Administrator
    Posts
    7,418
    It turns out I don't like level 2 or Baron's Hed. I forgot about that.

  7. #7

    NIKVMVS-REX-TODOA

    Posts
    16,951
    I like level 2 (of course, I don't think I've played it without godmode since 2008), and while I don't really detest Baron's Hed, I never got the community craze for it.

    All those "Barons Hed RPG"s, and zul making a hundred billion Baron's Hed texture remakes and so on.

    Why didn't you make me even more Nar Shaddaa remake textures like you did for Sine, zul? I know I never asked you to, but still...

    Attachment 27645

  8. #8

    "Has it won yet?"

    Posts
    17,074
    I think it's because it was the only level that felt like running around in a city... sorta.

    Was hard to find the exit though.
    SnailIracing:n(500tpostshpereline)pants
    -----------------------------@%

  9. #9
    Administrator
    Posts
    7,418
    I was messing with this yesterday on a newer laptop (Lenovo Flex 5 from costco; originally came with windows but it has Ubuntu on it now) because I want to play Nikumubeki's level. The installation didn't go as smoothly this time. Well, installation worked but when I tried to launch JK it kept complaining that "z:" was not a valid cd rom drive. The new version of ubuntu has two versions of wine avaiable, wine-stable and wine-development. I originally started with wine-stable and then removed it and tried wine-development, same issue.

    After deleting everything and starting over a few times, it turned out the trick to getting everything to work was to first run 'winecfg' so it generated a clean .wine directory (which sets up a fake "c:" drive), then "cd" into said c drive and start the installation from there (rather than from my home dir directly).

    cd .wine/drive_c
    wine /media/brian/JEDI_1/install/setup.exe

    Then it correctly recognized the cd drive (as "d:") and let me launch the game.

    The 3d acceleration, cd music, sounds, menus, everything works perfectly, much better than in actual windows.

  10. #10
    Admiral of Awesome
    Posts
    17,754
    The last time I tried, the steam release ~just worked~ with steamplay (proton). Except multiplayer. Direct play doesn’t seem to be implemented correctly.

  11. #11
    I think multiplayer will work if you copy over the following DLL files over from the CD to Wine's system32 directory.

  12. #12
    Administrator
    Posts
    7,418
    That's cool. The last time I tried to get it working on windows (windows 7 I think), it kept going in and out of windowed mode depending on whether a cutscene was playing, the menu was up, or the game was playing. I can't remember but I think I also had to tweak the launcher to launch it in some compatibility mode or something but it's been a long time.

    I just find windows 10 infuriating so I try to stay away from it; luckily (?) I don't play games much anymore so I don't really have a reason to use it. I do end up helping my son with his gaming computer and the experience is not getting better.

  13. #13
    Administrator
    Posts
    7,418
    It seems I completely misunderstood what steamplay/proton are. That's for steam on linux. Cool.

  14. #14
    Admiral of Awesome
    Posts
    17,754
    Very cool.

    For people unaware: Valve is now bundling their own Wine+dxvk distribution and game-specific configurations with Steam. They're gradually whitelisting Windows-specific games (which makes them appear in your Linux library to download by default), and many more work if you turn on Proton for your whole library. Whitelisted games work under Linux just like they do on Windows. No thinking required.

    Community-run compat db for non-whitelisted games:

    https://www.protondb.com/

  15. #15
    For non-steam games (or games that run poorly with Proton atm) I usually use Lutris. It is similiar to PlayOnLinux. It sets up a different wine prefix for everything so that you don't contaminate your other wine-stuff with game-specific settings. But other than PlayOnLinux it aims to be the hub for all gaming on Linux. The upshoot is that when a Linux-specific version is available you can usually find an installer for that so that you don't have to mess with wine at all. Jedi Outcast works that way on Lutris.

    So, Jon`C, get Gorc up and running! :p
    Sorry for the lousy German

  16. #16
    Admiral of Awesome
    Posts
    17,754
    ahahahahaha

  17. #17

    NIKVMVS-REX-TODOA

    Posts
    16,951
    Quote Originally Posted by Brian View Post
    because I want to play Nikumubeki's level.
    Thanks, Brian!

  18. #18
    ..would like a shrubbery.
    Posts
    4,765
    Jedi Knight works great under Wine, bizarrely it seems to be capped at 30fps at 4k.

    Either the engine is incredibly poorly optimized, WINE thinks my monitor only supports 30hz when using ddraw or the engine itself is imposing an fps cap.
    TheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWho
    SaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTh
    eJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSa
    ysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJ
    k
    WhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSays
    N
    iTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkW

  19. #19

    NIKVMVS-REX-TODOA

    Posts
    16,951
    Interesting. I've tried to get GBK to test JK on Linux with these methods but, the traitor he is, he hasn't budged yet.
    Last edited by Nikumubeki; 03-07-2019 at 01:29 PM.

  20. #20
    Quote Originally Posted by Nikumubeki View Post
    Interesting. I've tried to get GBK to test JK on Linux with these methods but, the traitor he is, he hasn't budged yet.
    If I had the spare time for a hobby right now there's a thousand other things I'd do first.
    And when the moment is right, I'm gonna fly a kite.

  21. #21
    Administrator
    Posts
    7,418
    It's really been running flawlessly for me. I don't have a 4k monitor though. I was able to install the unofficial patch from jkhub without issue (using the batch file ... I can't remember the command I used to run it). I played through Life of Grismath and it was fantastic and now I'm playing through Magrucko Daines and the Vertical City. I'm trying to go through all the levels submitted for the Death of Massassi and then after that I'll go through some older ones.

  22. #22
    Administrator
    Posts
    7,418
    Found an interesting thing: when I switched to the proprietary nvidia drivers I started getting periodic skips in the game; like everything would just stop for a second and then resume. Switching back to the nouveau drivers made it go away. I'm not sure I remember why I switched to the nvidia drivers anyway, JK is the only 3d thing I'm doing on here. This laptop also has built-in Intel 3d of some sort as well but I'm not sure how to change it with the nouveau drivers. It's possible to switch back and forth using the nvidia control panel thing (manually) and it's also possible to completely disable the nvidia card in the bios... errr... uefi or whatever the new name for it is. But once I switch to the nouveau drivers I don't know how to switch. Anyway, if you're having weird glitches like that on linux and you're using the proprietary nvidia drivers, try nouveau and see if it helps.

    Apparently the nvidia card in here is a "GeForce 940MX" -- I have no idea how it compares to anything else.

  23. #23
    Administrator
    Posts
    7,418
    Eh, I am misunderstanding something. When I went back to nouveau it seems to be using the integrated intel graphics only. glxinfo and every graphics card id program I can find shows only the intel card available, it's like the nvidia card just disappears. When I re-enable the proprietary drivers the nvidia card is back. So I clearly don't know what I'm doing. But I'm going to just keep the nouveau/intel thing active since it works so well for JK and I'm not doing any other 3d on this laptop.

  24. #24
    Admiral of Awesome
    Posts
    17,754
    This is probably what you want:

    https://wiki.archlinux.org/index.php/bumblebee

  25. #25
    Bumblebee is outdated. They all use https://wiki.archlinux.org/index.php/PRIME nowadays. It is the thing on the proprietary driver that allows you to switch the card and apparently it works with the open source driver as well.
    Sorry for the lousy German

  26. #26
    Administrator
    Posts
    7,418
    Yeah that's what I was originally reading; the command:
    Code:
    $ xrandr --listproviders
    Only lists one card when I have nouveau installed.

    There's a "troubleshooting" section at the bottom that may address this so I might try the suggestions if I get time. Thanks.

  27. #27
    You know, I think I have posted in the past about dual booting Linux on my PC. I have a free m.2 slot and, inspired by this thread, I was think about getting another m.2 and putting Linux on it.
    "I would rather claim to be an uneducated man than be mal-educated and claim to be otherwise." - Wookie 03:16


  28. #28
    Administrator
    Posts
    7,418
    If you just want to play JK it would probably work in a linux virtual machine inside windows. That's a lot easier than dual-booting.

    I completely gave up on Windows. With the forced updates and telemetry that can't be disabled, I'm just over it.

    I mentioned in a previous thread as well that wine works on mac and someone emailed me a long time ago with a link to a github page with some shell script you could run to set everything up to run jk on mac (via wine). I didn't feel comfortable posting it on the news because I didn't fully understand the shell script (and I hate "installation" scripts that look like "sudo curl http://something/ | bash" -- so evil).

    I'm unfortunately still called upon to help people (family) with windows now and again, and every time the experience sucks. Just tonight I put an SSD in my son's gaming laptop. All went well until we went to format it in windows 10 and at ~98% finished my son plugged in a usb headset and it caused the format to crash, then the drive disappeared from the disk management program and spewed a bunch of errors. Only way I could find to get it back was to reboot the computer and start all over. Seriously, what the hell? Second time around it worked but I told him "don't touch anything" while it was formatting; it reminds me of the old days when you couldn't touch the windows 95 computer while a CD was burning or you'd get a buffer underrun and your disc would be ruined.

  29. #29

    NIKVMVS-REX-TODOA

    Posts
    16,951
    Brian, I think you should tackle Elmo's The Lost Mercenary next.

  30. #30
    Haha, I was just playing that the other day with cheatcodes

    Framerate was just tolerable on Linux/Wine + Intel® HD graphics 4400 (Chromebook C740 from 2015)
    Last edited by Reverend Jones; 03-10-2019 at 11:24 AM.

  31. #31
    Admiral of Awesome
    Posts
    17,754
    Quote Originally Posted by Ni View Post
    Jedi Knight works great under Wine, bizarrely it seems to be capped at 30fps at 4k.

    Either the engine is incredibly poorly optimized, WINE thinks my monitor only supports 30hz when using ddraw or the engine itself is imposing an fps cap.
    I think I might have an answer for this. JK draws the HUD directly onto the backbuffer. Each frame needs to be read off the GPU into memory, then it's edited (the whole frame), and finally it's presented to the user - again, from system memory. It's essentially a big ol' postprocessing effect that's done on your CPU instead of the GPU, in probably the most cache-unfriendly way possible.

    The interceptor I'm working on (see the games thread) skips the read back from the GPU. That brings it up to a buttery smooth 44 fps on my computer in 4k.

  32. #32
    I run JK exclusively through Linux and it plays perfectly (after setting the necessary libraries on wine) although the FPS is rather deplorable considering it's such an old game. It runs a lot smoother however when there isn't any BM/SFT (HUD or text) overlays on the screen.

  33. #33
    ..would like a shrubbery.
    Posts
    4,765
    Quote Originally Posted by Jon`C View Post
    I think I might have an answer for this. JK draws the HUD directly onto the backbuffer. Each frame needs to be read off the GPU into memory, then it's edited (the whole frame), and finally it's presented to the user - again, from system memory. It's essentially a big ol' postprocessing effect that's done on your CPU instead of the GPU, in probably the most cache-unfriendly way possible.

    The interceptor I'm working on (see the games thread) skips the read back from the GPU. That brings it up to a buttery smooth 44 fps on my computer in 4k.

    Very interesting, thanks! I'll check that out and report back. Wouldn't this have had the same result back in the day when I was playing at 1024x768 on a 400mhz PC? I don't remember it being quite so CPU limited back then. And I certainly had it running at near solid 60fps at 1600x1200 on a 1.5ghz PC in the early 2000s, it must scale very poorly at higher resolutions.

    I'll have to try 1440p because 1080p works fine.
    TheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWho
    SaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTh
    eJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSa
    ysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJ
    k
    WhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSays
    N
    iTheJkWhoSaysNiTheJkWhoSaysNiTheJkWhoSaysNiTheJkW

  34. #34
    Admiral of Awesome
    Posts
    17,754
    Quote Originally Posted by Ni View Post
    Very interesting, thanks! I'll check that out and report back. Wouldn't this have had the same result back in the day when I was playing at 1024x768 on a 400mhz PC? I don't remember it being quite so CPU limited back then. And I certainly had it running at near solid 60fps at 1600x1200 on a 1.5ghz PC in the early 2000s, it must scale very poorly at higher resolutions.

    I'll have to try 1440p because 1080p works fine.
    The rows of the screen JK draws to would have fit in your L1 cache back then.

    CPUs have gotten a lot faster, but memory hasn't kept up, L1/L2 caches haven't grown very much in the past decades, GPUs have evolved away from transferring large buffers per frame / sending ANYTHING to the CPU per frame. JK was designed in a very different world than the one we live in today. Though, really, what they were doing wasn't considered proper back then anyway.

    Maybe I'll experiment to see if there's some way to trick JK into using a lower-resolution backbuffer, since obviously nobody wants it drawing the HUD the way it's drawing it anyway.

    JK also doesn't handle wide resolutions well. 1920x1440 feels like the best experience to me overall.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •