Jump to content

Clover Bug/Issue Report and Patch

Clover Issue Bug Report Patch

  • Please log in to reply
2735 replies to this topic

#41
droples

droples

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male

Clover3242.

ScreenResolution 1280x1024 (Maximum).
1.Theme Metal. Legacy and Uefi Clover.
Section menu About. I don't see a line Screen Output: Graphics Output (UEFI),1280x1024.
Attached File  Legacy3242.jpg   41.53KB   8 downloads
2.Theme BGM.
Legacy mode without nuances.
UefiMode.There is a problem in displaying a menu item Options.
Attached File  Uefi3242.jpg   18.55KB   6 downloads
 


#42
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,772 posts
  • Gender:Male
  • Location:UK

Hi droplets.

 

1 - The line spacing in the font is too large, but this is down to the font design, not Clover. The line spacing in the font could be reduced but at risk of characters in the grid encroaching another's cell. One solution here would be to make the font file from a smaller size font.

 

2 - I too have seen this and it's an issue when changing themes from within the GUI; the animations from the old theme remain and the new animation is not loaded. I bet if you booted directly with BGM then it would be fine. I was going to try to find the exact cause and come up with a fix but I've just not had time. I remember Pene did some work before on clearing things out when switching themes, but that conversation was on ProjectOSX.



#43
droples

droples

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male

Hi blackosx!

Thanks for the clarification.

 

1- That's what I knew.

   Attached File  Metal.jpg   54.76KB   5 downloads

 

2-That I did not know but now I'll know. You're right.

    Attached File  BGM.jpg   27.31KB   5 downloads

   Thank you!



#44
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,772 posts
  • Gender:Male
  • Location:UK
2 - I too have seen this and it's an issue when changing themes from within the GUI; the animations from the old theme remain and the new animation is not loaded. I bet if you booted directly with BGM then it would be fine. I was going to try to find the exact cause and come up with a fix but I've just not had time. I remember Pene did some work before on clearing things out when switching themes, but that conversation was on ProjectOSX.
The issue:
The Options menu animation does not get updated with a new animation if changing themes from within the GUI to another with an options menu animation. All other animations are correctly changed, just not the options menu animation.
 
Steps to see the problem:
1. Load Clover GUI with Shield theme which uses Options Menu animation (ID 4).
2. Go Options->Theme and type theme name BGM to change theme, followed by return.
3. Escape back to main menu and theme changes to BGM theme.
4. Navigate to Options Menu and Options Menu animation (ID 4) from Shield can be seen.
 
If at step 2 I type a theme name which does not have an Options Menu (ID 4) animation,  load that new theme and go to options menu again, there’s no issue. Repeating this step now with either BGM or Shield, the going to options menu shows the correct animation.
 
I’ve looked in to this problem and see the routines to clear out old theme files and load new ones are in the Code already from when Pene worked on it, but I can’t yet figure out how to fix it as the options menu is setup differently to all the options->submenus. I did discover that commenting out the following line does not stop the options menu from running so is this needed?
 
rEFIt_UEFI/refit/menu.c - line #3844
OptionMenu.AnimeRun = GetAnime(&OptionMenu); //FALSE;
Maybe Slice or another dev can look in to this if they have a spare hour?


#45
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,624 posts
  • Gender:Male
  • Location:Moscow

It was old problem named "animations are wrong after change theme" and pene resolve it in two commits.

But now we see those patches are not enough. Some more bugs remain here.

OK, will deep into the problem.

As far as I remember there are not released pointers and released pointers that must be remain.

Initial problem comes from rEFIt programming style that I followed to simplify my life...


Commits 3030 and 3032



#46
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,772 posts
  • Gender:Male
  • Location:UK
Never saw this thread before, but since I have a bug report I'll just re-report it here.

 

Theme=embedded + Timeout=0 == autoboot breaks (default entry highlighted but I need to press enter to boot)

TextOnly=True + Timeout=0 == same

 

Theme=embedded + Timeout=5 == WORKS

Theme=iClover + Timeout=0 == WORKS

Hi Dr Hurt.
 
Your issue is down to the following line of code in rEFIt_UEFI/Platform/Settings.c - line #3171
   GlobalConfig.Timeout = -1;
This line is actioned if the embedded theme is set to be used, chosen either by the user or by Clover if no themes exist. And you will probably know, a timeout setting of -1 instructs Clover to not autoboot any default volume.
 
Commenting this line out results in the expected action when used with a timeout value of 0; autoboot.
 

The only question I have is why is that line in the code? is there something I’ve not taken in to account before suggesting it’s commented out?



#47
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,624 posts
  • Gender:Male
  • Location:Moscow

 

Hi Dr Hurt.
 
Your issue is down to the following line of code in rEFIt_UEFI/Platform/Settings.c - line #3171
   GlobalConfig.Timeout = -1;
This line is actioned if the embedded theme is set to be used, chosen either by the user or by Clover if no themes exist. And you will probably know, a timeout setting of -1 instructs Clover to not autoboot any default volume.
 
Commenting this line out results in the expected action when used with a timeout value of 0; autoboot.
 

The only question I have is why is that line in the code? is there something I’ve not taken in to account before suggesting it’s commented out?

 

Really strange. I don't remember why this line appears. May be the was a problem when switching themes or may be there was overdraft.

Test please on several situation, if all OK then comment out this line. You have access to do this.



#48
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,772 posts
  • Gender:Male
  • Location:UK

Okay. I ran a couple of tests last night and all seemed okay.

Commit r3245



#49
droples

droples

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male

Fast,Timeout,TextOnly,embedded - the different variations there are no problems. Thanks you!

 

Attached File  Archive.zip   42.3KB   4 downloads

 

PS_3246.

Attached File  Theme_10.11.zip   1003.6KB   8 downloads



#50
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,772 posts
  • Gender:Male
  • Location:UK

Thanks for testing droples :)



#51
chris1111

chris1111

    Packager

  • Donators
  • 4,494 posts
  • Gender:Male
  • Location:Montreal Canada
  • Interests:Mac OS X Packaging / scripts

Hi blackosx 

Do you know where comes this error

I try to build my Grower

My last working build is r3244

 

--10.png



#52
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,624 posts
  • Gender:Male
  • Location:Moscow

Hi blackosx 

Do you know where comes this error

I try to build my Grower

My last working build is r3244

 

--10.png

Fixed in 3247.



#53
chris1111

chris1111

    Packager

  • Donators
  • 4,494 posts
  • Gender:Male
  • Location:Montreal Canada
  • Interests:Mac OS X Packaging / scripts

Fixed in 3247.

Thanks thats work



#54
TheRacerMaster

TheRacerMaster

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 840 posts
  • Gender:Male

Clover doesn't properly detect Broadwell CPUs; well, it does, but it automatically assumes it's an i5. Here's a patch that should fix it (should autodetect Broadwell Core M, Core i3, Core i5, Core i7):

Index: rEFIt_UEFI/Platform/cpu.c
===================================================================
--- rEFIt_UEFI/Platform/cpu.c	(revision 3247)
+++ rEFIt_UEFI/Platform/cpu.c	(working copy)
@@ -778,7 +778,18 @@
             }
 						return 0x704;
           case CPU_MODEL_HASWELL_U5:
-            return 0x606;
+            if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) M"))
+              return 0xB06; // Core M
+            if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) i3"))
+              return 0x906; // Core i3 - Apple doesn't use it
+            if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) i5"))
+              return 0x606; // Core i5
+            if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) i7"))
+              return 0x706; // Core i7
+            if (gCPUStructure.Cores <= 2) {
+              return 0x606;
+            }
+            return 0x706;
           case CPU_MODEL_IVY_BRIDGE_E5:
             return 0xA01;
           case CPU_MODEL_ATOM_3700:

Core M CPU type was taken from a MacBook8,1 IOReg dump, which is attached (note: Terminal output, not IORegistryExplorer output). Also attached is a System Information report. A friend with a Broadwell i3 laptop tested it.

Attached Files



#55
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,624 posts
  • Gender:Male
  • Location:Moscow

Clover doesn't properly detect Broadwell CPUs; well, it does, but it automatically assumes it's an i5. Here's a patch that should fix it (should autodetect Broadwell Core M, Core i3, Core i5, Core i7):

Index: rEFIt_UEFI/Platform/cpu.c
===================================================================
--- rEFIt_UEFI/Platform/cpu.c	(revision 3247)
+++ rEFIt_UEFI/Platform/cpu.c	(working copy)
@@ -778,7 +778,18 @@
             }
 						return 0x704;
           case CPU_MODEL_HASWELL_U5:
-            return 0x606;
+            if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) M"))
+              return 0xB06; // Core M
+            if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) i3"))
+              return 0x906; // Core i3 - Apple doesn't use it
+            if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) i5"))
+              return 0x606; // Core i5
+            if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) i7"))
+              return 0x706; // Core i7
+            if (gCPUStructure.Cores <= 2) {
+              return 0x606;
+            }
+            return 0x706;
           case CPU_MODEL_IVY_BRIDGE_E5:
             return 0xA01;
           case CPU_MODEL_ATOM_3700:

Core M CPU type was taken from a MacBook8,1 IOReg dump, which is attached (note: Terminal output, not IORegistryExplorer output). Also attached is a System Information report. A friend with a Broadwell i3 laptop tested it.

Thanks, this is valuable info!

Accepted into 3248.


I can also note this MacBook uses 

"Intel HD Graphics 5300"

"AAPL,ig-platform-id" = 0x161e0001

May be someone found this info usefull.



#56
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,239 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars
The code injected in DSDT by FixDarwin_0002 can be simplified...

