Macbook synchronization failure, Kb issues, GetChar issues

Hi,

I've been writing some scripts for PTB3 to use across several
platforms (intel mac using OS X, Win2000, Win XP), and I'm getting up
to speed fairly well. And I'm thrilled to ditch OS9 finally! But I
have run into a handful of issues:

1. On my MacBook (regular, not MacBook Pro), the screen test
routinely fails. I understand the onboard graphics card is pretty
weak for this computer, but is it bad enough that the PTB Screen
can't work without skipping the sync test?

2. Kb commands don't accept any input on my Mac when a USB input
device is connected. That is, when a keyboard or mouse are connected,
even the laptop's built-in keyboard is not recognized. Note that this
only applies to Kb commands, as Char commands (e.g., GetChar) still
works fine. Is this an issue with PsychHID?

3. For windows, I've been having some trouble with the char functions
(GetChar, ListenChar). I've seen this on 3 separate machines (two
using XP, one using 2000). Problems that occur are idiosyncratic to
each machine, though. For instance, on one machine, after calling
GetChar or ListenChar, the Windows menubar becomes visible on the
bottom of the screen. On another machine, the Flip command stops
working normally; that is, when I specify the [dontclear] parameter as
1, the setting is ignored and the Flip command behaves as if I had
specified "2" (i.e., the backbuffer simply exchanges with the front
buffer). To trigger this, I just need to add a Char command anywhere
before a Flip command.

Any thoughts/comments would be greatly appreciated. And thanks for
all your work on PTB3!

Andy Leber
Hi Mario (and other PTB readers),

Thanks so much for the previous replies. I'm making progress on the
other issues, and here's a summary with a few questions/comments.

1. Synchronization failure on Macbook: resolved (I should have used
some common sense on this one!)

