nparafe has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nparafe has joined #beagle
Shadyman has joined #beagle
TheConceptBoy has joined #beagle
<TheConceptBoy> Good day, everyone.
<TheConceptBoy> I'm trying to figure out the next course of action. I have this project I worked on using Python and Pygame on Raspberry Pi 4. Due to the chip shortage I am forced to look into other options for a linux based SoC to run my project on and I landed on Beaglebone black. I am currently trying to get my project running on it but it seems that, based on
<TheConceptBoy> the input from the pygame userbase, it will require a whole lot of stuff I have no idea about like ,recompile SDL2 from source, recompiling Pygame from source to use a different frame buffer,  install all the dependencies for evdev/kmsdrm/input/directfb et cetera.
<zmatt> recompiling all that is needed? o.O
<zmatt> wtf
<TheConceptBoy> See, I don't know if that is true or not
<TheConceptBoy> for all I know that's what i have to do
<zmatt> I don't really know anything about SDL... with qt5 you can just select the desired backend using environment variables
<TheConceptBoy> At this point I am wondering, would it not be easier to just.... not use pygame and just recode my project using something else that just works natively on beaglebone? What would that be? I only used pygame to display simple text, rectabled, simple textures
<TheConceptBoy> qt5
<TheConceptBoy> There was one thing that pygame offered, and that is post processing, it's almost shader like, where I could create chromatic abberation and screen distoprtion effect
<TheConceptBoy> qt is a software framework so I don't know if it's possible to do that sort of stuff there
<zmatt> "You can set the environment variable "SDL_VIDEODRIVER" to the name of the driver you want to use."
<TheConceptBoy> Is that in regards to pygame?
<zmatt> for sdl yeah
<TheConceptBoy> Oh I need to also point out that I was using headless rasbian.
<TheConceptBoy> so no gui, just console.
<TheConceptBoy> when I launched my pygame application, it just shows up fullscreen
<zmatt> sounds like it was already using one of the framebuffer backends then
<TheConceptBoy> So now I was trying to run it on beaglebone IoT but it doesn't show the game window
<TheConceptBoy> I put together a quick python application to cycle through a list of display drivers to determine which one beaglebone IoT was using
<TheConceptBoy> This was the output
<TheConceptBoy> This was the script
<zmatt> most of those are sdl1, sdl2 video drivers on linux are x11, wayland, kmsdrm, and directfb ... kmsdrm should be the correct one
<TheConceptBoy> It basically just cycled through a list of possible display drivers supported by SDL2, which pygame used. and attempted to run
<TheConceptBoy> kmsdrm
<TheConceptBoy> That's what I figured the best option is
<TheConceptBoy> it's not installed on beaglebone IoT however
<TheConceptBoy> but beaglebone black still outputs an HDMI signal so some sort of display framebuffer must be involved
<zmatt> I would assume these are built into libsdl, not separate installables
<TheConceptBoy> That I honestly have no idea
<zmatt> yeah I don't see any separate libsdl2 packages for individual video backends
<TheConceptBoy> So what does that mean that it's built into libsdl2?
<TheConceptBoy> as in what does that imply in relation to my issue?
<zmatt> btw are you using debian buster or debian bullseye?
<TheConceptBoy> let me check
<set_> Hello.
<TheConceptBoy> buster console image 2022-11-01
<zmatt> TheConceptBoy: just to confirm, /dev/dri/card0 exists?
<TheConceptBoy> I was trying to save on as much processing as possible by not running the desktop envrionement,
<TheConceptBoy> let me check
<zmatt> debian bullseye has a newer version of libsdl (and other packages) than debian buster, so it may be worth trying a debian bullseye (iot or minimal) image from https://forum.beagleboard.org/t/debian-11-x-bullseye-monthly-snapshots/31280
<TheConceptBoy> Confimed dev/dri/card0 exists
<zmatt> my current intuition says maybe sdl's kmsdrm backend doesn't like the tilcdc kernel driver for some reason (probably a dumb reason)
<TheConceptBoy> Is I see
<TheConceptBoy> Ok so I should try iOT or minimal instead
<TheConceptBoy> which wone do you recomend I start with?
<zmatt> using strace to trace kernel syscalls may be informative, although you'd preferably want to do that on some minimal sdl example written in C/C++ rather than something like pygame... but trying a newer sdl version by using bullseye may be a better thing to start with since maybe the issue is already fixed
<zmatt> if you're comfortable with installing whatever debian packages you need using apt, I'd start with minimal. the iot image comes with a bunch of stuff preinstalled which may not be relevant to you at all and just wastes disk space
<TheConceptBoy> gotcha, I'll start with minimal
<TheConceptBoy> At this junction I either have to try to get pygame running, or I need to use something else like perhaps Adafruit GFX.
<TheConceptBoy> Can GFX be rendered to HDMI?
<TheConceptBoy> or will I have to use some SPI screen?
<zmatt> I've never heard of "adafruit gfx" ... in my experience, most adafruit stuff for the beaglebone is of dubioous quality
<TheConceptBoy> Ah gotcha
<TheConceptBoy> Adafruit GFX is a custom graphics library, used most frequently to write text and deaphical interface to SPI driver displays
<zmatt> you shouldn't need anything special, if sdl kmsdrm isn't working on the beaglebone that's a bug in sdl
<zmatt> (or a bug in *some* library anyway)
<set_> Is someone trying to use the GPU on the BBB or is not what this is about right now?
<zmatt> this has nothing to do with the gpu
<set_> Oh.
<set_> No issue.
<set_> If the kernel has it loaded, pre installed on the image, user space allows for accessing many things.
<set_> For instance, I would need to account for a file in user space when accessing, what @zmatt said about strace, usable kernel modules.
<zmatt> wtf are you talking about
<set_> SDL2 gives issues to everyone who uses it.
xet7 has quit [Remote host closed the connection]
<set_> It is not an issue w/ SDL2 or a backend. I found that kiosk mode is available somehow.
<set_> Now, did I remember or account for this change. No. But, I like this subject. I do not want to see it die just yet.
<zmatt> ???
<set_> @zmatt, I thought you guys were having trouble w/ promoting a kiosk mode type setting.
xet7 has joined #beagle
<zmatt> wtf is "kiosk mode"? what are you talking about?
<set_> It could be a floating captured graphic or whatever graphic.
<set_> Kiosk mode, is just a term for screen w/ graphics only.
<TheConceptBoy> installing the dependencies on minimal
<TheConceptBoy> anyone ever tried to replace the 4gb onboard emmc with a larger capacity?
<set_> Yes.
<set_> I saw one person to it.
<set_> I saw one person do it but did they make it work, no clue.
<zmatt> I guess if you're comfortable reworking bga chips you could just swap it out
<zmatt> and hope the board survives :P
<zmatt> not sure why you'd want to, 4G is a lot of space
<TheConceptBoy> buster minimal doesn't fit on the mmc
<zmatt> what? yes it does
<TheConceptBoy> or at least that forum page did not provide an option
<TheConceptBoy> I assume that if they don't provide a download then it didn't work out?
<zmatt> there's no "buster minimal" image btw, do you mean buster console?
<TheConceptBoy> my mistake
<TheConceptBoy> Debian 11.x (Bullseye) Minimal Snapshot
<TheConceptBoy> the only options I see there for minimal is microSD
<TheConceptBoy> so it runs off the microsd
<TheConceptBoy> On the side note. Something I noticed
<zmatt> for bullseye there's no flasher images for some reason, you need to boot from sd card, log in, do "sudo enable-beagle-flasher" and then reboot
<TheConceptBoy> oh
<TheConceptBoy> I see
<zmatt> this is mentioned in the post
<TheConceptBoy> so you do it manually
<TheConceptBoy> yeah I read that part but I did not comprehand
<TheConceptBoy> what it was reffering to
<zmatt> yeah there's a weird mistaken comment in that section it seems
<TheConceptBoy> On the side note. How come I cannot download pip for python3 using sudo apt-get install python3-pip until I do sudo apt-get update
<TheConceptBoy> I know that pip usually comes with python
<TheConceptBoy> but not in this minimal release
<TheConceptBoy> I have to install pip manually and the command to do so:
<TheConceptBoy> sudo apt-get install python3-pip
<TheConceptBoy> was failing
<TheConceptBoy> until I updated using sudo apt-get update
<zmatt> that's just how apt works, you need to do apt-get update occasionally to download the package lists, and in particular need to do it at least once to begin with
<TheConceptBoy> Oh
<TheConceptBoy> package list is stored locally
<TheConceptBoy> I see
<TheConceptBoy> that's why it said it could not find package
<TheConceptBoy> sudo apt-get update retreives a new up to date package list
<zmatt> yep
<TheConceptBoy> gotcha
<TheConceptBoy> OH
<TheConceptBoy> HOLY
<TheConceptBoy> hold on
<TheConceptBoy> the driver test didn't fail
<TheConceptBoy> it stopped on kmsdrm
<TheConceptBoy> could it
<TheConceptBoy> could it possibly be salvation?
<TheConceptBoy> Ok now I need to set up the actual game project
<zmatt> \o\
<zmatt> /o/
<zmatt> \o/
<TheConceptBoy> brb
<zmatt> that's the best kind of debugging... when you don't actually have to do it because the issue has already been fixed
<TheConceptBoy> lol
starblue has quit [Ping timeout: 252 seconds]
starblue has joined #beagle
<TheConceptBoy> ok
<TheConceptBoy> looks like I'm on the last few dependencies left
<TheConceptBoy> gotta give user permission to use i2c-2 port
<TheConceptBoy> this used to work, I tried debian@BeagleBone:~$ chmod g+rw /dev/i2c-2
<TheConceptBoy> but even though it goes through, python still says user permissions denied
<TheConceptBoy> debian@BeagleBone:~$ ls -l /dev/i2c-2
<zmatt> what does "ls -l /dev/i2c-2" show?
<TheConceptBoy> crw-rw---- 1 root root 89, 2 Nov 23 03:16 /dev/i2c-2
<zmatt> looks like a missing udev rule
<TheConceptBoy> I'm not familliar with what udev is
<zmatt> the thing that, among other things, is responsible for setting device permissions
<TheConceptBoy> I see
<TheConceptBoy> looking at the documentation page for this
<TheConceptBoy> sudo cp /usr/share/ddcutil/data/45-ddcutil-i2c.rules /etc/udev/rules.d
<zmatt> you're looking at documentation for a random utility
<TheConceptBoy> I figured the url address looked unfammiliar
<TheConceptBoy> sudo chown :i2c /dev/i2c-2
<TheConceptBoy> did the job
<zmatt> I see the problem
<zmatt> mabye
<zmatt> never mind
<zmatt> hold on let me test something
<zmatt> TheConceptBoy: so you don't have an /etc/udev/rules.d/80-i2c-noroot.rules file?
<TheConceptBoy> This is a fresh installation of minimal so if it doesn't come with one already then no
<zmatt> I am asking whether it comes with one
<TheConceptBoy> I do see it there
<zmatt> can you pastebin its contents?
<TheConceptBoy> sure thing
<zmatt> huh, that looks like it should change the group of the device to gpio, so why didn't that happen....
<TheConceptBoy> the reason would escape me even if it was staring me in the face
<TheConceptBoy> but that last command did stop the permission error
<TheConceptBoy> so now I's onto the last stretch
<zmatt> that's not persistent across reboot though
<TheConceptBoy> huh let me try
<TheConceptBoy> youre right
<TheConceptBoy> just got the error again
<zmatt> the exact same udev rule is working fine on my beaglebone, so I don't really get what's going on
<TheConceptBoy> literally didn't change that file at all aside from doing:
<TheConceptBoy> sudo groupadd i2c-2
<zmatt> it's written a bit weirdly (normally conditions like ACTION=="add" should be before actions like GROUP="i2c") but I don't see how that could matter
<zmatt> that command is nonsense
<TheConceptBoy> it's from here
<zmatt> TheConceptBoy: can you pastebin the output of: udevadm info -a /dev/i2c-2
<zmatt> oh, huh
<zmatt> no that should still be fine
<zmatt> and: udevadm info /dev/i2c-2
<TheConceptBoy> oops
<TheConceptBoy> copied a bunch of stuff that's not needed
<TheConceptBoy> one second
<TheConceptBoy> PS according to all the google results, to get into the super user, no password is requires
<TheConceptBoy> and yet it asks for one
<zmatt> wait hold on
<zmatt> uhh, then I don't know what you've been googling or what you've found
<zmatt> a password is always required
<zmatt> but hold on, I'm doing some testing on my beaglebone
<TheConceptBoy> By default, no password is required to log in as root, but if you’ve defined one, you’re prompted to type it.
<TheConceptBoy> but then again
<TheConceptBoy> article from 2016
<zmatt> TheConceptBoy: that.
<TheConceptBoy>  ugh
<TheConceptBoy> for all the benefits the internet brings us, outdated documentation is not one of them
<TheConceptBoy> lol
<TheConceptBoy> I have absolutely no ide how I managed to grant user permissions to i2c-2 port last time but I certainly don't remember messing with the udev file
<TheConceptBoy> I miss arduino
<zmatt> this is 100% an udev rule issue
<zmatt> normally you should have access by default to i2c on beaglebone images, this is a bug
<zmatt> in the bullseye image
<zmatt> I'm trying to figure out what might be going on
<TheConceptBoy> I see
<TheConceptBoy> On rasbian we have to manually go into the configuration and enable i2c, perhaps the same was adopted for bb?
<TheConceptBoy> users's job to only enable ports that users need
<zmatt> no it's just a broken udev rule
<zmatt> I think I may be onto it
<zmatt> I've reproduced the issue, just hold while I figure this out
<TheConceptBoy> yeppers
<TheConceptBoy> after this there's one more thing before I think it'll launch
<zmatt> ohhhhhhhhhhh d'oh, 80-i2c-noroot.rules has nothing to do with this
<zmatt> sudo apt-get install i2c-tools
<zmatt> TheConceptBoy: the i2c-tools package includes an udev rule that sets up the permissions of /dev/i2c-* and my guess would be that this package is missing from the minimal image
<TheConceptBoy> installed
<TheConceptBoy> rebooting to test
<TheConceptBoy> it was indeed one of the steps I missed
<zmatt> I'm honestly not even sure what 80-i2c-noroot.rules is supposed to accomplish
<TheConceptBoy> ok it's no longer complaining
<TheConceptBoy> last thing is the video error
<TheConceptBoy> video system not initalized
<zmatt> from what?
<TheConceptBoy> oygame.error: Video System not initialized
<TheConceptBoy> pygame*
<zmatt> stackoverflow says you may have forgotten pygame.init() ?
<zmatt> I don't know anything about pygame so I'm no more useful than google is for this
<TheConceptBoy> I can consult the pygame discord
<TheConceptBoy> might be able to get continuation there.
<TheConceptBoy> As the problem if video drivers is resolved now
<TheConceptBoy> thank you very much btw
<TheConceptBoy> I don't know what I would have done without you
<zmatt> it's now successfully loading the kmsdrm video driver?
<TheConceptBoy> KK
<TheConceptBoy> UJ
<TheConceptBoy> pp[s
<TheConceptBoy> oops
<zmatt> cat on keyboard?
<TheConceptBoy> face on the keyboard
<TheConceptBoy> It's not complaining about it
<TheConceptBoy> the driver that is.. not the face
<TheConceptBoy> I did
<TheConceptBoy> os.putenv('SDL_VIDEODRIVER', 'kmsdrm')
<zmatt> ok!
<TheConceptBoy> Oh btw
<TheConceptBoy> what does it mean when the comand line just looks like this
<TheConceptBoy> >
<zmatt> incomplete command, it's waiting for more input
<TheConceptBoy> aah
<TheConceptBoy> any way to terminate?
<zmatt> like, if you press enter with an unclosed { or whatever
<zmatt> ctrl-C
<TheConceptBoy> esc or ctrl+C don't work
<TheConceptBoy> n
<TheConceptBoy> oops wrong keyboard
<TheConceptBoy> got it
<TheConceptBoy> thank you
vagrantc has joined #beagle
ikarso has joined #beagle
ft has quit [Quit: leaving]
rob_w has joined #beagle
vagrantc has quit [Quit: leaving]
renrelkha has quit [Quit: bye]
renrelkha has joined #beagle
tbr has quit [Read error: Software caused connection abort]
tbr has joined #beagle
kveremitz has quit [Read error: Software caused connection abort]
Shadyman has quit [Remote host closed the connection]
kveremitz has joined #beagle
jfsimon1981_b has joined #beagle
starblue has quit [Ping timeout: 268 seconds]
starblue has joined #beagle
otisolsen70 has joined #beagle
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #beagle
rob_w has quit [Ping timeout: 256 seconds]
rob_w has joined #beagle
jfsimon1981_b has quit [Quit: Leaving]
TheConceptBoy has quit [Quit: Client closed]
jfsimon1981_b has joined #beagle
jfsimon1981_b has quit [Ping timeout: 255 seconds]
jfsimon1981_b has joined #beagle
jfsimon1981_b has quit [Remote host closed the connection]
jfsimon1981_b has joined #beagle
jfsimon1981_b has quit [Remote host closed the connection]
jfsimon1981_b has joined #beagle
jfsimon1981_b has quit [Remote host closed the connection]
jfsimon1981_b has joined #beagle
jfsimon1981_b has quit [Remote host closed the connection]
rob_w has quit [Ping timeout: 260 seconds]
jfsimon1981_b has joined #beagle
otisolsen70 has quit [Quit: Leaving]
otisolsen70 has joined #beagle
ikarso has quit [Quit: Connection closed for inactivity]
vagrantc has joined #beagle
florian has quit [Quit: Ex-Chat]
buzzmarshall has joined #beagle
behanw has joined #beagle
buckket1 has quit [Quit: buckket1]
xet7 has quit [Remote host closed the connection]
xet7 has joined #beagle
buckket has joined #beagle
Archana has joined #beagle
set_ has quit [Ping timeout: 268 seconds]
Archana has quit [Remote host closed the connection]
set_ has joined #beagle
ft has joined #beagle
otisolsen70 has quit [Quit: Leaving]
TheConceptBoy has joined #beagle
<TheConceptBoy> Good day, again
<TheConceptBoy> I've gotten a bit of progress in getting my pygame project running on beaglebone. This issue may or may not be related with pygame, which means I may or may not find the answer here but I thought I'
<TheConceptBoy> i'd try
<TheConceptBoy> I've gotten most of the errors resolved. The pygame actually runs if I sed the sdl video driver envirionment variable to dummy, which of course, doesn't make the application window appear, but I can hear it play sound and effects based on what I know is supposed to happen
<TheConceptBoy> I'm honestly thinking of just re-writing the visual end with something else
<TheConceptBoy> Something that just works on beaglebone out of the box
<TheConceptBoy> What can I use to make this text based game with? QT is one solution
<zmatt> ugh, gbm stuff again... I'm not really sure how this stuff is *supposed* to work or why it doesn't just.... work. I think gbm is trying to load a driver-specific shared library for buffer allocation or something, though I don't really understand why since tilcdc supports the generic driver-independent buffer allocation ("dumb buffer") kernel api
<TheConceptBoy> This may be why I was told I'
<TheConceptBoy> I'd have to recompile pygame from source
<zmatt> this has nothing to do with pygame
<zmatt> recompiling pygame would get you absolutely nothing
<TheConceptBoy> Me not being able to tell the difference if it does or not certainly doesn't bode well
<TheConceptBoy> Ok so - to be honest - this is a text based game with only a few quirks like screen distortion for aestetic
<TheConceptBoy> Most of the code is just python moving data between dictionary key value pairs
<TheConceptBoy> What else can I make use to build a GUI application for debian minimum?
<zmatt> I don't really have advice to offer, I haven't done any gui development in the last decade
<zmatt> I don't understand why shit like this _still_ doesn't JUST WORK
<TheConceptBoy> I'm honestly considering just running an SPI display through python and Adafruit GFX library
<TheConceptBoy> and completely forgetting about onboard hdmi
<zmatt> it looks like gbm tries to use the internal backend by default and if this fails it falls back to trying to load an external backend, which ends up giving that error (since no such external backend exists or has any reason to exist), so the question is why the internal backend fails
<zmatt> but that internal backend looks like a maze of indirection
<zmatt> and it all seems to be integrated with stuff for opengl which we don't have, need, or care about
<zmatt> I don't understand why buffer allocation has to be such a complex mess