/lv/ - Libre Vidya

video games in freedom

Posting mode: Reply

Check to confirm you're not a robot
Drawing x size canvas

Remember to follow the rules

Max file size: 350.00 MB

Max files: 5

Max message length: 4096

Manage Board | Moderate Thread

Return | Catalog | Bottom

Expand All Images

(86.15 KB 736x240 v.png)
Gaming without X Anonymous 11/12/2016 (Sat) 01:28:10 [Preview] No. 165
Some games can output video to the framebuffer, allowing you to launch and play them from the tty, without any display server running. This usually requires some tinkering to get to work because /dev/input devices are set to 660 root:input, so you can't access them directly without being in the input group. You shouldn't add yourself to the input group though, that's a bad idea. What I do is this:
$ sudo chown :input /usr/bin/game
$ sudo chmod g+s /usr/bin/game
Now the game executable will be launched as if you were in the input group even though you're not. If the game is libre, then giving it unrestricted access to your input shouldn't be an issue.
Games I know to work like this are:
>widelands (requires SDL_VIDEODRIVER=fbcon)
>retroarch (I know the games themselves aren't libre, but the emulator is and that's what counts)

Feel free to add to the list if you know of any more.

Anonymous 11/12/2016 (Sat) 14:05:36 [Preview] No. 166 del
>shouldn't add yourself to the input group
>makes everyone in system able to run executable with such group
Making separate user for game added to "input" group looks safer.

Anonymous 11/12/2016 (Sat) 15:24:41 [Preview] No. 167 del
Wow. That's damn clever, I can't believe I haven't heard of this before.

I will make assumptions that this would work best with the libre drivers? I think the Nvidia proprietary driver is X only and defaults to uvesa. I know fglrx has their "core" 2d package to handle display without X. Assuming hardware acceleration is even necessary given fb is so slow.
It makes perfect sense really, we can already store static images in the frame buffer. Default Slackware used to show a Tux via the fb immediately after lilo. Also, surely any 2D SDL video game could use the fb?

If I can gather a little more info on this I may add this to the newbie guide.

Anonymous 11/12/2016 (Sat) 15:33:03 [Preview] No. 168 del
Seeing some games here worth looking into.

Anonymous 11/12/2016 (Sat) 16:21:15 [Preview] No. 170 del
>setting the suid bit
inb4 rooted lol

Anonymous 11/12/2016 (Sat) 16:59:14 [Preview] No. 171 del
I'd rather have a couple specific executables with access to /dev/input than an entire user with that privilege.

Yea, the nvidia driver is shit when it comes to anything other than modern triple ayy garbage. It might work with nouveau though. I have amd so I dunno.

Btw, while the fb itself cannot use hardware acceleration, I heard that it's theoretically possible to get accelerated opengl using dri. I'm not sure if any driver supports this.

>doesn't know the difference between suid and sgid

Anonymous 11/12/2016 (Sat) 18:50:26 [Preview] No. 172 del
Wow, running games without X is like the ultimate measure for low-spec gamers. I wonder how well will it run in an Intel IGPU compared to running it with X.

Anonymous 11/12/2016 (Sat) 19:16:17 [Preview] No. 173 del
on topic of sgid-ing game - who knows what bugs lurk in it, can it run arbitrary code if supplied with specific data? Make sgid executable accessible only to specific user or just make additional user with needed groups set, given lack of X it's easy.

Anonymous 11/12/2016 (Sat) 20:14:19 [Preview] No. 174 del
Try libdrm via glmark2 for hardware accel with 3D graphics it works sometimes... really it only worked on my intel based laptop not my randeon graphics card... It's really libdrm (direct rendering manger) that gives the accel. This can be done directly from the framebuffer without X.

Anonymous 11/13/2016 (Sun) 00:00:01 [Preview] No. 175 del
>3D in fb
Isn't that going to be really choppy? What framerate can fb actually achieve, I am pretty sure it's very low.

Anonymous 11/13/2016 (Sun) 00:55:45 [Preview] No. 176 del
I mainly emulate ps1 games nowadays. Retroarch reports stable 60 fps. I just compared how it looks in X and in fb and I see no difference. This leads me to believe that fb is quite capable of displaying whatever you throw at it, as long as the cpu can keep up or you get hw accel working as that anon said.

Anonymous 11/13/2016 (Sun) 09:54:06 [Preview] No. 177 del

xonotic next then

Anonymous 11/13/2016 (Sun) 12:48:54 [Preview] No. 178 del

Anyone tried the directfb option? Directfb documentation states it also handles input. I am interested in how it compares with fbcon. It promises hardware acceleration too.

Anonymous 11/13/2016 (Sun) 13:37:43 [Preview] No. 179 del
the main problem iirc is that the main implementation of opengl for linux is GLX which has hard X dependency, nvidia blobs still need X for opengl unless you're going to do EGL with EGL streams.

Anonymous 11/13/2016 (Sun) 15:29:16 [Preview] No. 180 del
Installed it just to test, couldn't get it to work.

Heard about it, but never tried it before. I have no idea how it's supposed to work, there's virtually no documentation, and trying to run the supplied executables (which I can only guess the purpose of) results in a segfault.

Top | Return | Catalog | Post a reply