Mouse overspeed in full screen modes on netbook

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

Moderators: simonsunnyboy, thothy, Moderator Team

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Mouse overspeed in full screen modes on netbook

Postby siriushardware » Thu Sep 17, 2015 12:23 am

Hatari V1.8.0,
Dell Mini 10V /Dell 1011 netbook with a 1024 * 600 pixel screen
OS is Zorin OS 6 (an Ubuntu 12.04 derivative).

Hatari is running as an 8Mhz 2MB ST/STe.

In Full screen mode (both colour and mono) the mouse scaling is quite a way out (too fast), so that only a small (<1cm) movement of the finger on the touchpad will move the mouse pointer all the way from the left side to the right side of the screen. If I use the original Atari 'control panel' accessory to take the mouse pointer speed to the minimum possible, the mouse scaling is still way too fast.

In windowed modes the mouse responsiveness exactly mirrors that of the Linux Desktop, so it is usable. It's only in fullscreen mode that the mouse cursor becomes too fast. This is not specifically a Hatari 1.9.0 issue - it was present in 1.8.0 and is still present in 1.9.0. Due to the comparatively small size of the netbook's physical screen I really do need to be able to expand the Hatari screen so it fills the physical screen from top to bottom - but I also need to be able to use the mouse.

I have a desktop computer running the same Linux distro and on that machine, which has a 1280 * 1024 resolution monitor, the mouse scaling with fullscreen mode selected is fine.

This makes me think that it is the relatively low resolution of the netbook's screen which is upsetting or fooling the calculations for the mouse scaling on the netbook only (maybe there was no expectation that anyone would be using such a low resolution screen anymore?).

There's no desktop mouse speed scaling option under the F12 configuration menu - is there anything (config file, or anything in the source) which I can tweak to turn the mouse speed in fullscreen mode down to roughly one third of its present responsiveness?

User avatar
iceman
Captain Atari
Captain Atari
Posts: 178
Joined: Sat Mar 02, 2013 11:03 pm

Re: Mouse overspeed in full screen modes on netbook

Postby iceman » Thu Sep 17, 2015 12:23 pm

I have the same problem with 64 bit Ubuntu on my Lenovo.

I'd love to see if anyone has any ideas on how to throttle the mouse back.
Atarian since 1989. Atari 1040STFM, 4MB 520STe with UltraSatan and Unitor N, A dodgy 1 MBSTe that bombs out after a few minutes, and a 14MB 48MHz Falcon 030 with NetUSBee and Soundpool 8 channel DAC. Plus my new MiST!

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Thu Sep 17, 2015 5:08 pm

Is your Lenovo a Netbook, Laptop or Desktop computer? What's the native (highest) pixel * pixel resolution of the screen?

I've had a half hearted look through the source for anything to do with mouse scaling but the sheer complexity of the software puts it pretty much beyond my comprehension even though it is liberally commented - I find C / Java etc extremely hard to read and understand anyway, even though I have written small amounts of C-like code myself for microprocessor projects and so on.

I would have a shot at hacking it / recompiling it to work on the Dell if given a gentle push in the right direction.

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

Re: Mouse overspeed in full screen modes on netbook

Postby Eero Tamminen » Thu Sep 17, 2015 7:04 pm

I've used old Hatari versions on Nokia tablets with 800x600 screen and don't remember this kind issue, so if it's resolution dependent, it's a regression.

Do things change if you enable/disable borders (--borders on/off), zooming ("-z 1" / "-z 2"), or if you tell Hatari to use desktop resolution in fullscreen with "--desktop-st on"?

Which libSDL version do you have? Do you have mouse problems in fullscreen with any other programs that use libSDL and set resolution different from your normal desktop resolution?

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Thu Sep 17, 2015 8:21 pm

Output from

dpkg -l *libsdl*

Indicates SDL V1.2 installed. I didn't invoke the compile-time 'SDL2 enable' switch because I didn't think I had SDL2 installed.

Let me get back to you on the other questions: If I run Hatari from the terminal command line (as I normally do) followed by your suggested diagnostic switches, Hatari just seems to override them with whatever settings it finds in the hatari.cfg file, so I don't see the result that the command line switch should produce.

Presumably, I have to either stop it from loading the .cfg file (rename the file?) or try out these variations post-launch by making changes through the 'F12' GUI and then resetting. (That is how I have been changing between full screen / not full screen mode, anyway).

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

Re: Mouse overspeed in full screen modes on netbook

Postby Eero Tamminen » Thu Sep 17, 2015 8:38 pm

siriushardware wrote:Output from

dpkg -l *libsdl*

Indicates SDL V1.2 installed. I didn't invoke the compile-time 'SDL2 enable' switch because I didn't think I had SDL2 installed.


Can you give more accurate version? (I'm using libSDL v1.2.15)


siriushardware wrote:Let me get back to you on the other questions: If I run Hatari from the terminal command line (as I normally do) followed by your suggested diagnostic switches, Hatari just seems to override them with whatever settings it finds in the hatari.cfg file, so I don't see the result that the command line switch should produce.


Command line switches should override anything in config file (as they're parsed after config file). Them not having effect sounds really peculiar. Is it same with windowed (-w) and fullscreen (-f) mode?

siriushardware wrote:Presumably, I have to either stop it from loading the .cfg file (rename the file?) or try out these variations post-launch by making changes through the 'F12' GUI and then resetting. (That is how I have been changing between full screen / not full screen mode, anyway).


You can use F11 shortcut to toggle fullscreen on/off. Default shortcut keys are listed in Hatari manual page ("man hatari") & manual.html file and you can change them from the Hatari config file.

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Thu Sep 17, 2015 10:17 pm

My apologies: The command line switches DO work and override the .CFG file as you say they should. It's not going to help if I keep giving you bad information.

I can now say that regardless of whether I use the command line switches or the F12 GUI to change things, the mouse speed is too fast in all variations of fullscreen mode. That is with borders on, off, Atari desktop size locked or not, all standard Atari ST resolutions. The only parameter that I couldn't change from the F12 GUI but could from the command line switches was the zoom level: From this it seems that the default or automatic level is zoom 2, because if I force zoom=1 the resulting Atari screen is really small.

About SDL: Sorry, I assumed your question was just whether I was using SDL1.2 or SDL 2. The exact version appears to be 'libsdl 1.2.14-6.4ubun'

I don't routinely use any other item of Linux software which takes over the whole screen with a custom resolution and uses the mouse: I'm thinking that maybe if I try installing SCUMMVM, that may use SDL? If you're aware of any simple game or utility which definitely uses SDL to generate fullscreen output and changes the resolution in the same way as Hatari, do please let me know. Obviously, it needs to be something which uses the mouse.

Edit: Just downloaded and installed SCUMMVM. In windowed mode the mouse speed is fine: In fullscreen mode the mouse is much too fast, as it is in Hatari's fullscreen mode. Something wrong with SDL, then, not Hatari? Does SDL have any kind of configurability? Or is it just the way it comes?

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Thu Sep 17, 2015 11:04 pm

OK, this definitely seems to be an SDL problem. I found a workaround in this thread, about excessively high mouse sensitivity in fullscreen apps:

http://ubuntuforums.org/showthread.php?t=1884908

Basically, at the command line and before running Hatari, enter

Code: Select all


export SDL_MOUSE_RELATIVE=0



This apparently tells SDL to disable relative mouse positioning. Quite why this solves the problem I don't know but it does - if I issue the above command and then run Hatari from the command line afterwards, the mouse speed is sensible / usable in both windowed and fullscreen modes.

joska
Hardware Guru
Hardware Guru
Posts: 3550
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Mouse overspeed in full screen modes on netbook

Postby joska » Fri Sep 18, 2015 11:25 am

Good tip! I have the same problem with Hatari 1.80 on a laptop running Lubuntu, setting this env variable fixed it.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Fri Sep 18, 2015 4:55 pm

I can't take any credit for the method, just found it in (as it turns out) one of many threads where people have been saying that their touchpad, (not mouse), speed, is too fast in fullscreen apps using SDL.

It appears that this SDL / Fullscreen 'mouse cursor too fast' problem actually only occurs on touchpads, with one person in the forum I referenced earlier noting that if you plug in a USB mouse, the mouse speed becomes normal not only on the mouse, but on the touchpad as well.

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

Re: Mouse overspeed in full screen modes on netbook

Postby Eero Tamminen » Fri Sep 18, 2015 8:27 pm

I noticed couple of other mouse related SDL environment variables listed here:
https://www.libsdl.org/release/SDL-1.2. ... vvars.html

Out of curiosity, do SDL_VIDEO_X11_DGAMOUSE and SDL_VIDEO_X11_MOUSEACCEL environment variables have any effect on this issue?

And is there no SDL bug about the touchscreen issue?

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Sat Sep 19, 2015 8:24 am

Eero Tamminen wrote:I noticed couple of other mouse related SDL environment variables listed here:
https://www.libsdl.org/release/SDL-1.2. ... vvars.html

Out of curiosity, do SDL_VIDEO_X11_DGAMOUSE and SDL_VIDEO_X11_MOUSEACCEL environment variables have any effect on this issue?

And is there no SDL bug about the touch[pad] issue?


Thanks for flagging up those other options to play with. I'm away from the Dell at the moment so won't be able to try anything myself until early next week.

Just been looking through Bugzilla, where the SDL Devs seem quite active. There's no prior report of this problem that I can find. The trouble is that when most people see this bug on just one app they will think it's a bug in the app, rather than SDL, so it doesn't get reported to the SDL Devs.

I don't have an account on Bugzilla, but I think any bug report would carry more weight if it came from fellow Devs who know best how to describe the problem?

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

Re: Mouse overspeed in full screen modes on netbook

Postby Eero Tamminen » Sat Sep 19, 2015 6:26 pm

Bugs are best reported by somebody who can reproduce them. It's nice to have also somebody who is able test patches that may fix the issue, but that's secondary.

Before reporting the bug, it might be best to try libSDL v2 first, to see whether the bug happens with that too.

Distro I'm using is too old to have libSDL v2, but looking at packages.debian.org, e.g. following things already use libSDL v2 in Debian stable:
- Stella, Atari 2600 emulator: https://packages.debian.org/jessie/stella
- Mupen64 N64 emulator: https://packages.debian.org/jessie/mupe ... ui-console
- Performous karaoke game: https://packages.debian.org/jessie/games/performous

And e.g. some additional ones in Debian testing:
- Kodi, Open Source Home Theatre: https://packages.debian.org/stretch/kodi-bin
- Supertux, 2D jump 'n run sidescroller: https://packages.debian.org/stretch/supertux
- Ioquake3, game engine for Quake 3 based games: https://packages.debian.org/stretch/ioquake3

Looking at packages.ubuntu.org, Trusty (14.04 LTS) already contains libSDL v2, but except for following programs, you'll need newer Ubuntu version to have programs actually using libSDL v2:
- Mupen64
- Yamagi Quake II client: http://packages.ubuntu.com/trusty/games/yamagi-quake2
- MPV video player: http://packages.ubuntu.com/trusty/video/mpv

(I'm not sure what one would need to do with Mupen or MPV to get them to use libSDL as their backend though.)

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Sat Sep 19, 2015 7:50 pm

Eero, as mentioned early in the thread my Distro is a 'spin' of a relatively old version of Ubuntu, 12.04 LTS, so I'm not sure I can test SDL 2 at all. If there's anyone already running Hatari compiled for SDL2 on a laptop/netbook with a touchpad, maybe they can let us know if the problem is present with that combination.

I take your point about bugs best being reported by those who are able to see them (and see if any fixes have been successful). I'll try it and see what happens.

In the meantime, at least we have the 'environment variable' workaround.

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Fri Dec 02, 2016 7:02 pm

Just a quick update - this is still an issue under Hatari 2.0.0 (Linux) but as before, it is an SDL (1.2?) issue rather than a Hatari issue.

If your touchpad cursor is way way too fast in Hatari fullscreen mode, just use the 'fix' outlined above, namely, execute the line

Code: Select all

export SDL_MOUSE_RELATIVE=0


...In the terminal before running Hatari.

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

Re: Mouse overspeed in full screen modes on netbook

Postby Eero Tamminen » Sun Dec 04, 2016 2:02 pm

Are you able to test libSDL 2.x build of Hatari, to check whether the issue is present also in newer SDL versions?

(If yes, please report it to upstream SDL bug tracker.)

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Mon Dec 05, 2016 1:39 am

Sorry, not on any Linux I have here (I run Linux on old machines, so I run fairly old 32-bit pre-SDL 2.x versions of Linux on them).

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Mon Dec 05, 2016 7:31 pm

Well, I gave it a try - downloaded the source for SDL 2.0.5 from libsdl.org and compiled it in the usual way

./configure
make
sudo make install

That process (compilation of SDL 2) appeared to go OK.

I then recompiled Hatari V2.0.0 (already working with SDL 1.2) for SDL 2 with the --enable-sdl2 switch - that process also appeared to go OK from beginning to end. At the beginning of the compilation process I noticed an output line saying 'Using SDL 2.0.5', which I took to mean that the installation of SDL 2 had gone OK, since it was found during the Hatari compilation process.

Only when I actually tried to run the newly compiled hatari did I find I had a problem.

Code: Select all

~/hatari_V2/hatari$ hatari

hatari: error while loading shared libraries: libSDL2-2.0.so.0: Cannot open shared object file: No such file or directory



I'm afraid I have no idea what this means: I don't know at which stage of the process this file failed to be created.

The Linux Distro is 32-bit Zorin OS 6, a 'spin' of Ubuntu 12.04.

I don't know if this distro is just too old to expect SDL2 to be able to work with it, although the compilation of SDL2 did manage to get all the way through without halting.

Hatari works very nicely on this same distro when compiled for the default SDL 1.2, except for the 'touchpad cursor too fast in fullscreen mode' problem which is the subject of this thread.

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

Re: Mouse overspeed in full screen modes on netbook

Postby Eero Tamminen » Tue Dec 06, 2016 6:56 pm

You probably just need to run ldconfig (as root) so that your run-time (dynamic) linker knows about the new libs.

Alternatively you could run Hatari command prefixed with:

Code: Select all

  LD_LIBRARY_PATH=<path


Where you replace <path> with the path where your new SDL v2 is installed. It tells dynamic linker to look first into that path when searching for libraries.

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Tue Dec 06, 2016 7:34 pm

Eero Tamminen wrote:You probably just need to run ldconfig (as root) so that your run-time (dynamic) linker knows about the new libs.


Yes, that was the missing final touch, thank you.

Code: Select all

sudo ldconfig


All working now on Zorin OS 6 (Ubuntu 12.04) with SDL2. SDL2 wasn't available in that distro's repos so I obtained the source directly from libsdl.org and compiled it, as stated earlier.

So the answer to your earlier question, now, about the touchpad overspeed problem being present in fullscreen mode with SDL2? - no, that problem is not present in SDL2. The touchpad cursor speed is sensible in windowed mode as it always was, and now in fullscreen mode as well.

I think for my next step I will download and compile the most recent version of SDL1.2 and recompile Hatari with SDL2 switched off, to see if the touchpad overspeed problem is still present in the final / most recent version of SDL1.2

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Thu Dec 08, 2016 9:40 pm

I tried to do as I had suggested above, download and compile the most recent version of SDL 1.2, which appears to be SDL.1.2.15, which Eero has stated he uses.

Although compilation of SDL 1.2.15 appeared to go OK, as did the subsequent recompilation of Hatari for SDL 1.2, when I fired it up the 'fast cursor in fullscreen mode' problem was still present: But if I exited to the terminal and queried the currently installed SDL versions, the version reported by
dpkg -l *libsdl* was 1.2.14.-6, not 1.2.15

I compiled SDL 1.2.5 using the usual
./configure
make
sudo make install

and then followed that up with

sudo ldconfig

However, the OS does not seem to have adopted the newly compiled version SDL 1.2.15 - instead, it seems to be using the earlier version it already had. I'm reluctant to fully uninstall and then reinstall SDL 1.2 because doing so may break or even remove a lot of software which depends on SDL. Any clue as to how I can force it to adopt the newer version over the old?

I know I've already proved that I can step around this 'fast mouse cursor' problem by going back to SDL2, where the problem is not present. I'm just trying to find out whether it was fixed in a later version of SDL1.2 as well.

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

Re: Mouse overspeed in full screen modes on netbook

Postby Eero Tamminen » Thu Dec 08, 2016 10:31 pm

try:

Code: Select all

LD_CONFIG_PATH=<dir containing your new SDL lib install> ldd ./hatari | grep SDL


If that points to correct SDL library, run Hatari without ldd or grep.

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Fri Dec 09, 2016 12:56 am

Watching the SDL 1.2 compilation process again , it seems to say that it is putting the libraries in /usr/local/lib

The result of the LDD | GREP was just a single line

Code: Select all

libSDL-1.2.so.0 => /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 (0xb764c000)


By itself, this doesn't seem to tell us which specific version of SDL 1.2 is being used, and it looks as though it is using the library from a different path?

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

Re: Mouse overspeed in full screen modes on netbook

Postby Eero Tamminen » Fri Dec 09, 2016 7:48 pm

Yes, it seems to point to your system library, not what you installed. Which is strange, because /usr/local/lib should already be in dynamic linker search path.

I had a typo in my command, try:

Code: Select all

LD_LIBRARY_PATH=/usr/local/lib ldd ./hatari | grep SDL


If that still points to older SDL library, you could try re-building Hatari. Maybe CMake added to it exact version dependency to your system SDL library, so that dynamic linker doesn't accept newer version...

siriushardware
Captain Atari
Captain Atari
Posts: 342
Joined: Thu Aug 21, 2014 7:55 pm
Location: UK

Re: Mouse overspeed in full screen modes on netbook

Postby siriushardware » Thu Jan 12, 2017 10:31 pm

Eero, sorry, I didn't see this until now.

Even with your corrected advice and then recompiling Hatari afterwards I couldn't get my Distro or Hatari to adopt the compiled version of SDL1.2, it kept insisting on picking up on the version in this path:

Code: Select all

libSDL-1.2.so.0 => /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 (0xb764c000)


Unfortunately my Linux knowledge is minimal, the main reason I run it is to run the Linux version of Hatari which has very good, working support for MIDI whereas the Windows version does not, as far as I know.

Although SDL2 isn't in the repos of my rather old Linux distro I found that if I downloaded the source for SDL2 from libsdl.org and compiled it, Hatari found it (when complied for SDL2) and worked well with it - and with SDL2 the touchpad cursor overspeed problem which is the subject of this thread is fixed.

Anyone sticking with SDL1.2 can still just pre-set the environment value in the terminal just before running Hatari from the terminal. This also fixes the problem, but then you have run this every time you start the machine and go into Hatari.

Code: Select all

export SDL_MOUSE_RELATIVE=0
hatari


Regular Linux users will probably know how to make a batch file called 'hatari' which will automatically run the environment variable command and then launch Hatari itself, but that is beyond the scope of my knowledge.


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 2 guests