Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#9261 closed bug (fixed)

Problem with cursor on hrev 44952 gcc4h

Reported by: Hubert Owned by: axeld
Priority: high Milestone: R1/beta1
Component: Servers/app_server Version: R1/Development
Keywords: hardware cursor Cc: looncraz
Blocked By: Blocking: #9631, #10483, #10756
Has a Patch: yes Platform: x86

Description

When I run system I have normal white cursor but when I start e.g Vision Haiku freeze on 2-3 sec and I have black pud.

Attachments (7)

syslog (255.9 KB) - added by Hubert 5 years ago.
syslog
screenshot1.jpeg (95.2 KB) - added by Hubert 5 years ago.
before
screenshot2.jpeg (325.3 KB) - added by Hubert 5 years ago.
after
0001-set-fHardwareCursorEnabled-false-in-case-we-can-t-se.patch (906 bytes) - added by Ziusudra 5 years ago.
Allows for switching from HW curosr back to SW cursor, but the HW cursor image does not move (though it is drawn correctly).
0002-show-the-HW-cursor-if-it-was-set-hide-it-if-not.patch (887 bytes) - added by Ziusudra 5 years ago.
show the HW cursor if set, hide it if not
AHWI.diff (4.2 KB) - added by Ziusudra 5 years ago.
not a proper patch
nvidia.settings (3.2 KB) - added by humdinger 4 years ago.
~/config/settings/kernel/drivers/nvidia.settings that disables the hardware cursor for nvidia cards.

Download all attachments as: .zip

Change History (36)

Changed 5 years ago by Hubert

Attachment: syslog added

syslog

Changed 5 years ago by Hubert

Attachment: screenshot1.jpeg added

before

Changed 5 years ago by Hubert

Attachment: screenshot2.jpeg added

after

comment:1 Changed 5 years ago by Hubert

Ups. I no noticed that there are no feet on the screens. I made a new snapshot with mouse cursor but it looks normal(white) on screenshot o.O

comment:2 Changed 5 years ago by Rene Gollent

Keywords: hardware added

This is due to the recent addition of hardware cursor support. I see the same issue here and disabling the hardware cursor in my graphics driver brings things back to normal.

comment:3 Changed 5 years ago by Hubert

Can I disable hardware cursor in system? If not, this option should be possibly as the same as the appearance of the mouse pointer.

comment:4 Changed 5 years ago by Ziusudra

I'm seeing this with a Nvidia GeForce 7300 GT (G73) and a 45145 4H build.

Seen with Vision when it tries to use its cursors for links and dividers. Also seen with Icon-O-Matic when it tries to use its eye-dropper cursor. (Also, the hot-spot of the eye-dropper cursor seems to be in opposite corner than what it should be.)

I can't get it to happen with any of the "standard" cursors, say the one Web+ and Tracker use. It seems to be limited to custom ones.

It happens the first time trying to use any of those cursors, and after that the cursor wont change unless it is to one of the other of these.

The transparent pixels are white, some pixels are black, and others appear to be inverted.

Last edited 5 years ago by Ziusudra (previous) (diff)

comment:5 Changed 5 years ago by Ziusudra

Cortex and Playground also have custom cursors that do this.

comment:6 Changed 5 years ago by Ziusudra

Some notes:

/src/add-ons/accelerants/nvidia (and radeon) can only SetCursorShape not SetCursorBitmap. This is why it is only happening with "custom" cursors, the app server cursors have no shape data to set.

/src/servers/app/drawing/AccelerantHWInterface::SetCursor does not set fHardwareCursorEnabled to false if it cannot set the HW cursor. So the app server cursors stop working once a HW cursor is set and the cursor only changes when a different custom cursor is set.