2. Failure of Kb commands on my Macbook when USB keyboard/mouse is
attached: I thought the problem went away after upgrading MATLAB to
r2007b, but it worked its way back into my life... As Mario
recommended, I'll paste below the full output from
devices=PsychHID('Devices') when the keyboard is attached. Nothing
seems abnormal from what I can tell (though that doesn't mean much!).

3. Char commands not working on PCs: I'm running XP with r2007b and
the latest updated version of PTB, as of last week. I just found out,
though, that Char commands have always had problems with the Java
virtual machine on Windows, i.e., since PTB2 times. As a Mac user, I
was totally unaware of this until yesterday when I went to install PTB
2.54 on a windows machine. I found this on the download page
(http://psychtoolbox.org/PTB-2/download.html):

"Nojvm" mode is required for GetChar because the Java Virtual Machine
(JVM) compoenent of MATLAB blocks keyboard input to the Psychtoolbox
functions GetChar and CharAvail.

Is it the case that -nojvm is still required in PTB3 to use the Char
commands?

Thanks!

Andy

---------- Output for PsychHID devices -----------------------

Device(1)

usagePageValue: 12
usageValue: 1
usageName: 'Consumer Usage 0x1'
index: 1
transport: 'USB'
vendorID: 1452
productID: 33344
version: 272
manufacturer: 'Apple Computer, Inc.'
product: 'Apple IR'
serialNumber: ''
locationID: 1.5624e+09
totalElements: 21
features: 0
inputs: 20
outputs: 0
collections: 1
axes: 0
buttons: 0
hats: 0
sliders: 0
dials: 0
wheels: 0

Device(2)

usagePageValue: 1
usageValue: 128
usageName: 'System Control'
index: 2
transport: 'USB'
vendorID: 2689
productID: 257
version: 272
manufacturer: 'CHESEN'
product: 'USB Keyboard'
serialNumber: ''
locationID: 1.0245e+09
totalElements: 29
features: 0
inputs: 27
outputs: 0
collections: 2
axes: 0
buttons: 0
hats: 0
sliders: 0
dials: 0
wheels: 0

Device(3)

usagePageValue: 1
usageValue: 6
usageName: 'Keyboard'
index: 3
transport: 'USB'
vendorID: 2689
productID: 257
version: 272
manufacturer: 'CHESEN'
product: 'USB Keyboard'
serialNumber: ''
locationID: 1.0245e+09
totalElements: 276
features: 0
inputs: 270
outputs: 5
collections: 1
axes: 0
buttons: 0
hats: 0
sliders: 0
dials: 0
wheels: 0


Device(4)

usagePageValue: 12
usageValue: 1
usageName: 'Consumer Usage 0x1'
index: 4
transport: 'USB'
vendorID: 1452
productID: 538
version: 19
manufacturer: 'Apple Computer'
product: 'Apple Internal Keyboard / Trackpad'
serialNumber: ''
locationID: 488636416
totalElements: 2
features: 0
inputs: 1
outputs: 0
collections: 1
axes: 0
buttons: 0
hats: 0
sliders: 0
dials: 0
wheels: 0


Device(5)

usagePageValue: 1
usageValue: 2
usageName: 'Mouse'
index: 5
transport: 'USB'
vendorID: 1452
productID: 538
version: 0
manufacturer: 'Apple Computer'
product: 'Apple Internal Keyboard / Trackpad'
serialNumber: '0'
locationID: 488636416
totalElements: 6
features: 0
inputs: 4
outputs: 0
collections: 2
axes: 2
buttons: 1
hats: 0
sliders: 0
dials: 0
wheels: 1

Device(6)

usagePageValue: 255
usageValue: 1
usageName: 'Page: 0xff, Usage: 0x1'
index: 6
transport: 'USB'
vendorID: 1452
productID: 538
version: 0
manufacturer: 'Apple'
product: 'Trackpad'
serialNumber: ''
locationID: 488636416
totalElements: 20
features: 17
inputs: 2
outputs: 0
collections: 1
axes: 0
buttons: 0
hats: 0
sliders: 0
dials: 0
wheels: 0

Device(7)

usagePageValue: 1
usageValue: 2
usageName: 'Mouse'
index: 7
transport: 'USB'
vendorID: 1452
productID: 538
version: 0
manufacturer: 'Apple'
product: 'Trackpad'
serialNumber: ''
locationID: 488636416
totalElements: 27
features: 17
inputs: 7
outputs: 0
collections: 3
axes: 2
buttons: 3
hats: 0
sliders: 0
dials: 0
wheels: 0

Device(8)

usagePageValue: 1
usageValue: 6
usageName: 'Keyboard'
index: 8
transport: 'USB'
vendorID: 1452
productID: 538
version: 19
manufacturer: 'Apple Computer'
product: 'Apple Internal Keyboard / Trackpad'
serialNumber: ''
locationID: 488636416
totalElements: 244
features: 0
inputs: 238
outputs: 5
collections: 1
axes: 0
buttons: 0
hats: 0
sliders: 0
dials: 0
wheels: 0

--------------- end output -----------------------------------



--- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
<mario.kleiner@...> wrote:
>
> Reg. Sync failures: If you open your window by providing a
> rect parameter of e.g., [0 0 640 480], so it only covers part
> of the screen, yes, you may get more sync failures and a
> generally unusable timing for real work. This mode is ok
> for debugging your script etc., but not for timing tests or
> real data collection. The OS/X Quartz window manager
> interferes with presentation timing and timestamping in
> windowed mode, and probably even more so on a weak
> GMA-950. But even with high-end graphics you wouldn't
> get good enough timing. Just use the 'SkipSyncTests' setting
> during development/debugging of your script and remove
> it for real data collection.
>
> -mario
>
> --- In psychtoolbox@yahoogroups.com, "andyleb" <andyleb@> wrote:
> >
> > Hi Mario,
> >
> > Thanks so much for replying. At the time I posted, I was running
> > PTB3's *very* latest beta, with matlab2006a (7.4). Since then, I've
> > upgraded to matlab2006b (7.5) and reinstalled PTB3-beta. I also
> > updated to the most recent version of quicktime.
> >
> > 1. Sync failures. I realized that it's much more likely to occur
> > when my main window is smaller than the full size of my display (e.g.,
> > 640x480 in a 1280x800 screen). Did I wrongly assume we can open small
> > windows in OS X without syncing trouble? The output is pasted into
> > this message (please scroll down).
> >
> > 2. USB device trouble. Since upgrading, I haven't had this problem
> > at all. Maybe I just had a buggy install of matlab 2006a?
> >
> > 3. I'm still looking into the Char problems on the various windows
> > machines, based on your recommendations. I'll post on those
> > separately. I'd also like to hear if anyone else has experienced
> > these problems.
> >
> > Thanks so much for your help!!
> >
> > Andy
> >
> >
> >
> > -------- SYNC FAILURE OUTPUT --------------------------------------
> >
> > PTB-INFO: This is the OpenGL-Psychtoolbox version 3.0.8. Type
> > 'PsychtoolboxVersion' for more detailed version information.
> > PTB-INFO: Psychtoolbox is licensed to you under terms of the GNU
> > General Public License (GPL). See file 'License.txt' in the
> > PTB-INFO: Psychtoolbox root folder for a copy of the GPL license.
> >
> >
> >
> > OpenGL-Extensions are: GL_ARB_transpose_matrix GL_ARB_vertex_program
> > GL_ARB_vertex_blend GL_ARB_window_pos GL_ARB_shader_objects
> > GL_ARB_vertex_shader GL_EXT_multi_draw_arrays GL_EXT_clip_volume_hint
> > GL_EXT_rescale_normal GL_EXT_draw_range_elements GL_EXT_fog_coord
> > GL_EXT_gpu_program_parameters GL_APPLE_client_storage
> > GL_APPLE_specular_vector GL_APPLE_transform_hint
> > GL_APPLE_packed_pixels GL_APPLE_fence GL_APPLE_vertex_array_object
> > GL_APPLE_vertex_program_evaluators GL_APPLE_element_array
> > GL_APPLE_flush_render GL_NV_texgen_reflection GL_NV_light_max_exponent
> > GL_IBM_rasterpos_clip GL_SGIS_generate_mipmap
> > GL_ARB_shading_language_100 GL_ARB_texture_border_clamp
> > GL_ARB_multitexture GL_ARB_texture_env_add GL_ARB_texture_cube_map
> > GL_ARB_texture_env_dot3 GL_ARB_texture_env_combine
> > GL_ARB_texture_compression GL_ARB_texture_mirrored_repeat
> > GL_ARB_shadow GL_ARB_depth_texture GL_ARB_fragment_program
> > GL_ARB_fragment_shader GL_ARB_point_sprite
> > GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object
> > GL_ARB_pixel_buffer_object GL_EXT_framebuffer_object
> > GL_EXT_texture_rectangle GL_ARB_texture_rectangle
> > GL_EXT_texture_env_add GL_EXT_blend_color GL_EXT_blend_minmax
> > GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr GL_EXT_bgra
> > GL_EXT_stencil_wrap GL_EXT_texture_filter_anisotropic
> > GL_EXT_separate_specular_color GL_EXT_secondary_color
> > GL_EXT_blend_func_separate GL_EXT_shadow_funcs GL_EXT_stencil_two_side
> > GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1
> > GL_EXT_blend_equation_separate GL_EXT_packed_depth_stencil
> > GL_APPLE_flush_buffer_range GL_APPLE_ycbcr_422 GL_APPLE_texture_range
> > GL_APPLE_pixel_buffer GL_NV_blend_square GL_ATI_texture_env_combine3
> > GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod
> >
> >
> >
> > PTB-INFO: OpenGL-Renderer is Intel Inc. :: Intel GMA 950 OpenGL Engine
> > :: 1.2 APPLE-1.4.56
> > PTB-INFO: Renderer has 64 MB of VRAM and a maximum 64 MB of texture
> > memory.
> > PTB-Info: VBL startline = 800 , VBL Endline = -1
> > PTB-Info: Beamposition queries unsupported on this system. Will try to
> > use kernel-level vbl interrupts as fallback.
> > PTB-Info: Measured monitor refresh interval from VBLsync = 17.356896
> > ms [57.613989 Hz]. (57 valid samples taken, stddev=3.102240 ms.)
> > PTB-Info: Small deviations between reported values are normal and no
> > reason to worry.
> > PTB-INFO: Using OpenGL GL_TEXTURE_RECTANGLE_EXT extension for
> > efficient high-performance texture mapping...
> >
> > WARNING: Couldn't compute a reliable estimate of monitor refresh
> > interval! Trouble with VBL syncing?!?
> >
> >
> > ----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! ----
> >
> > One or more internal checks (see Warnings above) indicate that
> > synchronization
> > of Psychtoolbox to the vertical retrace (VBL) is not working on your
> > setup.
> >
> > This will seriously impair proper stimulus presentation and stimulus
> > presentation timing!
> > Please read 'help SyncTrouble' for information about how to solve or
> > work-around the problem.
> > You can force Psychtoolbox to continue, despite the severe problems,
> > by adding the command
> > Screen('Preference', 'SkipSyncTests',1); at the top of your script, if
> > you really know what you are doing.
> >
> >
> > -------- END OUTPUT --------------------------------------
> >
> >
> >
> >
> > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
> > <mario.kleiner@> wrote:
> > >
> > > --- In psychtoolbox@yahoogroups.com, "andyleb" <andyleb@> wrote:
> > >
> > > > 1. On my MacBook (regular, not MacBook Pro), the screen test
> > > > routinely fails. I understand the onboard graphics card is pretty
> > > > weak for this computer, but is it bad enough that the PTB Screen
> > > > can't work without skipping the sync test?
> > >
> > > Strange, worked on MacBook/IntelGMA when i tested it last time.
> > > Provide PTB's Matlab output of the failure. I assume you run the
> > > *very latest* 'beta'?
> > >
> > > You can always either completely skip the test or tell PTB to go
> > > on in case of failure, you'll just lose our normally super-exact
> > > timing if you do so -- or something else screws up if there was
> > > a good severe reason for the sync-failure of course and not
> > > only a noisy system.
> > >
> > > See: <http://psychtoolbox.org/wikka.php?wakka=FaqWarningPrefs>
> > >
> > > or simply the help texts that PTB outputs in case of failure. I
assume
> > > you read them?
> > >
> > > >
> > > > 2. Kb commands don't accept any input on my Mac when a USB input
> > > > device is connected. That is, when a keyboard or mouse are
connected,
> > > > even the laptop's built-in keyboard is not recognized. Note
that this
> > > > only applies to Kb commands, as Char commands (e.g., GetChar)
still
> > > > works fine. Is this an issue with PsychHID?
> > >
> > > Also strange. I work all the time with a USB mouse connected and
> > > we never heard of or experienced an issue like that.
> > >
> > > What is the output of "GetKeyboardIndices" in that case? What does
> > > d=PsychHID('GetDevices') report? I mean of course the full content
> > > of 'd' d(1), d(2), ....
> > >
> > > >
> > > > 3. For windows, I've been having some trouble with the char
functions
> > > > (GetChar, ListenChar). I've seen this on 3 separate machines (two
> > > > using XP, one using 2000). Problems that occur are
idiosyncratic to
> > > > each machine, though. For instance, on one machine, after calling
> > > > GetChar or ListenChar, the Windows menubar becomes visible on the
> > > > bottom of the screen. On another machine, the Flip command stops
> > > > working normally; that is, when I specify the [dontclear]
parameter as
> > > > 1, the setting is ignored and the Flip command behaves as if I had
> > > > specified "2" (i.e., the backbuffer simply exchanges with the
front
> > > > buffer). To trigger this, I just need to add a Char command
anywhere
> > > > before a Flip command.
> > >
> > > Anybody else ever seen this? Which Matlab version is this? What
> > > graphics card? Up to date drivers installed?
> > >
> > > There is no direct connection between 'Flip' and GetChar etc. but
> > > you never know how Java's GetChar handling interacts with Matlabs
> > > desktop UI and that with desktop manager gimmicks of the
> > > graphics driver -- Windows is a mess.
> > >
> > > But the 'dontclear' setting 1 doesn't work on many Windows graphics
> > > cards due to lack of features in the graphics drivers. If you have
> > > recent graphics hardware and need that feature, then its
> > > a good idea to enable the imaging pipeline by setting the
> > > optional 'imagingMode' flag of Screen('OpenWindow', ...) to
> > > kPsychNeedFastBackingStore.
> > >
> > > best,
> > > -mario
> > >
> >
>
Hi Mario -

I am having the same problem as Andy, and after going through all of the suggested fixes
in this thread, am having no luck. I'm on an Intel Mac Tower running 10.4.10, and Matlab
7.5 (2007b), and have the same trouble with 7.4. I've restarted the machine & Matlab
many times, reinstalled toobox, and have switched keyboards and usb slots. Control-C
works fine but I can't get KbCheck to register any other keys.

The same code/debugging reveals no problems at all on a macmini in my lab - everything
works great there yet it's the same OS & Matlab version. Is there something different
about my Tower's hardware? I've pasted a sample debug session below, and any help
would be greatly appreciated!

-Steve
PS: after asking some friends using toolbox, some report a similar problem but for a
restart clears it for them.


>> KbDemo
1 of 4. Testing KbCheck and KbName: press a key to see its number.
Press the escape key to proceed to the next demo.
d
s
sdlkdk
[pressed control-c]
??? Operation terminated by user during ==> KbCheck at 108

In ==> KbDemo>KbDemoPart1 at 100
[ keyIsDown, seconds, keyCode ] = KbCheck;

In ==> KbDemo at 74
KbDemoPart1;

>> WaitSecs(.2); KbWait
d
d
d
d

[pressed control-c]
??? Operation terminated by user during ==> KbWait at 58


>> d=PsychHID('Devices')

d =

1x2 struct array with fields:
usagePageValue
usageValue
usageName
index
transport
vendorID
productID
version
manufacturer
product
serialNumber
locationID
totalElements
features
inputs
outputs
collections
axes
buttons
hats
sliders
dials
wheels

>> d(1)

ans =

usagePageValue: 1
usageValue: 2
usageName: 'Mouse'
index: 1
transport: 'USB'
vendorID: 1452
productID: 772
version: 272
manufacturer: 'Mitsumi Electric'
product: 'Apple Optical USB Mouse'
serialNumber: ''
locationID: 488767488
totalElements: 11
features: 0
inputs: 9
outputs: 0
collections: 2
axes: 3
buttons: 4
hats: 0
sliders: 0
dials: 0
wheels: 1

>> d(2)

ans =

usagePageValue: 1
usageValue: 6
usageName: 'Keyboard'
index: 2
transport: 'USB'
vendorID: 1452
productID: 513
version: 257
manufacturer: 'Alps Electric'
product: 'M2452'
serialNumber: ''
locationID: 488701952
totalElements: 274
features: 0
inputs: 270
outputs: 3
collections: 1
axes: 0
buttons: 0
hats: 0
sliders: 0
dials: 0
wheels: 0

>> GetKeyboardIndices

ans =

2

>> KbCheck(2)

ans =

0

Finally, if I put the above KbCheck(2) into a hand-coded KbWait, it never registers
anything.





--- In psychtoolbox@yahoogroups.com, "Mario Kleiner" <mario.kleiner@...> wrote:
>
> > 2. Failure of Kb commands on my Macbook when USB keyboard/mouse is
> > attached: I thought the problem went away after upgrading MATLAB to
> > r2007b, but it worked its way back into my life... As Mario
> > recommended, I'll paste below the full output from
> > devices=PsychHID('Devices') when the keyboard is attached. Nothing
> > seems abnormal from what I can tell (though that doesn't mean much!).
>
> What is the output of GetKeyboardIndices? If that lists the id's of your
> two keyboards (built-in and external) and KbCheck doesn't throw
> any errors when you use it, then the keyboards should get detected.
>
> If you pass the index to KbCheck, e.g.,
>
> KbCheck(3) for your USB kb or KbCheck(8) for your internal keyboard,
> then at least query of the internal keyboard should work. By default
> KbCheck will query the first keyboard (lowest index) it finds in your
> system if you don't ask for a specific one - in this case the external
> USB one, because 3 < 8.
>
> Did you try all keys of the keyboard to see if some of them
> get detected? Are there any special keys or switches on your kb?
>
> KbCheck only queries the keys with usb scancodes between 1 and
> 255. It's a bit suspicious to me that your USB kb seems to have
> more than 255 keys.
>
> Did you try with different USB keyboards?
>
> >
> > 3. Char commands not working on PCs: I'm running XP with r2007b and
> > the latest updated version of PTB, as of last week. I just found out,
> > though, that Char commands have always had problems with the Java
> > virtual machine on Windows, i.e., since PTB2 times. As a Mac user, I
> > was totally unaware of this until yesterday when I went to install PTB
> > 2.54 on a windows machine. I found this on the download page
> > (http://psychtoolbox.org/PTB-2/download.html):
>
> For Matlab R2007a and R2007b its the opposite, it wouldn't work with
> -nojvm mode at the moment, because that .dll's are not yet ported
> over. The Java based GetChar should work -- at least it does on
> my R2007a + XP setup.
>
> I don't have 2007b on Windows, but you never know what
> kind of new GetChar trouble Mathworks likes to introduce with
> each new Matlab release. In general, GetChar is the most fragile
> part of PTB, because it has to rely on Matlabs Java implementation,
> which is in my experience the most prominent reason for Matlab
> crashes/out of memory conditions/all kind of other trouble.
> Matlabs interaction with the event queue is a complete black box
> for us, not much we can do about that -- except finding new
> weird workarounds for the weird trouble introduced with new
> releases of Matlab. --> Avoid GetChar if you can.
>
> -mario
>
> >
> > "Nojvm" mode is required for GetChar because the Java Virtual Machine
> > (JVM) compoenent of MATLAB blocks keyboard input to the Psychtoolbox
> > functions GetChar and CharAvail.
> >
> > Is it the case that -nojvm is still required in PTB3 to use the Char
> > commands?
> >
> > Thanks!
> >
> > Andy
> >
> > ---------- Output for PsychHID devices -----------------------
> >
> > Device(1)
> >
> > usagePageValue: 12
> > usageValue: 1
> > usageName: 'Consumer Usage 0x1'
> > index: 1
> > transport: 'USB'
> > vendorID: 1452
> > productID: 33344
> > version: 272
> > manufacturer: 'Apple Computer, Inc.'
> > product: 'Apple IR'
> > serialNumber: ''
> > locationID: 1.5624e+09
> > totalElements: 21
> > features: 0
> > inputs: 20
> > outputs: 0
> > collections: 1
> > axes: 0
> > buttons: 0
> > hats: 0
> > sliders: 0
> > dials: 0
> > wheels: 0
> >
> > Device(2)
> >
> > usagePageValue: 1
> > usageValue: 128
> > usageName: 'System Control'
> > index: 2
> > transport: 'USB'
> > vendorID: 2689
> > productID: 257
> > version: 272
> > manufacturer: 'CHESEN'
> > product: 'USB Keyboard'
> > serialNumber: ''
> > locationID: 1.0245e+09
> > totalElements: 29
> > features: 0
> > inputs: 27
> > outputs: 0
> > collections: 2
> > axes: 0
> > buttons: 0
> > hats: 0
> > sliders: 0
> > dials: 0
> > wheels: 0
> >
> > Device(3)
> >
> > usagePageValue: 1
> > usageValue: 6
> > usageName: 'Keyboard'
> > index: 3
> > transport: 'USB'
> > vendorID: 2689
> > productID: 257
> > version: 272
> > manufacturer: 'CHESEN'
> > product: 'USB Keyboard'
> > serialNumber: ''
> > locationID: 1.0245e+09
> > totalElements: 276
> > features: 0
> > inputs: 270
> > outputs: 5
> > collections: 1
> > axes: 0
> > buttons: 0
> > hats: 0
> > sliders: 0
> > dials: 0
> > wheels: 0
> >
> >
> > Device(4)
> >
> > usagePageValue: 12
> > usageValue: 1
> > usageName: 'Consumer Usage 0x1'
> > index: 4
> > transport: 'USB'
> > vendorID: 1452
> > productID: 538
> > version: 19
> > manufacturer: 'Apple Computer'
> > product: 'Apple Internal Keyboard / Trackpad'
> > serialNumber: ''
> > locationID: 488636416
> > totalElements: 2
> > features: 0
> > inputs: 1
> > outputs: 0
> > collections: 1
> > axes: 0
> > buttons: 0
> > hats: 0
> > sliders: 0
> > dials: 0
> > wheels: 0
> >
> >
> > Device(5)
> >
> > usagePageValue: 1
> > usageValue: 2
> > usageName: 'Mouse'
> > index: 5
> > transport: 'USB'
> > vendorID: 1452
> > productID: 538
> > version: 0
> > manufacturer: 'Apple Computer'
> > product: 'Apple Internal Keyboard / Trackpad'
> > serialNumber: '0'
> > locationID: 488636416
> > totalElements: 6
> > features: 0
> > inputs: 4
> > outputs: 0
> > collections: 2
> > axes: 2
> > buttons: 1
> > hats: 0
> > sliders: 0
> > dials: 0
> > wheels: 1
> >
> > Device(6)
> >
> > usagePageValue: 255
> > usageValue: 1
> > usageName: 'Page: 0xff, Usage: 0x1'
> > index: 6
> > transport: 'USB'
> > vendorID: 1452
> > productID: 538
> > version: 0
> > manufacturer: 'Apple'
> > product: 'Trackpad'
> > serialNumber: ''
> > locationID: 488636416
> > totalElements: 20
> > features: 17
> > inputs: 2
> > outputs: 0
> > collections: 1
> > axes: 0
> > buttons: 0
> > hats: 0
> > sliders: 0
> > dials: 0
> > wheels: 0
> >
> > Device(7)
> >
> > usagePageValue: 1
> > usageValue: 2
> > usageName: 'Mouse'
> > index: 7
> > transport: 'USB'
> > vendorID: 1452
> > productID: 538
> > version: 0
> > manufacturer: 'Apple'
> > product: 'Trackpad'
> > serialNumber: ''
> > locationID: 488636416
> > totalElements: 27
> > features: 17
> > inputs: 7
> > outputs: 0
> > collections: 3
> > axes: 2
> > buttons: 3
> > hats: 0
> > sliders: 0
> > dials: 0
> > wheels: 0
> >
> > Device(8)
> >
> > usagePageValue: 1
> > usageValue: 6
> > usageName: 'Keyboard'
> > index: 8
> > transport: 'USB'
> > vendorID: 1452
> > productID: 538
> > version: 19
> > manufacturer: 'Apple Computer'
> > product: 'Apple Internal Keyboard / Trackpad'
> > serialNumber: ''
> > locationID: 488636416
> > totalElements: 244
> > features: 0
> > inputs: 238
> > outputs: 5
> > collections: 1
> > axes: 0
> > buttons: 0
> > hats: 0
> > sliders: 0
> > dials: 0
> > wheels: 0
> >
> > --------------- end output -----------------------------------
> >
> >
> >
> > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
> > <mario.kleiner@> wrote:
> > >
> > > Reg. Sync failures: If you open your window by providing a
> > > rect parameter of e.g., [0 0 640 480], so it only covers part
> > > of the screen, yes, you may get more sync failures and a
> > > generally unusable timing for real work. This mode is ok
> > > for debugging your script etc., but not for timing tests or
> > > real data collection. The OS/X Quartz window manager
> > > interferes with presentation timing and timestamping in
> > > windowed mode, and probably even more so on a weak
> > > GMA-950. But even with high-end graphics you wouldn't
> > > get good enough timing. Just use the 'SkipSyncTests' setting
> > > during development/debugging of your script and remove
> > > it for real data collection.
> > >
> > > -mario
> > >
> > > --- In psychtoolbox@yahoogroups.com, "andyleb" <andyleb@> wrote:
> > > >
> > > > Hi Mario,
> > > >
> > > > Thanks so much for replying. At the time I posted, I was running
> > > > PTB3's *very* latest beta, with matlab2006a (7.4). Since then, I've
> > > > upgraded to matlab2006b (7.5) and reinstalled PTB3-beta. I also
> > > > updated to the most recent version of quicktime.
> > > >
> > > > 1. Sync failures. I realized that it's much more likely to occur
> > > > when my main window is smaller than the full size of my display (e.g.,
> > > > 640x480 in a 1280x800 screen). Did I wrongly assume we can open small
> > > > windows in OS X without syncing trouble? The output is pasted into
> > > > this message (please scroll down).
> > > >
> > > > 2. USB device trouble. Since upgrading, I haven't had this problem
> > > > at all. Maybe I just had a buggy install of matlab 2006a?
> > > >
> > > > 3. I'm still looking into the Char problems on the various windows
> > > > machines, based on your recommendations. I'll post on those
> > > > separately. I'd also like to hear if anyone else has experienced
> > > > these problems.
> > > >
> > > > Thanks so much for your help!!
> > > >
> > > > Andy
> > > >
> > > >
> > > >
> > > > -------- SYNC FAILURE OUTPUT --------------------------------------
> > > >
> > > > PTB-INFO: This is the OpenGL-Psychtoolbox version 3.0.8. Type
> > > > 'PsychtoolboxVersion' for more detailed version information.
> > > > PTB-INFO: Psychtoolbox is licensed to you under terms of the GNU
> > > > General Public License (GPL). See file 'License.txt' in the
> > > > PTB-INFO: Psychtoolbox root folder for a copy of the GPL license.
> > > >
> > > >
> > > >
> > > > OpenGL-Extensions are: GL_ARB_transpose_matrix GL_ARB_vertex_program
> > > > GL_ARB_vertex_blend GL_ARB_window_pos GL_ARB_shader_objects
> > > > GL_ARB_vertex_shader GL_EXT_multi_draw_arrays GL_EXT_clip_volume_hint
> > > > GL_EXT_rescale_normal GL_EXT_draw_range_elements GL_EXT_fog_coord
> > > > GL_EXT_gpu_program_parameters GL_APPLE_client_storage
> > > > GL_APPLE_specular_vector GL_APPLE_transform_hint
> > > > GL_APPLE_packed_pixels GL_APPLE_fence GL_APPLE_vertex_array_object
> > > > GL_APPLE_vertex_program_evaluators GL_APPLE_element_array
> > > > GL_APPLE_flush_render GL_NV_texgen_reflection GL_NV_light_max_exponent
> > > > GL_IBM_rasterpos_clip GL_SGIS_generate_mipmap
> > > > GL_ARB_shading_language_100 GL_ARB_texture_border_clamp
> > > > GL_ARB_multitexture GL_ARB_texture_env_add GL_ARB_texture_cube_map
> > > > GL_ARB_texture_env_dot3 GL_ARB_texture_env_combine
> > > > GL_ARB_texture_compression GL_ARB_texture_mirrored_repeat
> > > > GL_ARB_shadow GL_ARB_depth_texture GL_ARB_fragment_program
> > > > GL_ARB_fragment_shader GL_ARB_point_sprite
> > > > GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object
> > > > GL_ARB_pixel_buffer_object GL_EXT_framebuffer_object
> > > > GL_EXT_texture_rectangle GL_ARB_texture_rectangle
> > > > GL_EXT_texture_env_add GL_EXT_blend_color GL_EXT_blend_minmax
> > > > GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr GL_EXT_bgra
> > > > GL_EXT_stencil_wrap GL_EXT_texture_filter_anisotropic
> > > > GL_EXT_separate_specular_color GL_EXT_secondary_color
> > > > GL_EXT_blend_func_separate GL_EXT_shadow_funcs GL_EXT_stencil_two_side
> > > > GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1
> > > > GL_EXT_blend_equation_separate GL_EXT_packed_depth_stencil
> > > > GL_APPLE_flush_buffer_range GL_APPLE_ycbcr_422 GL_APPLE_texture_range
> > > > GL_APPLE_pixel_buffer GL_NV_blend_square GL_ATI_texture_env_combine3
> > > > GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod
> > > >
> > > >
> > > >
> > > > PTB-INFO: OpenGL-Renderer is Intel Inc. :: Intel GMA 950 OpenGL Engine
> > > > :: 1.2 APPLE-1.4.56
> > > > PTB-INFO: Renderer has 64 MB of VRAM and a maximum 64 MB of texture
> > > > memory.
> > > > PTB-Info: VBL startline = 800 , VBL Endline = -1
> > > > PTB-Info: Beamposition queries unsupported on this system. Will try to
> > > > use kernel-level vbl interrupts as fallback.
> > > > PTB-Info: Measured monitor refresh interval from VBLsync = 17.356896
> > > > ms [57.613989 Hz]. (57 valid samples taken, stddev=3.102240 ms.)
> > > > PTB-Info: Small deviations between reported values are normal and no
> > > > reason to worry.
> > > > PTB-INFO: Using OpenGL GL_TEXTURE_RECTANGLE_EXT extension for
> > > > efficient high-performance texture mapping...
> > > >
> > > > WARNING: Couldn't compute a reliable estimate of monitor refresh
> > > > interval! Trouble with VBL syncing?!?
> > > >
> > > >
> > > > ----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! ----
> > > >
> > > > One or more internal checks (see Warnings above) indicate that
> > > > synchronization
> > > > of Psychtoolbox to the vertical retrace (VBL) is not working on your
> > > > setup.
> > > >
> > > > This will seriously impair proper stimulus presentation and stimulus
> > > > presentation timing!
> > > > Please read 'help SyncTrouble' for information about how to solve or
> > > > work-around the problem.
> > > > You can force Psychtoolbox to continue, despite the severe problems,
> > > > by adding the command
> > > > Screen('Preference', 'SkipSyncTests',1); at the top of your script, if
> > > > you really know what you are doing.
> > > >
> > > >
> > > > -------- END OUTPUT --------------------------------------
> > > >
> > > >
> > > >
> > > >
> > > > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
> > > > <mario.kleiner@> wrote:
> > > > >
> > > > > --- In psychtoolbox@yahoogroups.com, "andyleb" <andyleb@> wrote:
> > > > >
> > > > > > 1. On my MacBook (regular, not MacBook Pro), the screen test
> > > > > > routinely fails. I understand the onboard graphics card is pretty
> > > > > > weak for this computer, but is it bad enough that the PTB Screen
> > > > > > can't work without skipping the sync test?
> > > > >
> > > > > Strange, worked on MacBook/IntelGMA when i tested it last time.
> > > > > Provide PTB's Matlab output of the failure. I assume you run the
> > > > > *very latest* 'beta'?
> > > > >
> > > > > You can always either completely skip the test or tell PTB to go
> > > > > on in case of failure, you'll just lose our normally super-exact
> > > > > timing if you do so -- or something else screws up if there was
> > > > > a good severe reason for the sync-failure of course and not
> > > > > only a noisy system.
> > > > >
> > > > > See: <http://psychtoolbox.org/wikka.php?wakka=FaqWarningPrefs>
> > > > >
> > > > > or simply the help texts that PTB outputs in case of failure. I
> > assume
> > > > > you read them?
> > > > >
> > > > > >
> > > > > > 2. Kb commands don't accept any input on my Mac when a USB input
> > > > > > device is connected. That is, when a keyboard or mouse are
> > connected,
> > > > > > even the laptop's built-in keyboard is not recognized. Note
> > that this
> > > > > > only applies to Kb commands, as Char commands (e.g., GetChar)
> > still
> > > > > > works fine. Is this an issue with PsychHID?
> > > > >
> > > > > Also strange. I work all the time with a USB mouse connected and
> > > > > we never heard of or experienced an issue like that.
> > > > >
> > > > > What is the output of "GetKeyboardIndices" in that case? What does
> > > > > d=PsychHID('GetDevices') report? I mean of course the full content
> > > > > of 'd' d(1), d(2), ....
> > > > >
> > > > > >
> > > > > > 3. For windows, I've been having some trouble with the char
> > functions
> > > > > > (GetChar, ListenChar). I've seen this on 3 separate machines (two
> > > > > > using XP, one using 2000). Problems that occur are
> > idiosyncratic to
> > > > > > each machine, though. For instance, on one machine, after calling
> > > > > > GetChar or ListenChar, the Windows menubar becomes visible on the
> > > > > > bottom of the screen. On another machine, the Flip command stops
> > > > > > working normally; that is, when I specify the [dontclear]
> > parameter as
> > > > > > 1, the setting is ignored and the Flip command behaves as if I had
> > > > > > specified "2" (i.e., the backbuffer simply exchanges with the
> > front
> > > > > > buffer). To trigger this, I just need to add a Char command
> > anywhere
> > > > > > before a Flip command.
> > > > >
> > > > > Anybody else ever seen this? Which Matlab version is this? What
> > > > > graphics card? Up to date drivers installed?
> > > > >
> > > > > There is no direct connection between 'Flip' and GetChar etc. but
> > > > > you never know how Java's GetChar handling interacts with Matlabs
> > > > > desktop UI and that with desktop manager gimmicks of the
> > > > > graphics driver -- Windows is a mess.
> > > > >
> > > > > But the 'dontclear' setting 1 doesn't work on many Windows graphics
> > > > > cards due to lack of features in the graphics drivers. If you have
> > > > > recent graphics hardware and need that feature, then its
> > > > > a good idea to enable the imaging pipeline by setting the
> > > > > optional 'imagingMode' flag of Screen('OpenWindow', ...) to
> > > > > kPsychNeedFastBackingStore.
> > > > >
> > > > > best,
> > > > > -mario
> > > > >
> > > >
> > >
> >
>
What happens if you switch the keyboards of
your macMini and macTower? I'd expect the
keyboards to be different in their behaviour.

Did you try each key on the keyboard to make
sure that none of them has an effect?

if you do this:

el=PsychHID('Elements', GetKeyboardIndices)

what are the values of the following fields in the el array?
usagePageValue
usageValue
usageName

-mario

--- In psychtoolbox@yahoogroups.com, "stevefranconeri" <stevefranconeri@...> wrote:
>
> Hi Mario -
>
> I am having the same problem as Andy, and after going through all of the suggested
fixes
> in this thread, am having no luck. I'm on an Intel Mac Tower running 10.4.10, and
Matlab
> 7.5 (2007b), and have the same trouble with 7.4. I've restarted the machine & Matlab
> many times, reinstalled toobox, and have switched keyboards and usb slots. Control-C
> works fine but I can't get KbCheck to register any other keys.
>
> The same code/debugging reveals no problems at all on a macmini in my lab -
everything
> works great there yet it's the same OS & Matlab version. Is there something different
> about my Tower's hardware? I've pasted a sample debug session below, and any help
> would be greatly appreciated!
>
> -Steve
> PS: after asking some friends using toolbox, some report a similar problem but for a
> restart clears it for them.
>
>
> >> KbDemo
> 1 of 4. Testing KbCheck and KbName: press a key to see its number.
> Press the escape key to proceed to the next demo.
> d
> s
> sdlkdk
> [pressed control-c]
> ??? Operation terminated by user during ==> KbCheck at 108
>
> In ==> KbDemo>KbDemoPart1 at 100
> [ keyIsDown, seconds, keyCode ] = KbCheck;
>
> In ==> KbDemo at 74
> KbDemoPart1;
>
> >> WaitSecs(.2); KbWait
> d
> d
> d
> d
>
> [pressed control-c]
> ??? Operation terminated by user during ==> KbWait at 58
>
>
> >> d=PsychHID('Devices')
>
> d =
>
> 1x2 struct array with fields:
> usagePageValue
> usageValue
> usageName
> index
> transport
> vendorID
> productID
> version
> manufacturer
> product
> serialNumber
> locationID
> totalElements
> features
> inputs
> outputs
> collections
> axes
> buttons
> hats
> sliders
> dials
> wheels
>
> >> d(1)
>
> ans =
>
> usagePageValue: 1
> usageValue: 2
> usageName: 'Mouse'
> index: 1
> transport: 'USB'
> vendorID: 1452
> productID: 772
> version: 272
> manufacturer: 'Mitsumi Electric'
> product: 'Apple Optical USB Mouse'
> serialNumber: ''
> locationID: 488767488
> totalElements: 11
> features: 0
> inputs: 9
> outputs: 0
> collections: 2
> axes: 3
> buttons: 4
> hats: 0
> sliders: 0
> dials: 0
> wheels: 1
>
> >> d(2)
>
> ans =
>
> usagePageValue: 1
> usageValue: 6
> usageName: 'Keyboard'
> index: 2
> transport: 'USB'
> vendorID: 1452
> productID: 513
> version: 257
> manufacturer: 'Alps Electric'
> product: 'M2452'
> serialNumber: ''
> locationID: 488701952
> totalElements: 274
> features: 0
> inputs: 270
> outputs: 3
> collections: 1
> axes: 0
> buttons: 0
> hats: 0
> sliders: 0
> dials: 0
> wheels: 0
>
> >> GetKeyboardIndices
>
> ans =
>
> 2
>
> >> KbCheck(2)
>
> ans =
>
> 0
>
> Finally, if I put the above KbCheck(2) into a hand-coded KbWait, it never registers
> anything.
>
>
>
>
>
> --- In psychtoolbox@yahoogroups.com, "Mario Kleiner" <mario.kleiner@> wrote:
> >
> > > 2. Failure of Kb commands on my Macbook when USB keyboard/mouse is
> > > attached: I thought the problem went away after upgrading MATLAB to
> > > r2007b, but it worked its way back into my life... As Mario
> > > recommended, I'll paste below the full output from
> > > devices=PsychHID('Devices') when the keyboard is attached. Nothing
> > > seems abnormal from what I can tell (though that doesn't mean much!).
> >
> > What is the output of GetKeyboardIndices? If that lists the id's of your
> > two keyboards (built-in and external) and KbCheck doesn't throw
> > any errors when you use it, then the keyboards should get detected.
> >
> > If you pass the index to KbCheck, e.g.,
> >
> > KbCheck(3) for your USB kb or KbCheck(8) for your internal keyboard,
> > then at least query of the internal keyboard should work. By default
> > KbCheck will query the first keyboard (lowest index) it finds in your
> > system if you don't ask for a specific one - in this case the external
> > USB one, because 3 < 8.
> >
> > Did you try all keys of the keyboard to see if some of them
> > get detected? Are there any special keys or switches on your kb?
> >
> > KbCheck only queries the keys with usb scancodes between 1 and
> > 255. It's a bit suspicious to me that your USB kb seems to have
> > more than 255 keys.
> >
> > Did you try with different USB keyboards?
> >
> > >
> > > 3. Char commands not working on PCs: I'm running XP with r2007b and
> > > the latest updated version of PTB, as of last week. I just found out,
> > > though, that Char commands have always had problems with the Java
> > > virtual machine on Windows, i.e., since PTB2 times. As a Mac user, I
> > > was totally unaware of this until yesterday when I went to install PTB
> > > 2.54 on a windows machine. I found this on the download page
> > > (http://psychtoolbox.org/PTB-2/download.html):
> >
> > For Matlab R2007a and R2007b its the opposite, it wouldn't work with
> > -nojvm mode at the moment, because that .dll's are not yet ported
> > over. The Java based GetChar should work -- at least it does on
> > my R2007a + XP setup.
> >
> > I don't have 2007b on Windows, but you never know what
> > kind of new GetChar trouble Mathworks likes to introduce with
> > each new Matlab release. In general, GetChar is the most fragile
> > part of PTB, because it has to rely on Matlabs Java implementation,
> > which is in my experience the most prominent reason for Matlab
> > crashes/out of memory conditions/all kind of other trouble.
> > Matlabs interaction with the event queue is a complete black box
> > for us, not much we can do about that -- except finding new
> > weird workarounds for the weird trouble introduced with new
> > releases of Matlab. --> Avoid GetChar if you can.
> >
> > -mario
> >
> > >
> > > "Nojvm" mode is required for GetChar because the Java Virtual Machine
> > > (JVM) compoenent of MATLAB blocks keyboard input to the Psychtoolbox
> > > functions GetChar and CharAvail.
> > >
> > > Is it the case that -nojvm is still required in PTB3 to use the Char
> > > commands?
> > >
> > > Thanks!
> > >
> > > Andy
> > >
> > > ---------- Output for PsychHID devices -----------------------
> > >
> > > Device(1)
> > >
> > > usagePageValue: 12
> > > usageValue: 1
> > > usageName: 'Consumer Usage 0x1'
> > > index: 1
> > > transport: 'USB'
> > > vendorID: 1452
> > > productID: 33344
> > > version: 272
> > > manufacturer: 'Apple Computer, Inc.'
> > > product: 'Apple IR'
> > > serialNumber: ''
> > > locationID: 1.5624e+09
> > > totalElements: 21
> > > features: 0
> > > inputs: 20
> > > outputs: 0
> > > collections: 1
> > > axes: 0
> > > buttons: 0
> > > hats: 0
> > > sliders: 0
> > > dials: 0
> > > wheels: 0
> > >
> > > Device(2)
> > >
> > > usagePageValue: 1
> > > usageValue: 128
> > > usageName: 'System Control'
> > > index: 2
> > > transport: 'USB'
> > > vendorID: 2689
> > > productID: 257
> > > version: 272
> > > manufacturer: 'CHESEN'
> > > product: 'USB Keyboard'
> > > serialNumber: ''
> > > locationID: 1.0245e+09
> > > totalElements: 29
> > > features: 0
> > > inputs: 27
> > > outputs: 0
> > > collections: 2
> > > axes: 0
> > > buttons: 0
> > > hats: 0
> > > sliders: 0
> > > dials: 0
> > > wheels: 0
> > >
> > > Device(3)
> > >
> > > usagePageValue: 1
> > > usageValue: 6
> > > usageName: 'Keyboard'
> > > index: 3
> > > transport: 'USB'
> > > vendorID: 2689
> > > productID: 257
> > > version: 272
> > > manufacturer: 'CHESEN'
> > > product: 'USB Keyboard'
> > > serialNumber: ''
> > > locationID: 1.0245e+09
> > > totalElements: 276
> > > features: 0
> > > inputs: 270
> > > outputs: 5
> > > collections: 1
> > > axes: 0
> > > buttons: 0
> > > hats: 0
> > > sliders: 0
> > > dials: 0
> > > wheels: 0
> > >
> > >
> > > Device(4)
> > >
> > > usagePageValue: 12
> > > usageValue: 1
> > > usageName: 'Consumer Usage 0x1'
> > > index: 4
> > > transport: 'USB'
> > > vendorID: 1452
> > > productID: 538
> > > version: 19
> > > manufacturer: 'Apple Computer'
> > > product: 'Apple Internal Keyboard / Trackpad'
> > > serialNumber: ''
> > > locationID: 488636416
> > > totalElements: 2
> > > features: 0
> > > inputs: 1
> > > outputs: 0
> > > collections: 1
> > > axes: 0
> > > buttons: 0
> > > hats: 0
> > > sliders: 0
> > > dials: 0
> > > wheels: 0
> > >
> > >
> > > Device(5)
> > >
> > > usagePageValue: 1
> > > usageValue: 2
> > > usageName: 'Mouse'
> > > index: 5
> > > transport: 'USB'
> > > vendorID: 1452
> > > productID: 538
> > > version: 0
> > > manufacturer: 'Apple Computer'
> > > product: 'Apple Internal Keyboard / Trackpad'
> > > serialNumber: '0'
> > > locationID: 488636416
> > > totalElements: 6
> > > features: 0
> > > inputs: 4
> > > outputs: 0
> > > collections: 2
> > > axes: 2
> > > buttons: 1
> > > hats: 0
> > > sliders: 0
> > > dials: 0
> > > wheels: 1
> > >
> > > Device(6)
> > >
> > > usagePageValue: 255
> > > usageValue: 1
> > > usageName: 'Page: 0xff, Usage: 0x1'
> > > index: 6
> > > transport: 'USB'
> > > vendorID: 1452
> > > productID: 538
> > > version: 0
> > > manufacturer: 'Apple'
> > > product: 'Trackpad'
> > > serialNumber: ''
> > > locationID: 488636416
> > > totalElements: 20
> > > features: 17
> > > inputs: 2
> > > outputs: 0
> > > collections: 1
> > > axes: 0
> > > buttons: 0
> > > hats: 0
> > > sliders: 0
> > > dials: 0
> > > wheels: 0
> > >
> > > Device(7)
> > >
> > > usagePageValue: 1
> > > usageValue: 2
> > > usageName: 'Mouse'
> > > index: 7
> > > transport: 'USB'
> > > vendorID: 1452
> > > productID: 538
> > > version: 0
> > > manufacturer: 'Apple'
> > > product: 'Trackpad'
> > > serialNumber: ''
> > > locationID: 488636416
> > > totalElements: 27
> > > features: 17
> > > inputs: 7
> > > outputs: 0
> > > collections: 3
> > > axes: 2
> > > buttons: 3
> > > hats: 0
> > > sliders: 0
> > > dials: 0
> > > wheels: 0
> > >
> > > Device(8)
> > >
> > > usagePageValue: 1
> > > usageValue: 6
> > > usageName: 'Keyboard'
> > > index: 8
> > > transport: 'USB'
> > > vendorID: 1452
> > > productID: 538
> > > version: 19
> > > manufacturer: 'Apple Computer'
> > > product: 'Apple Internal Keyboard / Trackpad'
> > > serialNumber: ''
> > > locationID: 488636416
> > > totalElements: 244
> > > features: 0
> > > inputs: 238
> > > outputs: 5
> > > collections: 1
> > > axes: 0
> > > buttons: 0
> > > hats: 0
> > > sliders: 0
> > > dials: 0
> > > wheels: 0
> > >
> > > --------------- end output -----------------------------------
> > >
> > >
> > >
> > > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
> > > <mario.kleiner@> wrote:
> > > >
> > > > Reg. Sync failures: If you open your window by providing a
> > > > rect parameter of e.g., [0 0 640 480], so it only covers part
> > > > of the screen, yes, you may get more sync failures and a
> > > > generally unusable timing for real work. This mode is ok
> > > > for debugging your script etc., but not for timing tests or
> > > > real data collection. The OS/X Quartz window manager
> > > > interferes with presentation timing and timestamping in
> > > > windowed mode, and probably even more so on a weak
> > > > GMA-950. But even with high-end graphics you wouldn't
> > > > get good enough timing. Just use the 'SkipSyncTests' setting
> > > > during development/debugging of your script and remove
> > > > it for real data collection.
> > > >
> > > > -mario
> > > >
> > > > --- In psychtoolbox@yahoogroups.com, "andyleb" <andyleb@> wrote:
> > > > >
> > > > > Hi Mario,
> > > > >
> > > > > Thanks so much for replying. At the time I posted, I was running
> > > > > PTB3's *very* latest beta, with matlab2006a (7.4). Since then, I've
> > > > > upgraded to matlab2006b (7.5) and reinstalled PTB3-beta. I also
> > > > > updated to the most recent version of quicktime.
> > > > >
> > > > > 1. Sync failures. I realized that it's much more likely to occur
> > > > > when my main window is smaller than the full size of my display (e.g.,
> > > > > 640x480 in a 1280x800 screen). Did I wrongly assume we can open small
> > > > > windows in OS X without syncing trouble? The output is pasted into
> > > > > this message (please scroll down).
> > > > >
> > > > > 2. USB device trouble. Since upgrading, I haven't had this problem
> > > > > at all. Maybe I just had a buggy install of matlab 2006a?
> > > > >
> > > > > 3. I'm still looking into the Char problems on the various windows
> > > > > machines, based on your recommendations. I'll post on those
> > > > > separately. I'd also like to hear if anyone else has experienced
> > > > > these problems.
> > > > >
> > > > > Thanks so much for your help!!
> > > > >
> > > > > Andy
> > > > >
> > > > >
> > > > >
> > > > > -------- SYNC FAILURE OUTPUT --------------------------------------
> > > > >
> > > > > PTB-INFO: This is the OpenGL-Psychtoolbox version 3.0.8. Type
> > > > > 'PsychtoolboxVersion' for more detailed version information.
> > > > > PTB-INFO: Psychtoolbox is licensed to you under terms of the GNU
> > > > > General Public License (GPL). See file 'License.txt' in the
> > > > > PTB-INFO: Psychtoolbox root folder for a copy of the GPL license.
> > > > >
> > > > >
> > > > >
> > > > > OpenGL-Extensions are: GL_ARB_transpose_matrix GL_ARB_vertex_program
> > > > > GL_ARB_vertex_blend GL_ARB_window_pos GL_ARB_shader_objects
> > > > > GL_ARB_vertex_shader GL_EXT_multi_draw_arrays GL_EXT_clip_volume_hint
> > > > > GL_EXT_rescale_normal GL_EXT_draw_range_elements GL_EXT_fog_coord
> > > > > GL_EXT_gpu_program_parameters GL_APPLE_client_storage
> > > > > GL_APPLE_specular_vector GL_APPLE_transform_hint
> > > > > GL_APPLE_packed_pixels GL_APPLE_fence GL_APPLE_vertex_array_object
> > > > > GL_APPLE_vertex_program_evaluators GL_APPLE_element_array
> > > > > GL_APPLE_flush_render GL_NV_texgen_reflection GL_NV_light_max_exponent
> > > > > GL_IBM_rasterpos_clip GL_SGIS_generate_mipmap
> > > > > GL_ARB_shading_language_100 GL_ARB_texture_border_clamp
> > > > > GL_ARB_multitexture GL_ARB_texture_env_add GL_ARB_texture_cube_map
> > > > > GL_ARB_texture_env_dot3 GL_ARB_texture_env_combine
> > > > > GL_ARB_texture_compression GL_ARB_texture_mirrored_repeat
> > > > > GL_ARB_shadow GL_ARB_depth_texture GL_ARB_fragment_program
> > > > > GL_ARB_fragment_shader GL_ARB_point_sprite
> > > > > GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object
> > > > > GL_ARB_pixel_buffer_object GL_EXT_framebuffer_object
> > > > > GL_EXT_texture_rectangle GL_ARB_texture_rectangle
> > > > > GL_EXT_texture_env_add GL_EXT_blend_color GL_EXT_blend_minmax
> > > > > GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr GL_EXT_bgra
> > > > > GL_EXT_stencil_wrap GL_EXT_texture_filter_anisotropic
> > > > > GL_EXT_separate_specular_color GL_EXT_secondary_color
> > > > > GL_EXT_blend_func_separate GL_EXT_shadow_funcs GL_EXT_stencil_two_side
> > > > > GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1
> > > > > GL_EXT_blend_equation_separate GL_EXT_packed_depth_stencil
> > > > > GL_APPLE_flush_buffer_range GL_APPLE_ycbcr_422 GL_APPLE_texture_range
> > > > > GL_APPLE_pixel_buffer GL_NV_blend_square GL_ATI_texture_env_combine3
> > > > > GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod
> > > > >
> > > > >
> > > > >
> > > > > PTB-INFO: OpenGL-Renderer is Intel Inc. :: Intel GMA 950 OpenGL Engine
> > > > > :: 1.2 APPLE-1.4.56
> > > > > PTB-INFO: Renderer has 64 MB of VRAM and a maximum 64 MB of texture
> > > > > memory.
> > > > > PTB-Info: VBL startline = 800 , VBL Endline = -1
> > > > > PTB-Info: Beamposition queries unsupported on this system. Will try to
> > > > > use kernel-level vbl interrupts as fallback.
> > > > > PTB-Info: Measured monitor refresh interval from VBLsync = 17.356896
> > > > > ms [57.613989 Hz]. (57 valid samples taken, stddev=3.102240 ms.)
> > > > > PTB-Info: Small deviations between reported values are normal and no
> > > > > reason to worry.
> > > > > PTB-INFO: Using OpenGL GL_TEXTURE_RECTANGLE_EXT extension for
> > > > > efficient high-performance texture mapping...
> > > > >
> > > > > WARNING: Couldn't compute a reliable estimate of monitor refresh
> > > > > interval! Trouble with VBL syncing?!?
> > > > >
> > > > >
> > > > > ----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! ----
> > > > >
> > > > > One or more internal checks (see Warnings above) indicate that
> > > > > synchronization
> > > > > of Psychtoolbox to the vertical retrace (VBL) is not working on your
> > > > > setup.
> > > > >
> > > > > This will seriously impair proper stimulus presentation and stimulus
> > > > > presentation timing!
> > > > > Please read 'help SyncTrouble' for information about how to solve or
> > > > > work-around the problem.
> > > > > You can force Psychtoolbox to continue, despite the severe problems,
> > > > > by adding the command
> > > > > Screen('Preference', 'SkipSyncTests',1); at the top of your script, if
> > > > > you really know what you are doing.
> > > > >
> > > > >
> > > > > -------- END OUTPUT --------------------------------------
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
> > > > > <mario.kleiner@> wrote:
> > > > > >
> > > > > > --- In psychtoolbox@yahoogroups.com, "andyleb" <andyleb@> wrote:
> > > > > >
> > > > > > > 1. On my MacBook (regular, not MacBook Pro), the screen test
> > > > > > > routinely fails. I understand the onboard graphics card is pretty
> > > > > > > weak for this computer, but is it bad enough that the PTB Screen
> > > > > > > can't work without skipping the sync test?
> > > > > >
> > > > > > Strange, worked on MacBook/IntelGMA when i tested it last time.
> > > > > > Provide PTB's Matlab output of the failure. I assume you run the
> > > > > > *very latest* 'beta'?
> > > > > >
> > > > > > You can always either completely skip the test or tell PTB to go
> > > > > > on in case of failure, you'll just lose our normally super-exact
> > > > > > timing if you do so -- or something else screws up if there was
> > > > > > a good severe reason for the sync-failure of course and not
> > > > > > only a noisy system.
> > > > > >
> > > > > > See: <http://psychtoolbox.org/wikka.php?wakka=FaqWarningPrefs>
> > > > > >
> > > > > > or simply the help texts that PTB outputs in case of failure. I
> > > assume
> > > > > > you read them?
> > > > > >
> > > > > > >
> > > > > > > 2. Kb commands don't accept any input on my Mac when a USB input
> > > > > > > device is connected. That is, when a keyboard or mouse are
> > > connected,
> > > > > > > even the laptop's built-in keyboard is not recognized. Note
> > > that this
> > > > > > > only applies to Kb commands, as Char commands (e.g., GetChar)
> > > still
> > > > > > > works fine. Is this an issue with PsychHID?
> > > > > >
> > > > > > Also strange. I work all the time with a USB mouse connected and
> > > > > > we never heard of or experienced an issue like that.
> > > > > >
> > > > > > What is the output of "GetKeyboardIndices" in that case? What does
> > > > > > d=PsychHID('GetDevices') report? I mean of course the full content
> > > > > > of 'd' d(1), d(2), ....
> > > > > >
> > > > > > >
> > > > > > > 3. For windows, I've been having some trouble with the char
> > > functions
> > > > > > > (GetChar, ListenChar). I've seen this on 3 separate machines (two
> > > > > > > using XP, one using 2000). Problems that occur are
> > > idiosyncratic to
> > > > > > > each machine, though. For instance, on one machine, after calling
> > > > > > > GetChar or ListenChar, the Windows menubar becomes visible on the
> > > > > > > bottom of the screen. On another machine, the Flip command stops
> > > > > > > working normally; that is, when I specify the [dontclear]
> > > parameter as
> > > > > > > 1, the setting is ignored and the Flip command behaves as if I had
> > > > > > > specified "2" (i.e., the backbuffer simply exchanges with the
> > > front
> > > > > > > buffer). To trigger this, I just need to add a Char command
> > > anywhere
> > > > > > > before a Flip command.
> > > > > >
> > > > > > Anybody else ever seen this? Which Matlab version is this? What
> > > > > > graphics card? Up to date drivers installed?
> > > > > >
> > > > > > There is no direct connection between 'Flip' and GetChar etc. but
> > > > > > you never know how Java's GetChar handling interacts with Matlabs
> > > > > > desktop UI and that with desktop manager gimmicks of the
> > > > > > graphics driver -- Windows is a mess.
> > > > > >
> > > > > > But the 'dontclear' setting 1 doesn't work on many Windows graphics
> > > > > > cards due to lack of features in the graphics drivers. If you have
> > > > > > recent graphics hardware and need that feature, then its
> > > > > > a good idea to enable the imaging pipeline by setting the
> > > > > > optional 'imagingMode' flag of Screen('OpenWindow', ...) to
> > > > > > kPsychNeedFastBackingStore.
> > > > > >
> > > > > > best,
> > > > > > -mario
> > > > > >
> > > > >
> > > >
> > >
> >
>
I too had problems getting input from the keyboard. My program would
alternate between working fine and then having a period (about 10s)
during which it would not receive any input at all. This would all
happen during a single experimental run.

It affected only 3 out of 6 computers, all running Mac OS 10.4.11, the
latest version of MATLAB (7.5.0.338 R2007b) and the latest version of
PsychToolbox ("3.0.8 - Flavor: beta - Corresponds to SVN Revision 884
but is *locally modified* !").

Strangely, two of these computers were (as far as I could make out)
identical, yet the code worked on one but not on the other.


The problem, turned out to be one line of code

>> Priority(MaxPriority(MainWindow));

When this line was removed, everything worked fine.

Piers



--- In psychtoolbox@yahoogroups.com, "stevefranconeri"
<stevefranconeri@...> wrote:
>
>
>
> Here's the answer!
>
> After many iterations back and forth with Mario Kleiner, he
suggested that I test another
> account on the same machine. Strangely, kbDemo worked just fine.
>
> After some experimentation, I finally figured it out. Under my
account's "Login Items"
> pane in the account admin control panel, there were some
utilities/drivers that had been
> installed by past programs (many involving 'USB"), including one
suspiciously called "ABF
> HotKey", which was installed by some shareware utility. I deleted
all the nonessential
> ones, and now my KB works just fine. I think it was that ABF one
that was causing the
> problem. This explains why it was only my account that had KB trouble.
>
> Many thanks once again to Mario for all of his help.
>
> -Steve
>
>
>
>
> --- In psychtoolbox@yahoogroups.com, "stevefranconeri"
<stevefranconeri@> wrote:
> >
> > Mario -
> >
> > Switching the keyboard for another one (from a macmini running the
same OS/Matlab
> > version) does nothing - the problem is specific to my mactel
tower. I also hit every key
> > (except the F1-12 keys) on each keyboard.
> >
> > I ran the commands you suggested, and posted the output here:
> > http://www.psych.northwestern.edu/~franconeri/KbCheckProblem.txt
> >
> > many thanks!
> > -Steve
> >
> >
> >
> > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
<mario.kleiner@> wrote:
> > >
> > > What happens if you switch the keyboards of
> > > your macMini and macTower? I'd expect the
> > > keyboards to be different in their behaviour.
> > >
> > > Did you try each key on the keyboard to make
> > > sure that none of them has an effect?
> > >
> > > if you do this:
> > >
> > > el=PsychHID('Elements', GetKeyboardIndices)
> > >
> > > what are the values of the following fields in the el array?
> > > usagePageValue
> > > usageValue
> > > usageName
> > >
> > > -mario
> > >
> > > --- In psychtoolbox@yahoogroups.com, "stevefranconeri"
<stevefranconeri@> wrote:
> > > >
> > > > Hi Mario -
> > > >
> > > > I am having the same problem as Andy, and after going through
all of the
> suggested
> > > fixes
> > > > in this thread, am having no luck. I'm on an Intel Mac Tower
running 10.4.10, and
> > > Matlab
> > > > 7.5 (2007b), and have the same trouble with 7.4. I've
restarted the machine &
> Matlab
> > > > many times, reinstalled toobox, and have switched keyboards
and usb slots.
> Control-
> > C
> > > > works fine but I can't get KbCheck to register any other keys.
> > > >
> > > > The same code/debugging reveals no problems at all on a
macmini in my lab -
> > > everything
> > > > works great there yet it's the same OS & Matlab version. Is
there something
> different
> > > > about my Tower's hardware? I've pasted a sample debug session
below, and any
> help
> > > > would be greatly appreciated!
> > > >
> > > > -Steve
> > > > PS: after asking some friends using toolbox, some report a
similar problem but for a
> > > > restart clears it for them.
> > > >
> > > >
> > > > >> KbDemo
> > > > 1 of 4. Testing KbCheck and KbName: press a key to see its
number.
> > > > Press the escape key to proceed to the next demo.
> > > > d
> > > > s
> > > > sdlkdk
> > > > [pressed control-c]
> > > > ??? Operation terminated by user during ==> KbCheck at 108
> > > >
> > > > In ==> KbDemo>KbDemoPart1 at 100
> > > > [ keyIsDown, seconds, keyCode ] = KbCheck;
> > > >
> > > > In ==> KbDemo at 74
> > > > KbDemoPart1;
> > > >
> > > > >> WaitSecs(.2); KbWait
> > > > d
> > > > d
> > > > d
> > > > d
> > > >
> > > > [pressed control-c]
> > > > ??? Operation terminated by user during ==> KbWait at 58
> > > >
> > > >
> > > > >> d=PsychHID('Devices')
> > > >
> > > > d =
> > > >
> > > > 1x2 struct array with fields:
> > > > usagePageValue
> > > > usageValue
> > > > usageName
> > > > index
> > > > transport
> > > > vendorID
> > > > productID
> > > > version
> > > > manufacturer
> > > > product
> > > > serialNumber
> > > > locationID
> > > > totalElements
> > > > features
> > > > inputs
> > > > outputs
> > > > collections
> > > > axes
> > > > buttons
> > > > hats
> > > > sliders
> > > > dials
> > > > wheels
> > > >
> > > > >> d(1)
> > > >
> > > > ans =
> > > >
> > > > usagePageValue: 1
> > > > usageValue: 2
> > > > usageName: 'Mouse'
> > > > index: 1
> > > > transport: 'USB'
> > > > vendorID: 1452
> > > > productID: 772
> > > > version: 272
> > > > manufacturer: 'Mitsumi Electric'
> > > > product: 'Apple Optical USB Mouse'
> > > > serialNumber: ''
> > > > locationID: 488767488
> > > > totalElements: 11
> > > > features: 0
> > > > inputs: 9
> > > > outputs: 0
> > > > collections: 2
> > > > axes: 3
> > > > buttons: 4
> > > > hats: 0
> > > > sliders: 0
> > > > dials: 0
> > > > wheels: 1
> > > >
> > > > >> d(2)
> > > >
> > > > ans =
> > > >
> > > > usagePageValue: 1
> > > > usageValue: 6
> > > > usageName: 'Keyboard'
> > > > index: 2
> > > > transport: 'USB'
> > > > vendorID: 1452
> > > > productID: 513
> > > > version: 257
> > > > manufacturer: 'Alps Electric'
> > > > product: 'M2452'
> > > > serialNumber: ''
> > > > locationID: 488701952
> > > > totalElements: 274
> > > > features: 0
> > > > inputs: 270
> > > > outputs: 3
> > > > collections: 1
> > > > axes: 0
> > > > buttons: 0
> > > > hats: 0
> > > > sliders: 0
> > > > dials: 0
> > > > wheels: 0
> > > >
> > > > >> GetKeyboardIndices
> > > >
> > > > ans =
> > > >
> > > > 2
> > > >
> > > > >> KbCheck(2)
> > > >
> > > > ans =
> > > >
> > > > 0
> > > >
> > > > Finally, if I put the above KbCheck(2) into a hand-coded
KbWait, it never registers
> > > > anything.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
<mario.kleiner@> wrote:
> > > > >
> > > > > > 2. Failure of Kb commands on my Macbook when USB
keyboard/mouse is
> > > > > > attached: I thought the problem went away after upgrading
MATLAB to
> > > > > > r2007b, but it worked its way back into my life... As Mario
> > > > > > recommended, I'll paste below the full output from
> > > > > > devices=PsychHID('Devices') when the keyboard is attached.
Nothing
> > > > > > seems abnormal from what I can tell (though that doesn't
mean much!).
> > > > >
> > > > > What is the output of GetKeyboardIndices? If that lists the
id's of your
> > > > > two keyboards (built-in and external) and KbCheck doesn't throw
> > > > > any errors when you use it, then the keyboards should get
detected.
> > > > >
> > > > > If you pass the index to KbCheck, e.g.,
> > > > >
> > > > > KbCheck(3) for your USB kb or KbCheck(8) for your internal
keyboard,
> > > > > then at least query of the internal keyboard should work. By
default
> > > > > KbCheck will query the first keyboard (lowest index) it
finds in your
> > > > > system if you don't ask for a specific one - in this case
the external
> > > > > USB one, because 3 < 8.
> > > > >
> > > > > Did you try all keys of the keyboard to see if some of them
> > > > > get detected? Are there any special keys or switches on your kb?
> > > > >
> > > > > KbCheck only queries the keys with usb scancodes between 1 and
> > > > > 255. It's a bit suspicious to me that your USB kb seems to have
> > > > > more than 255 keys.
> > > > >
> > > > > Did you try with different USB keyboards?
> > > > >
> > > > > >
> > > > > > 3. Char commands not working on PCs: I'm running XP with
r2007b and
> > > > > > the latest updated version of PTB, as of last week. I
just found out,
> > > > > > though, that Char commands have always had problems with
the Java
> > > > > > virtual machine on Windows, i.e., since PTB2 times. As a
Mac user, I
> > > > > > was totally unaware of this until yesterday when I went to
install PTB
> > > > > > 2.54 on a windows machine. I found this on the download page
> > > > > > (http://psychtoolbox.org/PTB-2/download.html):
> > > > >
> > > > > For Matlab R2007a and R2007b its the opposite, it wouldn't
work with
> > > > > -nojvm mode at the moment, because that .dll's are not yet
ported
> > > > > over. The Java based GetChar should work -- at least it does on
> > > > > my R2007a + XP setup.
> > > > >
> > > > > I don't have 2007b on Windows, but you never know what
> > > > > kind of new GetChar trouble Mathworks likes to introduce with
> > > > > each new Matlab release. In general, GetChar is the most fragile
> > > > > part of PTB, because it has to rely on Matlabs Java
implementation,
> > > > > which is in my experience the most prominent reason for Matlab
> > > > > crashes/out of memory conditions/all kind of other trouble.
> > > > > Matlabs interaction with the event queue is a complete black box
> > > > > for us, not much we can do about that -- except finding new
> > > > > weird workarounds for the weird trouble introduced with new
> > > > > releases of Matlab. --> Avoid GetChar if you can.
> > > > >
> > > > > -mario
> > > > >
> > > > > >
> > > > > > "Nojvm" mode is required for GetChar because the Java
Virtual Machine
> > > > > > (JVM) compoenent of MATLAB blocks keyboard input to the
Psychtoolbox
> > > > > > functions GetChar and CharAvail.
> > > > > >
> > > > > > Is it the case that -nojvm is still required in PTB3 to
use the Char
> > > > > > commands?
> > > > > >
> > > > > > Thanks!
> > > > > >
> > > > > > Andy
> > > > > >
> > > > > > ---------- Output for PsychHID devices -----------------------
> > > > > >
> > > > > > Device(1)
> > > > > >
> > > > > > usagePageValue: 12
> > > > > > usageValue: 1
> > > > > > usageName: 'Consumer Usage 0x1'
> > > > > > index: 1
> > > > > > transport: 'USB'
> > > > > > vendorID: 1452
> > > > > > productID: 33344
> > > > > > version: 272
> > > > > > manufacturer: 'Apple Computer, Inc.'
> > > > > > product: 'Apple IR'
> > > > > > serialNumber: ''
> > > > > > locationID: 1.5624e+09
> > > > > > totalElements: 21
> > > > > > features: 0
> > > > > > inputs: 20
> > > > > > outputs: 0
> > > > > > collections: 1
> > > > > > axes: 0
> > > > > > buttons: 0
> > > > > > hats: 0
> > > > > > sliders: 0
> > > > > > dials: 0
> > > > > > wheels: 0
> > > > > >
> > > > > > Device(2)
> > > > > >
> > > > > > usagePageValue: 1
> > > > > > usageValue: 128
> > > > > > usageName: 'System Control'
> > > > > > index: 2
> > > > > > transport: 'USB'
> > > > > > vendorID: 2689
> > > > > > productID: 257
> > > > > > version: 272
> > > > > > manufacturer: 'CHESEN'
> > > > > > product: 'USB Keyboard'
> > > > > > serialNumber: ''
> > > > > > locationID: 1.0245e+09
> > > > > > totalElements: 29
> > > > > > features: 0
> > > > > > inputs: 27
> > > > > > outputs: 0
> > > > > > collections: 2
> > > > > > axes: 0
> > > > > > buttons: 0
> > > > > > hats: 0
> > > > > > sliders: 0
> > > > > > dials: 0
> > > > > > wheels: 0
> > > > > >
> > > > > > Device(3)
> > > > > >
> > > > > > usagePageValue: 1
> > > > > > usageValue: 6
> > > > > > usageName: 'Keyboard'
> > > > > > index: 3
> > > > > > transport: 'USB'
> > > > > > vendorID: 2689
> > > > > > productID: 257
> > > > > > version: 272
> > > > > > manufacturer: 'CHESEN'
> > > > > > product: 'USB Keyboard'
> > > > > > serialNumber: ''
> > > > > > locationID: 1.0245e+09
> > > > > > totalElements: 276
> > > > > > features: 0
> > > > > > inputs: 270
> > > > > > outputs: 5
> > > > > > collections: 1
> > > > > > axes: 0
> > > > > > buttons: 0
> > > > > > hats: 0
> > > > > > sliders: 0
> > > > > > dials: 0
> > > > > > wheels: 0
> > > > > >
> > > > > >
> > > > > > Device(4)
> > > > > >
> > > > > > usagePageValue: 12
> > > > > > usageValue: 1
> > > > > > usageName: 'Consumer Usage 0x1'
> > > > > > index: 4
> > > > > > transport: 'USB'
> > > > > > vendorID: 1452
> > > > > > productID: 538
> > > > > > version: 19
> > > > > > manufacturer: 'Apple Computer'
> > > > > > product: 'Apple Internal Keyboard / Trackpad'
> > > > > > serialNumber: ''
> > > > > > locationID: 488636416
> > > > > > totalElements: 2
> > > > > > features: 0
> > > > > > inputs: 1
> > > > > > outputs: 0
> > > > > > collections: 1
> > > > > > axes: 0
> > > > > > buttons: 0
> > > > > > hats: 0
> > > > > > sliders: 0
> > > > > > dials: 0
> > > > > > wheels: 0
> > > > > >
> > > > > >
> > > > > > Device(5)
> > > > > >
> > > > > > usagePageValue: 1
> > > > > > usageValue: 2
> > > > > > usageName: 'Mouse'
> > > > > > index: 5
> > > > > > transport: 'USB'
> > > > > > vendorID: 1452
> > > > > > productID: 538
> > > > > > version: 0
> > > > > > manufacturer: 'Apple Computer'
> > > > > > product: 'Apple Internal Keyboard / Trackpad'
> > > > > > serialNumber: '0'
> > > > > > locationID: 488636416
> > > > > > totalElements: 6
> > > > > > features: 0
> > > > > > inputs: 4
> > > > > > outputs: 0
> > > > > > collections: 2
> > > > > > axes: 2
> > > > > > buttons: 1
> > > > > > hats: 0
> > > > > > sliders: 0
> > > > > > dials: 0
> > > > > > wheels: 1
> > > > > >
> > > > > > Device(6)
> > > > > >
> > > > > > usagePageValue: 255
> > > > > > usageValue: 1
> > > > > > usageName: 'Page: 0xff, Usage: 0x1'
> > > > > > index: 6
> > > > > > transport: 'USB'
> > > > > > vendorID: 1452
> > > > > > productID: 538
> > > > > > version: 0
> > > > > > manufacturer: 'Apple'
> > > > > > product: 'Trackpad'
> > > > > > serialNumber: ''
> > > > > > locationID: 488636416
> > > > > > totalElements: 20
> > > > > > features: 17
> > > > > > inputs: 2
> > > > > > outputs: 0
> > > > > > collections: 1
> > > > > > axes: 0
> > > > > > buttons: 0
> > > > > > hats: 0
> > > > > > sliders: 0
> > > > > > dials: 0
> > > > > > wheels: 0
> > > > > >
> > > > > > Device(7)
> > > > > >
> > > > > > usagePageValue: 1
> > > > > > usageValue: 2
> > > > > > usageName: 'Mouse'
> > > > > > index: 7
> > > > > > transport: 'USB'
> > > > > > vendorID: 1452
> > > > > > productID: 538
> > > > > > version: 0
> > > > > > manufacturer: 'Apple'
> > > > > > product: 'Trackpad'
> > > > > > serialNumber: ''
> > > > > > locationID: 488636416
> > > > > > totalElements: 27
> > > > > > features: 17
> > > > > > inputs: 7
> > > > > > outputs: 0
> > > > > > collections: 3
> > > > > > axes: 2
> > > > > > buttons: 3
> > > > > > hats: 0
> > > > > > sliders: 0
> > > > > > dials: 0
> > > > > > wheels: 0
> > > > > >
> > > > > > Device(8)
> > > > > >
> > > > > > usagePageValue: 1
> > > > > > usageValue: 6
> > > > > > usageName: 'Keyboard'
> > > > > > index: 8
> > > > > > transport: 'USB'
> > > > > > vendorID: 1452
> > > > > > productID: 538
> > > > > > version: 19
> > > > > > manufacturer: 'Apple Computer'
> > > > > > product: 'Apple Internal Keyboard / Trackpad'
> > > > > > serialNumber: ''
> > > > > > locationID: 488636416
> > > > > > totalElements: 244
> > > > > > features: 0
> > > > > > inputs: 238
> > > > > > outputs: 5
> > > > > > collections: 1
> > > > > > axes: 0
> > > > > > buttons: 0
> > > > > > hats: 0
> > > > > > sliders: 0
> > > > > > dials: 0
> > > > > > wheels: 0
> > > > > >
> > > > > > --------------- end output -----------------------------------
> > > > > >
> > > > > >
> > > > > >
> > > > > > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
> > > > > > <mario.kleiner@> wrote:
> > > > > > >
> > > > > > > Reg. Sync failures: If you open your window by providing a
> > > > > > > rect parameter of e.g., [0 0 640 480], so it only covers
part
> > > > > > > of the screen, yes, you may get more sync failures and a
> > > > > > > generally unusable timing for real work. This mode is ok
> > > > > > > for debugging your script etc., but not for timing tests or
> > > > > > > real data collection. The OS/X Quartz window manager
> > > > > > > interferes with presentation timing and timestamping in
> > > > > > > windowed mode, and probably even more so on a weak
> > > > > > > GMA-950. But even with high-end graphics you wouldn't
> > > > > > > get good enough timing. Just use the 'SkipSyncTests' setting
> > > > > > > during development/debugging of your script and remove
> > > > > > > it for real data collection.
> > > > > > >
> > > > > > > -mario
> > > > > > >
> > > > > > > --- In psychtoolbox@yahoogroups.com, "andyleb"
<andyleb@> wrote:
> > > > > > > >
> > > > > > > > Hi Mario,
> > > > > > > >
> > > > > > > > Thanks so much for replying. At the time I posted, I
was running
> > > > > > > > PTB3's *very* latest beta, with matlab2006a (7.4).
Since then, I've
> > > > > > > > upgraded to matlab2006b (7.5) and reinstalled
PTB3-beta. I also
> > > > > > > > updated to the most recent version of quicktime.
> > > > > > > >
> > > > > > > > 1. Sync failures. I realized that it's much more
likely to occur
> > > > > > > > when my main window is smaller than the full size of
my display (e.g.,
> > > > > > > > 640x480 in a 1280x800 screen). Did I wrongly assume
we can open small
> > > > > > > > windows in OS X without syncing trouble? The output
is pasted into
> > > > > > > > this message (please scroll down).
> > > > > > > >
> > > > > > > > 2. USB device trouble. Since upgrading, I haven't
had this problem
> > > > > > > > at all. Maybe I just had a buggy install of matlab 2006a?
> > > > > > > >
> > > > > > > > 3. I'm still looking into the Char problems on the
various windows
> > > > > > > > machines, based on your recommendations. I'll post on
those
> > > > > > > > separately. I'd also like to hear if anyone else has
experienced
> > > > > > > > these problems.
> > > > > > > >
> > > > > > > > Thanks so much for your help!!
> > > > > > > >
> > > > > > > > Andy
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > -------- SYNC FAILURE OUTPUT
> > --------------------------------------
> > > > > > > >
> > > > > > > > PTB-INFO: This is the OpenGL-Psychtoolbox version
3.0.8. Type
> > > > > > > > 'PsychtoolboxVersion' for more detailed version
information.
> > > > > > > > PTB-INFO: Psychtoolbox is licensed to you under terms
of the GNU
> > > > > > > > General Public License (GPL). See file 'License.txt'
in the
> > > > > > > > PTB-INFO: Psychtoolbox root folder for a copy of the
GPL license.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > OpenGL-Extensions are: GL_ARB_transpose_matrix
> GL_ARB_vertex_program
> > > > > > > > GL_ARB_vertex_blend GL_ARB_window_pos
GL_ARB_shader_objects
> > > > > > > > GL_ARB_vertex_shader GL_EXT_multi_draw_arrays
> GL_EXT_clip_volume_hint
> > > > > > > > GL_EXT_rescale_normal GL_EXT_draw_range_elements
GL_EXT_fog_coord
> > > > > > > > GL_EXT_gpu_program_parameters GL_APPLE_client_storage
> > > > > > > > GL_APPLE_specular_vector GL_APPLE_transform_hint
> > > > > > > > GL_APPLE_packed_pixels GL_APPLE_fence
GL_APPLE_vertex_array_object
> > > > > > > > GL_APPLE_vertex_program_evaluators GL_APPLE_element_array
> > > > > > > > GL_APPLE_flush_render GL_NV_texgen_reflection
> GL_NV_light_max_exponent
> > > > > > > > GL_IBM_rasterpos_clip GL_SGIS_generate_mipmap
> > > > > > > > GL_ARB_shading_language_100 GL_ARB_texture_border_clamp
> > > > > > > > GL_ARB_multitexture GL_ARB_texture_env_add
GL_ARB_texture_cube_map
> > > > > > > > GL_ARB_texture_env_dot3 GL_ARB_texture_env_combine
> > > > > > > > GL_ARB_texture_compression GL_ARB_texture_mirrored_repeat
> > > > > > > > GL_ARB_shadow GL_ARB_depth_texture GL_ARB_fragment_program
> > > > > > > > GL_ARB_fragment_shader GL_ARB_point_sprite
> > > > > > > > GL_ARB_texture_non_power_of_two
GL_ARB_vertex_buffer_object
> > > > > > > > GL_ARB_pixel_buffer_object GL_EXT_framebuffer_object
> > > > > > > > GL_EXT_texture_rectangle GL_ARB_texture_rectangle
> > > > > > > > GL_EXT_texture_env_add GL_EXT_blend_color
GL_EXT_blend_minmax
> > > > > > > > GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr
> GL_EXT_bgra
> > > > > > > > GL_EXT_stencil_wrap GL_EXT_texture_filter_anisotropic
> > > > > > > > GL_EXT_separate_specular_color GL_EXT_secondary_color
> > > > > > > > GL_EXT_blend_func_separate GL_EXT_shadow_funcs
> GL_EXT_stencil_two_side
> > > > > > > > GL_EXT_texture_compression_s3tc
GL_EXT_texture_compression_dxt1
> > > > > > > > GL_EXT_blend_equation_separate GL_EXT_packed_depth_stencil
> > > > > > > > GL_APPLE_flush_buffer_range GL_APPLE_ycbcr_422
> GL_APPLE_texture_range
> > > > > > > > GL_APPLE_pixel_buffer GL_NV_blend_square
GL_ATI_texture_env_combine3
> > > > > > > > GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > PTB-INFO: OpenGL-Renderer is Intel Inc. :: Intel GMA
950 OpenGL Engine
> > > > > > > > :: 1.2 APPLE-1.4.56
> > > > > > > > PTB-INFO: Renderer has 64 MB of VRAM and a maximum 64
MB of texture
> > > > > > > > memory.
> > > > > > > > PTB-Info: VBL startline = 800 , VBL Endline = -1
> > > > > > > > PTB-Info: Beamposition queries unsupported on this
system. Will try to
> > > > > > > > use kernel-level vbl interrupts as fallback.
> > > > > > > > PTB-Info: Measured monitor refresh interval from
VBLsync = 17.356896
> > > > > > > > ms [57.613989 Hz]. (57 valid samples taken,
stddev=3.102240 ms.)
> > > > > > > > PTB-Info: Small deviations between reported values are
normal and no
> > > > > > > > reason to worry.
> > > > > > > > PTB-INFO: Using OpenGL GL_TEXTURE_RECTANGLE_EXT
extension for
> > > > > > > > efficient high-performance texture mapping...
> > > > > > > >
> > > > > > > > WARNING: Couldn't compute a reliable estimate of
monitor refresh
> > > > > > > > interval! Trouble with VBL syncing?!?
> > > > > > > >
> > > > > > > >
> > > > > > > > ----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! ----
> > > > > > > >
> > > > > > > > One or more internal checks (see Warnings above)
indicate that
> > > > > > > > synchronization
> > > > > > > > of Psychtoolbox to the vertical retrace (VBL) is not
working on your
> > > > > > > > setup.
> > > > > > > >
> > > > > > > > This will seriously impair proper stimulus
presentation and stimulus
> > > > > > > > presentation timing!
> > > > > > > > Please read 'help SyncTrouble' for information about
how to solve or
> > > > > > > > work-around the problem.
> > > > > > > > You can force Psychtoolbox to continue, despite the
severe problems,
> > > > > > > > by adding the command
> > > > > > > > Screen('Preference', 'SkipSyncTests',1); at the top of
your script, if
> > > > > > > > you really know what you are doing.
> > > > > > > >
> > > > > > > >
> > > > > > > > -------- END OUTPUT --------------------------------------
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In psychtoolbox@yahoogroups.com, "Mario Kleiner"
> > > > > > > > <mario.kleiner@> wrote:
> > > > > > > > >
> > > > > > > > > --- In psychtoolbox@yahoogroups.com, "andyleb"
<andyleb@> wrote:
> > > > > > > > >
> > > > > > > > > > 1. On my MacBook (regular, not MacBook Pro), the
screen test
> > > > > > > > > > routinely fails. I understand the onboard
graphics card is pretty
> > > > > > > > > > weak for this computer, but is it bad enough that
the PTB Screen
> > > > > > > > > > can't work without skipping the sync test?
> > > > > > > > >
> > > > > > > > > Strange, worked on MacBook/IntelGMA when i tested it
last time.
> > > > > > > > > Provide PTB's Matlab output of the failure. I assume
you run the
> > > > > > > > > *very latest* 'beta'?
> > > > > > > > >
> > > > > > > > > You can always either completely skip the test or
tell PTB to go
> > > > > > > > > on in case of failure, you'll just lose our normally
super-exact
> > > > > > > > > timing if you do so -- or something else screws up
if there was
> > > > > > > > > a good severe reason for the sync-failure of course
and not
> > > > > > > > > only a noisy system.
> > > > > > > > >
> > > > > > > > > See:
<http://psychtoolbox.org/wikka.php?wakka=FaqWarningPrefs>
> > > > > > > > >
> > > > > > > > > or simply the help texts that PTB outputs in case of
failure. I
> > > > > > assume
> > > > > > > > > you read them?
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > 2. Kb commands don't accept any input on my Mac
when a USB input
> > > > > > > > > > device is connected. That is, when a keyboard or
mouse are
> > > > > > connected,
> > > > > > > > > > even the laptop's built-in keyboard is not
recognized. Note
> > > > > > that this
> > > > > > > > > > only applies to Kb commands, as Char commands
(e.g., GetChar)
> > > > > > still
> > > > > > > > > > works fine. Is this an issue with PsychHID?
> > > > > > > > >
> > > > > > > > > Also strange. I work all the time with a USB mouse
connected and
> > > > > > > > > we never heard of or experienced an issue like that.
> > > > > > > > >
> > > > > > > > > What is the output of "GetKeyboardIndices" in that
case? What does
> > > > > > > > > d=PsychHID('GetDevices') report? I mean of course
the full content
> > > > > > > > > of 'd' d(1), d(2), ....
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > 3. For windows, I've been having some trouble
with the char
> > > > > > functions
> > > > > > > > > > (GetChar, ListenChar). I've seen this on 3
separate machines (two
> > > > > > > > > > using XP, one using 2000). Problems that occur are
> > > > > > idiosyncratic to
> > > > > > > > > > each machine, though. For instance, on one
machine, after calling
> > > > > > > > > > GetChar or ListenChar, the Windows menubar becomes
visible on the
> > > > > > > > > > bottom of the screen. On another machine, the
Flip command stops
> > > > > > > > > > working normally; that is, when I specify the
[dontclear]
> > > > > > parameter as
> > > > > > > > > > 1, the setting is ignored and the Flip command
behaves as if I had
> > > > > > > > > > specified "2" (i.e., the backbuffer simply
exchanges with the
> > > > > > front
> > > > > > > > > > buffer). To trigger this, I just need to add a
Char command
> > > > > > anywhere
> > > > > > > > > > before a Flip command.
> > > > > > > > >
> > > > > > > > > Anybody else ever seen this? Which Matlab version is
this? What
> > > > > > > > > graphics card? Up to date drivers installed?
> > > > > > > > >
> > > > > > > > > There is no direct connection between 'Flip' and
GetChar etc. but
> > > > > > > > > you never know how Java's GetChar handling interacts
with Matlabs
> > > > > > > > > desktop UI and that with desktop manager gimmicks of the
> > > > > > > > > graphics driver -- Windows is a mess.
> > > > > > > > >
> > > > > > > > > But the 'dontclear' setting 1 doesn't work on many
Windows graphics
> > > > > > > > > cards due to lack of features in the graphics
drivers. If you have
> > > > > > > > > recent graphics hardware and need that feature, then its
> > > > > > > > > a good idea to enable the imaging pipeline by
setting the
> > > > > > > > > optional 'imagingMode' flag of Screen('OpenWindow',
...) to
> > > > > > > > > kPsychNeedFastBackingStore.
> > > > > > > > >
> > > > > > > > > best,
> > > > > > > > > -mario
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Hey,

> I have seen the Windows XP taskbar pop up frequently, but not
> necessarily related to the GetChar class of functions. I solved it by
> setting the taskbar to NOT be on top of other windows (right-click on
> the taskbar and select the Properties command; make sure "Keep the
> taskbar on top of other windows is not checked). I haven't had the
> taskbar appear since.

That does seem to have solved the problem. Thank you very much!

Ta,
Andrew