Current code injected:
    Name (WXP1, "Windows 2001")
    Method (GET9, 2, NotSerialized)
    {
        CreateByteField (Arg0, Arg1, TCH9)
        Return (TCH9)
    }
    Method (STR9, 2, NotSerialized)
    {
        Name (STR8, Buffer (0x50) {})
        Name (STR9, Buffer (0x50) {})
        Store (Arg0, STR8)
        Store (Arg1, STR9)
        Store (Zero, Local0)
        Store (One, Local1)
        While (Local1)
        {
            Store (GET9 (STR8, Local0), Local1)
            Store (GET9 (STR9, Local0), Local2)
            If (LNotEqual (Local1, Local2)) { Return (Zero) }
            Increment (Local0)
        }
        Return (One)
    }
    Method (OOSI, 1, NotSerialized)
    {
        If (STR9 (WXP1, Arg0)) { Return (One) }
        Return (Zero)
    }
Note: STR9 should have been marked 'Serialized' as it is using globals; not thread-safe.


Simplification:
    Method (OOSI, 1, NotSerialized) { Return (LEqual(Arg0, "Windows 2001")) }


#57
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,624 posts
  • Gender:Male
  • Location:Moscow

It is not "equal", it is "contain substring".

For examle true for "Windows 2001.SP1"



#58
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,239 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

It is not "equal", it is "contain substring".
For examle true for "Windows 2001.SP1"


OK... Not really "contains substring", but rather "starts with"...

Actually, OOSI("Windows 2001.SP1") does not return true.  And it shouldn't either.  The intention is for it to simulate "Windows 2001", not "Windows 2001.SP1" (which according to Microsoft documentation is actually "Windows 2001 SP1" [space vs. dot]).

But I missed the case of OOSI("Windows"), which should return true...
(minor point: spec says to return 0xFFFFFFFF for true, not 1)

Modified code, still simplified, with commments, here:
Method(OOSI, 1)
{
    // simulation target...
    Store("Windows 2001", Local0)
    // longer strings cannot match
    If (LGreater(SizeOf(Arg0), SizeOf(Local0))) { Return (0) }
    // compare only characters specified in the argument       
    CreateField(Local0, 0, ShiftLeft(SizeOf(Arg0),3), CMP1)
    CreateField(Arg0, 0, ShiftLeft(SizeOf(Arg0),3), CMP2)
    Return (LEqual(CMP1,CMP2))
}
BTW, my entire point in looking at this was because I wanted to simulate "Windows 2009" instead of "Windows 2001".
 
So, I use DSDT bin patch (_OSI->XOSI):
 
find:<5f4f5349>
repl:<584f5349>
 
And then an SSDT with XOSI method...
 
Method(XOSI, 1)
{
    Store("Windows 2009", Local0)
    If (LGreater(SizeOf(Arg0), SizeOf(Local0))) { Return (0) }
    CreateField(Local0, 0, ShiftLeft(SizeOf(Arg0),3), CMP1)
    CreateField(Arg0, 0, ShiftLeft(SizeOf(Arg0),3), CMP2)
    Return (LEqual(CMP1,CMP2))
}
Note: Not many DSDTs compare just _OSI("Windows"), so practically, the result is the same.

#59
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,624 posts
  • Gender:Male
  • Location:Moscow

I know that Windows 2001 is rather obsolete and may not be present in modern BIOSes.

But I choose Windows 2001 and not Windows Vista+ because of different drivers models.

Windows XP assumes ACPI model as well as MacOSX up to Maverics and probably higher.

Windows Vista and up assumes WHQL drivers not appeal to ACPI. This is the key difference.

You may find in DSDT compares like 0x07d2 < OS < 0x07d6 but your value 0x07d9 corresponding to newer Windows will be out of range.

 

The same note about Linux. Even though DSDT knows string "Linux" it sets parameters for some ancient version, not as required by real new Linux.

 

I agree that this fix should be revised and I think some customization is required.



#60
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,239 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

I know that Windows 2001 is rather obsolete and may not be present in modern BIOSes.
But I choose Windows 2001 and not Windows Vista+ because of different drivers models.
Windows XP assumes ACPI model as well as MacOSX up to Maverics and probably higher.
Windows Vista and up assumes WHQL drivers not appeal to ACPI. This is the key difference.
You may find in DSDT compares like 0x07d2 < OS < 0x07d6 but your value 0x07d9 corresponding to newer Windows will be out of range.
 
The same note about Linux. Even though DSDT knows string "Linux" it sets parameters for some ancient version, not as required by real new Linux.
 
I agree that this fix should be revised and I think some customization is required.


The correct value to use really depends on what the DSDT is doing... after careful review of all conditionals in the DSDT/SSDTs.

It would be nice if the patch offered by Clover provided a way to customize the comparison string instead of it being hard-coded.

But my method works fine too and has the same result (nice the binpatch capability for DSDT... Simple/reliable/flexible).






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy