#120 ACPI issues

Open
opened 4 months ago by mscarav · 5 comments
mscarav commented 4 months ago

On X200 with Libreboot 20220710 running Debian Bullseye I loose the battery icon (cannot see charge status), cannot adjust screen brightness with Fn keys, power management does not work and the system hangs on reboot or shutdown with ACPI error message AE_NOT_FOUND. Everything works well downgrading back to 20160907.

On X200 with Libreboot 20220710 running Debian Bullseye I loose the battery icon (cannot see charge status), cannot adjust screen brightness with Fn keys, power management does not work and the system hangs on reboot or shutdown with ACPI error message AE_NOT_FOUND. Everything works well downgrading back to 20160907.
Leah Rowe commented 2 weeks ago
Owner

can you test this on latest coreboot?

i want to see if upstream has this bug or just us

can you test this on latest coreboot? i want to see if upstream has this bug or just us
mscarav commented 2 weeks ago
Poster

Hi,

I would like to help but I don't have any experience with coreboot and I don't know how to compile it for Thinkpad X200. I will gladly follow instructions though.

Hi, I would like to help but I don't have any experience with coreboot and I don't know how to compile it for Thinkpad X200. I will gladly follow instructions though.

You can follow this guide. It's a little technical and more geared towards developers so here are instructions based on that guide ↓.


Make sure to set the correct configuration, similar to libreboot's config. That mostly involves selecting the correct board (X200 in your case), payload (use SeaBIOS. GNU GRUB requires configuration), using native graphics initialisation, including the microcode, using corebootfb instead of the legacy VGA text mode and setting the right ROM chip size.

To get the ROM chip size, just run in a shell:

$ sudo dmidecode | grep "ROM Size"

We'll need this later on.

First, download the coreboot source code:

$ git clone https://review.coreboot.org/coreboot
$ cd coreboot

Then, configure coreboot, like so:

$ make menuconfig # This loads a menu to 
                  # configure coreboot
Mainboard  --->
  Mainboard vendor  --->
    Lenovo
  Mainboard model  --->
    ThinkPad X200
  ROM chip size --->
    # Set it to the ROM size returned by the 
    # dmidecode command you ran earlier. 
    # If it returned 
    # 'ROM size: 8 MB' for example, then set 
    # this option to '8192 KB (8 MB)'.
Devices  --->
  [*] Use native graphics initialization
  Display --->
    Framebuffer mode --->
      Linear "high-resolution" framebuffer
Payload  --->
  Add a payload  --->
    SeaBIOS

You then need to build the coreboot toolchain which is required to compile coreboot itself. This is going to take a very long time so be patient!

$ make crossgcc-i386 CPUS=$(nproc)

After that command finished, you can then begin building coreboot itself. This ironically takes less time. Run this command:

$ make

And you're done! Now you can flash coreboot:

$ sudo flashrom -p internal -r "~/dump1.bin" # Backups
$ sudo flashrom -p internal -r "~/dump2.bin"
$ sudo flashrom -p internal -r "~/dump3.bin"
$ diff "~/dump1.bin" "~/dump2.bin" # If this returns an 
$ diff "~/dump2.bin" "~/dump3.bin" # output, stop there 
                                   # and tell us.
$ sudo flashrom -p internal -w build/coreboot.rom

Then turn off your computer, wait for ~1 minute, then turn it back on and reproduce the bug. If it's still present, tell us.

@vimuser We should try documenting a way to use the latest coreboot revision while still using lbmk on the website.

You can follow [this](https://doc.coreboot.org/tutorial/part1.html) guide. It's a little technical and more geared towards developers so here are instructions based on that guide ↓. ----- Make sure to set the correct configuration, similar to libreboot's config. That mostly involves selecting the correct board (X200 in your case), payload (use SeaBIOS. GNU GRUB requires configuration), using native graphics initialisation, including the microcode, using corebootfb instead of the legacy VGA text mode and setting the right ROM chip size. To get the ROM chip size, just run in a shell: ``` $ sudo dmidecode | grep "ROM Size" ``` We'll need this later on. First, download the coreboot source code: ``` $ git clone https://review.coreboot.org/coreboot $ cd coreboot ``` Then, configure coreboot, like so: ``` $ make menuconfig # This loads a menu to # configure coreboot ``` ```plain Mainboard ---> Mainboard vendor ---> Lenovo Mainboard model ---> ThinkPad X200 ROM chip size ---> # Set it to the ROM size returned by the # dmidecode command you ran earlier. # If it returned # 'ROM size: 8 MB' for example, then set # this option to '8192 KB (8 MB)'. Devices ---> [*] Use native graphics initialization Display ---> Framebuffer mode ---> Linear "high-resolution" framebuffer Payload ---> Add a payload ---> SeaBIOS ``` You then need to build the coreboot toolchain which is required to compile coreboot itself. This is going to take a very long time so be patient! ``` $ make crossgcc-i386 CPUS=$(nproc) ``` After that command finished, you can then begin building coreboot itself. This ironically takes less time. Run this command: ``` $ make ``` And you're done! Now you can flash coreboot: ``` $ sudo flashrom -p internal -r "~/dump1.bin" # Backups $ sudo flashrom -p internal -r "~/dump2.bin" $ sudo flashrom -p internal -r "~/dump3.bin" $ diff "~/dump1.bin" "~/dump2.bin" # If this returns an $ diff "~/dump2.bin" "~/dump3.bin" # output, stop there # and tell us. $ sudo flashrom -p internal -w build/coreboot.rom ``` Then turn off your computer, wait for ~1 minute, then turn it back on and reproduce the bug. If it's still present, tell us. @vimuser We should try documenting a way to use the latest coreboot revision while still using lbmk on the website.

Oh wait. First, do you have an external programmer for flashing externally? If not then I highly recommend buying one just in case something goes wrong.

Oh wait. First, do you have an external programmer for flashing externally? If not then I highly recommend buying one just in case something goes wrong.
mscarav commented 1 day ago
Poster

Hi,

I have an external programmer for flashing and I followed the instructions above to configure coreboot. However, I would like to ask a few questions before I proceed with flashing (to make sure I do everything correctly).

With the command make menuconfig, I get to the section Devices ---> but I don't see the option [*] Use native graphics initialization

rather, I have

Graphics initialization (use libgfxinit) 

and then [ ] Use onboard VGA as primary video device

  1. Is libgfxinit ok (other options are ()run VGA Option ROMs or ()None)? Should I select the onboard VGA as primary device?

  2. From the instructions provided I assume that all the other sections of the configuration menu that are not specified should be left as default. Is that correct?

  3. After obtaining the coreboot.rom with the command make, can I set the MAC address as I did for the libreboot rom with ich9gen? Is it necessary to do this?

Hi, I have an external programmer for flashing and I followed the instructions above to configure coreboot. However, I would like to ask a few questions before I proceed with flashing (to make sure I do everything correctly). With the command make menuconfig, I get to the section Devices ---> but I don't see the option [*] Use native graphics initialization rather, I have Graphics initialization (use libgfxinit) and then [ ] Use onboard VGA as primary video device 1. Is libgfxinit ok (other options are ()run VGA Option ROMs or ()None)? Should I select the onboard VGA as primary device? 2. From the instructions provided I assume that all the other sections of the configuration menu that are not specified should be left as default. Is that correct? 3. After obtaining the coreboot.rom with the command make, can I set the MAC address as I did for the libreboot rom with ich9gen? Is it necessary to do this?
Sign in to join this conversation.
No Label
No Milestone
No assignee
3 Participants
Loading...
Cancel
Save
There is no content yet.