You are not logged in.

#1 2018-05-06 10:00:53

stamoulohta
Member
From: Stamoulis
Registered: 2013-10-30
Posts: 9
Website

[SOLVED] SDL initialization failure: No available video device

I get the title error when I try to run dwarf fortress. If I run it with sudo everything runs fine. I thought It might be a group error so I did

for gp in `cut -f 1 -d : /etc/group`; do
usermod -a -G $gp stamoulohta
done 

for testing purposes only but I still get the same error...

Does anyone have an idea on what I might be missing?
Thanks.

Last edited by stamoulohta (2018-05-06 12:50:29)


// TODO fix this.

Offline

#2 2018-05-06 10:34:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,145

Re: [SOLVED] SDL initialization failure: No available video device

Randomly adding your user to every group will definitely not be the fix no.

Details on your hardware would be nice. And this sounds like you broke your session, how do you log in, how do you start X?  What's the output of

loginctl show-session $XDG_SESSION_ID
hostnamectl

Offline

#3 2018-05-06 10:50:11

stamoulohta
Member
From: Stamoulis
Registered: 2013-10-30
Posts: 9
Website

Re: [SOLVED] SDL initialization failure: No available video device

Randomly adding your user to every group will definitely not be the fix no.

lol if it did, I wouldn't be posting in the forum ^^

I have an ATI Radeon HD 5770 Series card and I use the open source driver.

u@h ~ $ hostnamectl 
   Static hostname: h
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: ***
           Boot ID: ***
  Operating System: Arch Linux
            Kernel: Linux 4.16.6-1-ARCH
      Architecture: x86-64
u@h ~ $ loginctl show-session $XDG_SESSION_ID
Id=c4
User=1000
Name=u
Timestamp=Sun 2018-05-06 12:38:57 EEST
TimestampMonotonic=874623345
VTNr=1
Seat=seat0
TTY=tty1
Remote=no
Service=login
Scope=session-c4.scope
Leader=1094
Audit=0
Type=tty
Class=user
Active=yes
State=active
IdleHint=yes
IdleSinceHint=1525599545687002
IdleSinceHintMonotonic=882687002
LockedHint=no

also,

u@h ~ $ echo $DISPLAY
:0

I login manually in the tty and i start X by the 'startx' script or I start wayland by calling sway and I get the same error.

Last edited by stamoulohta (2018-05-06 10:53:52)


// TODO fix this.

Offline

#4 2018-05-06 12:24:27

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,912

Re: [SOLVED] SDL initialization failure: No available video device

Looks like dwarffortress uses sdl / gtk2 .

The earliest sdl version with wayland support is sdl2 2.02, so DF won't run natively on wayland.
Does sway support Xwayland ?

Last edited by Lone_Wolf (2018-05-06 12:24:46)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2018-05-06 12:48:45

stamoulohta
Member
From: Stamoulis
Registered: 2013-10-30
Posts: 9
Website

Re: [SOLVED] SDL initialization failure: No available video device

Does sway support Xwayland ?

I think it does.. at least it runs urxvt.

Anyway, I figured it out. I, per the wiki, had put to my profile file

export SDL_VIDEODRIVER=wayland

witch doesn't play well with sdl(1)..

Thanks for your time guys. I hope this helps others who did the same mistake. Cheers.

edit:
To clarify, sudo by default doesn't pass environment variables, that's why the game was running with sudo.

Last edited by stamoulohta (2018-05-06 12:52:25)


// TODO fix this.

Offline

Board footer

Powered by FluxBB