jertel/p37-ec

Not working on Gigabyte Aero 15 2020

crispy-cat opened this issue · 20 comments

I compiled as specified in the README. When I run the binary it gives me the error Unable to initialize embedded controller; did you forget to use sudo?, even though I used sudo. I'm running Ubuntu 20.04.

Check for a device called ec under the /sys tree. The newer laptops may use a different kernel module.

Ex:

/sys/kernel/debug/ec/ec0/io

There appears to be one, what now?

Does it match that example path in my previous message? If so, can run this and see if you get hex output:

sudo hexdump -C /sys/kernel/debug/ec/ec0/io

Yes, the paths match. The command returned hexdump: /sys/kernel/debug/ec/ec0/io: Operation not permitted

Seems like you have some permission issues going on. Are you able to sudo to root, and then try it as root user?

I tried that too, same thing

You could try booting to an Ubuntu 18.04 live session and see if perhaps something in the newer Ubuntu 20 release is locking down IO devices. I've not tried this utility on Ubuntu 20.

I'll try this later and let you know the results

I was unable to get 18.04 to boot to a live session for some reason..

Out of curiosity I ran ls in the /sys/kernel/debug/ directory and I don't see ec anywhere. Would it be any of these:
image

If you rebooted you might need to run sudo modprobe ec_sys write_support=1 for that device to show up.

Ah, there it is. I tried running the program again, but same result. Is there a way to debug this?

The steps I'm walking you through is the way to debug this. The program is using the same commands I'm suggesting you run directly at the console. There is no difference. Once you can hexdump the ec0/io file descriptor the program will begin working.

Did you get 18.04 working? I am unsure of which OS you were using in the last screenshot you sent.

I tried upgrading to 20.10 in case that fixed it, but it didn't. No matter what I try I can't get 18.04 to boot. I'm using the same USB drive I used to install 20.04, with a fresh GPT and FAT32 partition. I used unetbootin to write the files from an ISO downloaded from the Ubuntu site. Is there a different tool I should use? I used Rufus to write the 20.04 files but it's not available for Linux.

I don't know what's going on with your 18.04 boot issue, but you could try disabling secureboot in your BIOS, and see if the hexdump command works.

I used a Rufus in a VM and I was able to boot fine, but I was getting a ton of IO errors and couldn't run the modprobe command. I couldn't even launch gedit.

Did you try Ubuntu 20.04 with Secureboot disabled? There's another issue opened today from another Aero user that is using Manjaro with some success, so perhaps check with that person to see if you can figure out what's going on with your Aero.

My understanding is that if I disable secure boot I can't use the nvidia drivers, in which case I might as well have gotten a 'normal' laptop, so I really don't want to do this unless this isn't true in which case I will gladly save myself the hassle of key enrollment since that level of security isn't very necessary for me. I'll definitely take a look at that issue. It also occurred to me that I could possibly install 18.04 to another flash drive and boot from it.

The newer kernels lock down debugfs when secureboot is enabled, so if Ubuntu 20 has a new enough kernel then it probably is causing this. Older Ubuntu's wouldn't have that locked down so that's why I suggested 18.04 or disabling secureboot.

image
Wawaweewa it's working and blender still sees my GPU! It appears this issue has been resolved.