Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Code Fails with "Invalid Argument" #2

Open
filtoid opened this issue Oct 23, 2019 · 2 comments
Open

Example Code Fails with "Invalid Argument" #2

filtoid opened this issue Oct 23, 2019 · 2 comments

Comments

@filtoid
Copy link

filtoid commented Oct 23, 2019

When running the code on a Raspberry Pi the code errors with an error string of "Invalid Argument".

From a bit of Googling and looking at the code it seems that mmap may no longer be supported. Here was the clearest explanation I found: https://stackoverflow.com/questions/22915778/mmap-dev-fb0-fails-with-invalid-argument

@kaey
Copy link
Owner

kaey commented Oct 23, 2019

Linux does not remove apis, maybe your kernel is configured differently though. Try to regenerate defs.go on your rpi first go tool cgo -godefs _defs_source.go | gofmt > defs.go. If that doesn't help you're on your own. I had no idea what I was doing when I wrote this, I still have no idea how drm/fbdev/virtual console all interact with each other and I never used this lib myself.
You may also have better luck with drm (https://github.com/NeowayLabs/drm for example)

@maxim0r
Copy link

maxim0r commented Dec 5, 2020

I have the same problem. This is because the type uintptr for fixedScreenInfo.Smem_start has different lengths on amd64 and armv7, 8 vs 4 bytes. But the type is specified exactly as uint64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants