Hatari Error : could not set video mode

A forum about the Hatari ST/STE emulator - the current version is v2.0.0

Moderators: simonsunnyboy, thothy, Moderator Team

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Hatari Error : could not set video mode

Postby Faucon2001 » Fri Jun 10, 2016 3:12 am

Hi,

I have an issue with Hatari 1.8 and 1.9 latest build running on Ubuntu Mini 15.04 X64 (a console only Ubuntu light distrib).
It doesn't start and spit an error : "could not set video mode : Couldn't set console screen info"
The same 2 builds work perfectly on Xubuntu 15.04, so I suspect that some packages are missing in Ubuntu Mini.
SDL 1.12 is installed, Aranym runs perfectly with Framebuffers, so I don't have a clue of what could be missing.

Any idea ?
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1512
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari Error : could not set video mode

Postby Eero Tamminen » Fri Jun 10, 2016 9:37 pm

If you've installed Hatari from the Ubuntu package, it should have pulled in all the needed package dependencies.

You error sounds more like SDL doesn't find the display. Make sure that your Hatari and Aranym versions link to same SDL version as Aranym works ("ldd <binary>").

If they do, check whether any of SDL environment variables help:
http://sdl.beuc.net/sdl.wiki/SDL_envvars

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Hatari Error : could not set video mode

Postby Faucon2001 » Sat Jun 11, 2016 1:48 am

Thanks. I have checked that Aranym and Hatari use the same SDL library, which is the case.
I have tried with different variables SDL_FBDEV and SDL_VIDEODRIVER setup without improvement.
Only fbcon shows the same message, with the other drivers SDL says that there is no driver available.
Kind of weird.
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1512
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari Error : could not set video mode

Postby Eero Tamminen » Sat Jun 11, 2016 6:16 pm

Hatari should adapt to whatever sized resolution is available, as long as it's large enough to show the full ST screen, but there could still be some issue with resolution matching. Try using same bitdepth and window size as what you use with Aranym.

Hatari framebuffer bitdepth can be specified with the "--bpp" option. Window size is easiest to specify exactly by using VDI mode: --vdi-planes <1/2/4> --vdi-width <x> --vdi-height <y>

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Hatari Error : could not set video mode

Postby Faucon2001 » Sun Jun 12, 2016 5:14 am

Finally it works :-) Thanks
I had to install fbset and launch the first time Hatari with --bpp 32 --vdi-planes 1 --vdi-width 640 --vdi-height 400
Once the setup saved, it works as usual.
The only thing which is not working is the fullscreen zoom ; ST low image remains very small, but I have the same issue with Aranym.
May be something to see with resolution switching of the framebuffer.
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1512
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari Error : could not set video mode

Postby Eero Tamminen » Sun Jun 12, 2016 5:33 pm

I guess your framebuffer doesn't support smaller resolutions (than your monitor resolution?).

You need Hatari development version and compile it with SDL2. Hatari (actually SDL2) will then scale the Atari display to the monitor resolution.

In the Aranym case, you could try specifying a resolution that matches your monitor resolution.

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Hatari Error : could not set video mode

Postby Faucon2001 » Wed Jun 15, 2016 4:34 am

Apparently on Ubuntu the framebuffer is automatically set to the native monitor resolution and cannot be scaled down after the boot.
I have found a solution, adding to the kernel boot parameters "drm_kms_helper.edid_firmware=edid/1024x768.bin"
fools the monitor detection and force a lower resolution, the monitor doing later the scaling. It works perfect for Aranym, and it looks better for Hatari. Next step, rebuild Hatari with SDL2 and I will be done :-)

A few more questions : I am using Hatari 1.9 winUAE dev build from beginning of june made on Ubuntu 15.04, and I am facing the following issues :
- I have not been able to compile with libportaudio, even though the dev package is properly installed, configure says that the library is not available.
- The host RTC is not available.
I have installed libudev, libportaudio, libcap, libpng12, zlib1g and libsdl1.2, and build with the standard ./configure make and make-install.
Have I missed something?
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1512
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari Error : could not set video mode

Postby Eero Tamminen » Wed Jun 15, 2016 6:30 pm

First of all, portaudio is needed only for Falcon microphone emulation. If you don't use Falcon recording software, it's useless.

What dev package you have installed for it? I think on Ubuntu 15.04 it needs "portaudio19-dev" as that seems to be portaudio2 dev-package, and Hatari needs "portaudio2", older versions aren't supported. (I'm not going to test that myself as portaudio19-dev requires older deps of other libs and the conflicts would remove some sound SW I want to have, which depend on newer versions of those libs.)

If everything else fails, Hatari CMake file for checking portaudio existence is in "cmake/FindPortAudio.cmake".

What do you mean by "The host RTC is not available"?

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Hatari Error : could not set video mode

Postby Faucon2001 » Sun Jun 19, 2016 5:38 am

Eero Tamminen wrote:What dev package you have installed for it? I think on Ubuntu 15.04 it needs "portaudio19-dev" as that seems to be portaudio2 dev-package, and Hatari needs "portaudio2", older versions aren't supported. (I'm not going to test that myself as portaudio19-dev requires older deps of other libs and the conflicts would remove some sound SW I want to have, which depend on newer versions of those libs.)


I was using libportaudio-dev, wrong catch :oops: . Thanks.

Eero Tamminen wrote:What do you mean by "The host RTC is not available"?

On the build I made (1.19-dev June 2 2016), the Atari clock starts at 00:00:00 and is not synchronized with the host clock. Have I missed something in the configure process? I have not seen any switch to activate host RTC.
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1512
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari Error : could not set video mode

Postby Eero Tamminen » Sun Jun 19, 2016 9:21 pm

There's no ST model with RTC, only MegaST models (and MegaSTe ones) contained RTC. As latest Hatari dev versions added support for MegaST/STe emulation, for RTC, you need to nowadays select MegaST/e, instead of ST/e.

Note: RTC is synched to system clock only at boot, after that it follows emulated system CPU clock for emulation accuracy reasons.

User avatar
npomarede
Atari God
Atari God
Posts: 1124
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari Error : could not set video mode

Postby npomarede » Mon Jun 20, 2016 8:36 am

Eero Tamminen wrote:There's no ST model with RTC, only MegaST models (and MegaSTe ones) contained RTC. As latest Hatari dev versions added support for MegaST/STe emulation, for RTC, you need to nowadays select MegaST/e, instead of ST/e.

Note: RTC is synched to system clock only at boot, after that it follows emulated system CPU clock for emulation accuracy reasons.

HI

Not really, it depends on which RTC :)
- the RTC one from Mega ST/STE will always report system clock of the host running Hatari
- the IKBD RTC need to be set to a correct date/time in emulated Atari machine, then it will follow the emulated system CPU clock

I think that in the case of the MegaST RTC we should do the same that for the IKBD, else it's not possible to set date/time to any arbitrary values ; I will look at this.

Nicolas

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Hatari Error : could not set video mode

Postby Faucon2001 » Wed Jun 22, 2016 4:23 pm

Hi,

Ok, understood for the RTC ; it works as expected in Mega ST, Mega STE and Falcon mode ( not tested in TT mode)

Regarding SDL2 build in order to have a fullscreen zoom for low rez screens, I did a first build on Xubuntu 15.04 with the last Hatari 1.9-dev and it works fine ; no compiling issue and scaling is done correctly.
Then, when I tried in on Ubuntu Mini-remix 15.04 with all the libs installed ( it's a light terminal only Ubuntu distro like Ubuntu Server) and I got a Segmentation Fault.
I decided de rebuild Hatari directly under Ubuntu Mini-remix with the following packages :
builds-essential, cmake, libsld2-dev, libudev-dev, libpng12-dev, portaudio19-dev, zlib1g-dev, libcap-dev
./configure runs ok without any issue, excepted for capsimage which is not found, but it's not a problem I believe.

Code: Select all

-- Looking for include file malloc.h - found
-- Looking for include file /usr/include/SDL2/SDL_config.h
-- Looking for include file /usr/include/SDL2/SDL_config.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/times.h
-- Looking for include file sys/times.h - found
-- Looking for include file utime.h
-- Looking for include file utime.h - found
-- Looking for include file sys/utime.h
-- Looking for include file sys/utime.h - not found
-- Looking for include files sys/socket.h, sys/un.h
-- Looking for include files sys/socket.h, sys/un.h - found
-- Looking for cfmakeraw
-- Looking for cfmakeraw - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for select
-- Looking for select - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for nanosleep
-- Looking for nanosleep - found
-- Looking for alphasort
-- Looking for alphasort - found
-- Looking for scandir
-- Looking for scandir - found
-- Looking for statvfs
-- Looking for statvfs - found
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for ftello
-- Looking for ftello - found
-- Looking for flock
-- Looking for flock - found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Performing Test HAVE_DIRENT_D_TYPE
-- Performing Test HAVE_DIRENT_D_TYPE - Success
-- Found PythonInterp: /usr/bin/python (found version "2.7.10")

Libraries summary :
-------------------

  - sdl :       using SDL2 v2.0.2

Make spits 2 error during compiling :

Code: Select all

/root/hatari/src/cpu/fpp.c: In function 'fpuop_arithmetic':
/root/hatari/src/cpu/fpp.c:1375:10: warning: 'exts[2]' may be used uninitialized in this function [-Wmaybe-uninitialized]
  uae_u32 exts[3];
 /root/hatari/src/cpu/fpp.c:1375:10: warning: 'exts[1]' may be used uninitialized in this function [-Wmaybe-uninitialized]
/root/hatari/src/cpu/fpp.c:1499:4: warning: 'exts[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
    fpset(src, (uae_s32) (doext ? exts[0] : x_cp_get_long (ad)));
 /root/hatari/src/cpu/fpp.c:1375:10: note: 'exts[0]' was declared here
  uae_u32 exts[3];

/root/hatari/src/video.c: In function 'Video_InitTimings':
/root/hatari/src/video.c:812:7: warning: unused variable 'i' [-Wunused-variable]
  int  i;
/root/hatari/src/video.c: At top level:
/root/hatari/src/video.c:984:13: warning: 'Video_InitTimings_Round' defined but not used [-Wunused-function]
 static void Video_InitTimings_Round ( VIDEO_TIMING *pSrc )
/root/hatari/src/video.c:653:13: warning: 'Video_Sync_SetDefaultStartEnd' declared 'static' but never defined [-Wunused-functio$
 static void Video_Sync_SetDefaultStartEnd ( Uint8 Freq , int HblCounterVideo , int LineCycles ); 

After make install, when I run hatari I have a Segmentation Fault

I did the same with Ubuntu Mini-remix 15.10 and got the same make warnings, but when I run hatari I got the following error :
XDG_RUNTIME_DIR not set
Could not initialize the SDL library : no available device.
Starting hatari forcing the video parameters didn't do the trick neither.
I have set XDG_RUNTIME_DIR to /tmp/, but as read on various Ubuntu forum it's necessary to define $DISPLAY and $XAUTHORITY which are empty on my system as X11 is not installed.

Rebuilding with Ubuntu Mini-remix 16.04, I got a different error message complaining that Mir was missing.

So my interpretation so far is :
With SDL1.2, hatari works with framebuffers under Ubuntu Mini-remix
SDL2 2.0.4 which is used by Ubuntu 16.04 needs Mir by default
Others SDL2 version (2.0.2 for 15.04 and 2.0.3 for 15.10) seem to need X11 by default.

Any chance to have hatari build with SDL2 work on a bare terminal Linux with framebuffers without installing X11 or Mir?
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

User avatar
npomarede
Atari God
Atari God
Posts: 1124
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari Error : could not set video mode

Postby npomarede » Wed Jun 22, 2016 4:30 pm

Either case, there's nothing we can do ; if ubuntu mini decided to build SDL2 and requiring X11 and/or MIR, your only option is likely to compile your own version of SDL2 with your own configuration options.

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Hatari Error : could not set video mode

Postby Faucon2001 » Wed Jun 22, 2016 5:15 pm

:x Bad news.

In the mean time, I have confirmed that SDL2 for Ubuntu needs X11 by default. I have installed X11 and Openbox and finally Hatari is starting. The trade off : 120 MB of unnecessary crap on my distro which I wanted to be light ; on the other side rebuilding SDL2 makes me nervous, so I'll stay with this temporary solution for the time being.

Thanks,
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Hatari Error : could not set video mode

Postby Faucon2001 » Wed Jun 22, 2016 6:27 pm

Just for my curiosity, what do the warning messages mean?
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

User avatar
npomarede
Atari God
Atari God
Posts: 1124
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari Error : could not set video mode

Postby npomarede » Wed Jun 22, 2016 6:33 pm

those in video.c are harmless, just some unused code that will be removed before next release.
those in fpp.c are caused by more complex optimisation that gcc can't guess, but it's harmless too.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1512
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari Error : could not set video mode

Postby Eero Tamminen » Wed Jun 22, 2016 9:48 pm

Of the Atari machines, only TT has FPU. For other machines you would need to specifically enabled it, so any warnings from that don't relate to any run-time issues.

As to SDL2 to needing X11, that's probably because SDL2 HW acceleration for things like window scaling etc uses DirectX (Windows), OpenGL (X11) or OpenGL ES (Android). Your 3D driver (Ubuntu build) probably doesn't support rendering to plain console, and that's why you need X11. If you're using Mesa instead of proprietary 3D drivers, Wayland could work too.

Stuff needed for Wayland should be much smaller than stuff needed for X11, but things based on Ubuntu 15.04/15.10 may be too old for that (Ubuntu hasn't really been in technology front with Wayland support). I'm pretty sure that in Ubuntu 16.04, SDL2 + Wayland should work together.

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 640
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Hatari Error : could not set video mode

Postby Faucon2001 » Thu Jun 23, 2016 2:02 am

Thanks Eero, I'll give a try.
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 1 guest