(Off topic: It seems to me that AccelerantHWInterface::SetCursor should try to SetCursorBitmap before SetCursorShape. Though I don't know if it is possible to have the option of both.)

I don't know why the colors are wrong.

Changed 5 years ago by Ziusudra

Allows for switching from HW curosr back to SW cursor, but the HW cursor image does not move (though it is drawn correctly).

comment:7 Changed 5 years ago by Ziusudra

Has a Patch: set

Changed 5 years ago by Ziusudra

show the HW cursor if set, hide it if not

comment:8 Changed 5 years ago by Ziusudra

With these two patches four problems remain:

The colors: tranparent is white, white is black, and black is inverse of whatever pixel is under that point.

When initially setting a cursor the app server is also drawing the cursor and not erasing it until that region is redrawn for some other reason.

The hot spot coordinates are switched. This is most evident with Icon-O-Matic's dropper cursor.

When setting a HW cursor it will be in the position of the last displayed HW cursor until the next MoveCursorTo.

For anyone using Nvidia the drivers, they have an optional settings file which has an option for disabling the HW cursor. (http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/drivers/graphics/nvidia/nvidia.settings or http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/drivers/graphics/nvidia_gpgpu/nvidia_gpgpu.settings)

comment:9 Changed 5 years ago by korli

Cc: looncraz added

comment:10 Changed 5 years ago by korli

CCed looncraz as he activated hardware cursor support back in November 2012.

comment:11 Changed 5 years ago by looncraz

I posted a patch on the mailing list on 12/3

http://files.looncraz.net/HWCursor-Update-2.patch

It changes a few things:

Prefers SetBitmapCursor if offered, corrects clipping issues, and goes a small way into improving performance.

Please try it and get back to me. I have a partially functional HW cursor on radeon_hd (all I see is a dot - but that dot works perfectly, for what it's worth...).

--The loon

comment:12 Changed 5 years ago by Ziusudra

This diff gives me a proper cursor. Based on looncraz's patch with some changes: switches the hot spot coords, shows the cursor after succesfully setting it, fixes the masks and comments on how the BeOS masks differ.

Still leaves the one cursor image drawn by app server and having the wrong initial position. (And I guess the fact that the app server cursors have no shape data.)

comment:13 Changed 5 years ago by looncraz

I missed the most important update patch in my last comment:

http://files.looncraz.net/HWCursor-Update.patch You will want both.

The update above changes the priority of hardware cursors to favor bitmap cursors first and foremost among some other changes to address an observed issue.

Wish I had time to look at this more... need to find a better keyboard, first...

--The loon

comment:14 in reply to:  13 ; Changed 5 years ago by Ziusudra

Replying to looncraz:

I missed the most important update patch in my last comment:

http://files.looncraz.net/HWCursor-Update.patch You will want both.

You are mistaken, both are not wanted (and won't apply together anyway.) The only functional difference between these is the crash bug you fixed. (See: http://www.freelists.org/post/haiku-development/Hardware-cursor-TEST-patch,5)

Only the "HWCursor-Update-2.patch" diff (or my AHWI.diff) should be used.

comment:15 in reply to:  14 Changed 5 years ago by looncraz

Replying to Ziusudra:

http://files.looncraz.net/HWCursor-Update.patch You will want both.

You are mistaken, both are not wanted (and won't apply together anyway.) The only functional difference between these is the crash bug you fixed. (See: http://www.freelists.org/post/haiku-development/Hardware-cursor-TEST-patch,5)

Only the "HWCursor-Update-2.patch" diff (or my AHWI.diff) should be used.

The second update was created after the first, my memory said they were related.

Ill have to create a new patch to bring back the changes from the first update patch. It doesnt address the bug here, anyway (the second patch does that). The first patch, which will now need to be recreated, was to change the app_server to allow accelerants which only support bitmap cursors to also be able to support legacy cursors without any extra work.

It also, however, included a degree of awareness for the previous cursor acceleration state in order to cleanup the software cursor region when moving to the hardware cursor... I will look at it more closely in the next couple of days.

--The loon

Changed 5 years ago by Ziusudra

Attachment: AHWI.diff added

not a proper patch

comment:16 Changed 5 years ago by Ziusudra

This new diff fixes everything for me. The hardware cursor now works seamlessly on my Nvidia GeForce 7300 GT (G73).

Can patchify if desired, tommorow though, nearly bedtime.

I'm not sure about holding the two locks at the same time, could that be a problem?

comment:17 Changed 5 years ago by Rene Gollent

Blocking: 9631 added

(In #9631) Duplicate of #9261.

comment:18 Changed 5 years ago by Rene Gollent

Priority: normalhigh

comment:19 Changed 4 years ago by Matt Madia

Milestone: R1R1/beta1

Moving this to the current next release milestone.

comment:20 Changed 4 years ago by Martin

I got the problem with a NVIDIA GeForce4 MX 440 with AGP 4X 64mb and an ATI 3D rage xl.

First encountered the problem with Vision and Beshare (the pane resizing cursor).

Another thing i noticed with the 3D rage xl (i have yet to make complete test with the other hardware) is that it also interact with overlay acceleration. Using VLC (the normal R5 one, 0.86) i was freezing the screen (at each try), i think this was at the moment i was going full screen but perhaps also just from having it running with something in overlay in it. So starting vision was asking for a reboot because the system was unusable at that point.

comment:21 Changed 4 years ago by humdinger

Blocking: 10756 added

(In #10756) Turns out, this was already reported in #9261. Thanks, anevilyak, for notifying me...

comment:22 Changed 4 years ago by humdinger

For completeness, I attach the file ~/config/settings/kernel/drivers/nvidia.settings that disables the "hardcursor". It's a work around until the issue is solved.

Changed 4 years ago by humdinger

Attachment: nvidia.settings added

~/config/settings/kernel/drivers/nvidia.settings that disables the hardware cursor for nvidia cards.

comment:23 Changed 4 years ago by Martin

Even if the software cursor solved the problem for the last week, i now stumbled on the problem of cursor again with Vision. So either the card stayed in hardware cursor mode even if my config file state software or the problem just happen less often in software mode.

comment:24 Changed 4 years ago by humdinger

Funnily, back when my notebook still worked, I've seen the same thing with Vision again too. I unfairly blamed scanty's NES emulator or what it was... :-)
I've seen it for about 2 weeks, I guess.

comment:25 Changed 3 years ago by Pistooli

I have the same problem with an ASUS NVIDIA 7300GT when I start Vision. 2-3 minutes freeze, then ugly cursor. The attached nvidia.seetings seems to be a good work around.

comment:26 Changed 3 years ago by Martin

Capacitor plague on my normal P4, i now need to use the intel entry server. Can't use my Nvidia card it it, stuck with the onboard video said to be 0x4752 Rage XL PCI (ATI/AMD). How is it possible to disable hardware mouse on this one also? Computer is pretty much useless for me in this state. Until hardware cursor is solved on all driver, it should be removed imho.

Seem the hang with full screen is not related to overlay, it does it also with media player (not just VLC) and it does not have overlay with that card. As soon as full screen is enabled, the video continue but the screen no longer move. Once video done, i am stuck with a full screen frozen i can't remove in front of the desktop.

comment:27 Changed 3 years ago by PulkoMandy

Resolution: fixed
Status: newclosed

Patch applied in hrev48185. Untested since I don't have hw cursor support here.

comment:28 Changed 3 years ago by PulkoMandy

Blocking: 10483 added

(In #10483) Duplicate of #9261.

comment:29 Changed 3 years ago by Martin

Rapid check with BePDF (a cursor modifying app) show that the problem seem solved on the Rage XL PCI i use right now.

Much appreciated :)

Note: See TracTickets for help on using tickets.