Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

FAT32 SHAMER posted:

last weekend I uninstalled Bazzite and went back to windows after having dumb issues with Helldivers 2. did some reading over the week while experiencing new and exciting issues with the game, this time on windows, and realised I need to see if I have the same issues in a different distro or image and then potentially dehumanise myself and face to Win11. installed Nobara tonight, mostly since it’s a low-touch gaming distro that had a handy welcome app that installed a bunch of crap that I hadn’t bothered to try yet (like proton ge since it made the steam window dance around and have weird onClick positioning). then it installed Nvidia drivers for me, with the latest version. I installed HD2 and squad and both ran better than on Bazzite, which already ran games better than on windows. and there was even my beloved gnome variant :3:

once work starts slowing down I’d like to tweak around a bit more with stuff and straight up keep windows off the new machine I’m building

edit: I don’t actually remember if it had been established that the other thread was the Linux gaming thread or not

A strange game. The only winning move is not to install.

Adbot
ADBOT LOVES YOU

ziasquinn
Jan 1, 2006

Fallen Rib

FAT32 SHAMER posted:

last weekend I uninstalled Bazzite and went back to windows after having dumb issues with Helldivers 2. did some reading over the week while experiencing new and exciting issues with the game, this time on windows, and realised I need to see if I have the same issues in a different distro or image and then potentially dehumanise myself and face to Win11. installed Nobara tonight, mostly since it’s a low-touch gaming distro that had a handy welcome app that installed a bunch of crap that I hadn’t bothered to try yet (like proton ge since it made the steam window dance around and have weird onClick positioning). then it installed Nvidia drivers for me, with the latest version. I installed HD2 and squad and both ran better than on Bazzite, which already ran games better than on windows. and there was even my beloved gnome variant :3:

once work starts slowing down I’d like to tweak around a bit more with stuff and straight up keep windows off the new machine I’m building

edit: I don’t actually remember if it had been established that the other thread was the Linux gaming thread or not

you just gotta go deep and never reinstall windows. just keep reinstalling linux if you can't fix it. do it for a year and you'll be like "wow, what a waste of time! I learned so much!"

at least reinstalling linux only takes like 10 minutes.

Cybernetic Vermin
Apr 18, 2005

seeing how one of the first things one would reasonably be expected to learn from that experience would be the futility to keep reinstalling linux i think the people who do it are impossible to educate

spankmeister
Jun 15, 2008






I haven't reinstalled windows on any of my machines since idk, win7? XP SP2 maybe?

Sapozhnik
Jan 2, 2005

Nap Ghost
nvk soon, trust the plan

BlankSystemDaemon
Mar 13, 2009



spankmeister posted:

I haven't reinstalled windows on any of my machines since idk, win7? XP SP2 maybe?
Windows XP pre-SP2 (and especially pre-SP1) was such an utter shitshow, though - it's what drove me to try out Linux.

Linux had lovely documentation, so someone burned the hot-off-the-presses FreeBSD 4.0 ISO, and printed the manual for me on paper (at a university, where the printers weren't secured properly if you had CUPS) - which leads right up to today, since I never stopped using it.

outhole surfer
Mar 18, 2003

reinstall windows is a legit fix for linux with embarrassing frequency, since windows update often updates device firmwares

fixed my rig ally's sound by installing windows, running updates, then reinstalling linux

Tankakern
Jul 25, 2007

we got fwupd now

FlapYoJacks
Feb 12, 2009
I bought a Legion Go, and surprisingly, BazziteOS, works perfectly and gives an additional 1 - 3 hours of battery life. Everything works OOB: even HDR, sleep, the joysticks, and sound.

How the hell does Windows somehow get worse battery life than Windows? :psyduck:

FlapYoJacks fucked around with this message at 16:36 on May 17, 2024

outhole surfer
Mar 18, 2003

i need to try bazzite. i use chimeraos today and have sleep issues. the ally *appears* to sleep, but if you put it in a bag for a couple hours you'll find it toasty as gently caress with a drained battery

it boots in no time, so i make sure to just power it off, but auto hibernate seems like low hanging fruit for a distro to implement

psiox
Oct 15, 2001

Babylon 5 Street Team
oh man, I just got one of those GPD devices when it was being talked about earlier in some thread and first tried Nobara on it because it's maintained by a person that also does good Proton releases. That was a mistake because one person cannot maintain a good distro, so after fighting with it for a week I went to Bazzite and it is absolutely flawless out of the box. I mean, I wish I could tune TDP more but it's a very new device and I can only hope that things work better eventually. But it's leaps and bounds more functional than Nobara was, and plus it's not named after an anime or something.

ryanrs
Jul 12, 2011

I found good DRM example code!

https://github.com/dvdhrm/docs/tree/master/drm-howto
- modeset.c
- modeset-double-buffered.c
- modeset-vsync.c
- modeset-atomic.c

Builds and runs cleanly on a Raspberry Pi Zero 2 W with RPi OS Lite 32-bit.

You probably need this library:
$ sudo apt install libdrm-dev

Colonel Taint
Mar 14, 2004


ryanrs posted:

I found good DRM example code!

https://github.com/dvdhrm/docs/tree/master/drm-howto
- modeset.c
- modeset-double-buffered.c
- modeset-vsync.c
- modeset-atomic.c

Builds and runs cleanly on a Raspberry Pi Zero 2 W with RPi OS Lite 32-bit.

You probably need this library:
$ sudo apt install libdrm-dev

A bit late to the party but have you considered running a gstreamer pipeline? There are elements that will resize video and I believe it's also possible to render direct to a drm device via kmssink. I'm not really familiar with zoneminder but if it's sending video you may be able to use an actual streaming protocol such as RTSP as well.

ryanrs
Jul 12, 2011

I thought a little bit about video, but I am worried about system load on both the ARM zoneminder server and the RPi Zero. The Zero has a hardware h.264 decoder, so video could work, and work well if the hardware is used right. But the jpeg approach is easier to throttle, by slowing down the framerate to 1 every 5 secs or whatever.

Now having played this a bit, the 1920x1080 jpegs are about 150kbytes. If I run 1 jpeg/sec, that is more bandwidth than the video stream from the camera. So it is possible video might use less system resources than the jpegs.

The scene I am recording is extremely static (camera pointed at car & wall). I don't know if 1 fps vs 0.1 fps would even be detectable, aside from the superimposed clock jumping 10 secs at a time.

ryanrs
Jul 12, 2011

ryanrs posted:

I will develop the DRM code a bit more. Maybe I'll start to like it.

My FBDEV program took 92 ms to run, and left the jpeg on the screen.

My DRM program takes 100 ms to start up, then 60 ms to show a jpeg. Since this version of my program does proper mode setting, when it exits the screen goes back to the login prompt cleanly.


Having the program throw up 1 jpeg and exit was a very simple, clean design. But with the switch to DRM, it makes sense for my program to hang around and display several jpegs. I pretty much need to if I want to keep the image on the display. Plus goodies like double buffering and vsync make more sense when you have a sequence of frames to show.

So instead of taking jpeg filenames as arguments, my program reads the filenames from stdin, one per line. This solves some questions re. timing of the images and how long to hold onto the screen (until EOF). And importantly, it keeps a simple UNIX-ish interface that you can play with from the command line.

code:
$ (while true; do curl -so /tmp/frame.jpg 'http://192.168.5.30/cgi-bin/nph-zms?mode=single&monitor=1'; echo /tmp/frame.jpg; sleep 1; done) | ./console-jpeg
I'll polish the code over the weekend and think of a nice way to handle multiple displays, like on a RPi 4.

In terms of complexity, it'll be about 500 lines of code with few dependencies (libjpeg-turbo, libdrm).

big black turnout
Jan 13, 2009



Fallen Rib

Tankakern posted:

we got fwupd now

nm. what's fwupd with you

FlapYoJacks
Feb 12, 2009

big black turnout posted:

nm. what's fwupd with you

Fwup deez nuts.

FAT32 SHAMER
Aug 16, 2012



FlapYoJacks posted:

I bought a Legion Go, and surprisingly, BazziteOS, works perfectly and gives an additional 1 - 3 hours of battery life. Everything works OOB: even HDR, sleep, the joysticks, and sound.

How the hell does Windows somehow get worse battery life than Windows? :psyduck:

it’s impressively good. I also really like vanilla Fedora a lot.

FlapYoJacks
Feb 12, 2009
yeah, the Legion Go is insanely good for what it is. And, as a boring monolithic company, their warranty services will usually just work, unlike Asus.

ryanrs
Jul 12, 2011

My 1 fps slideshow, including fetching the jpegs over the network, now runs at about 5% CPU, 0.15 load avg. That is a lot better than the 1 cpu-second ImageMagick was using per frame.

At this point I'm much happier with the performance. It's sipping cpu in the background, like a slideshow screensaver ought to.

Sapozhnik
Jan 2, 2005

Nap Ghost
hell yeah i love doing embdev c work like that, it's like drinking a fine brandy. wish i could have a good job doing it

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

ryanrs posted:

I even checked to see if maybe the API was released recently, but no, it's been around for over a decade. Is there some other place I should be looking for docs?

the source?

I don’t (just) mean that in the flippant sense of “just read the code duh” but also the source should have man pages or HTML files or whatever other form of documentation they have

pseudorandom name
May 6, 2007

I'd like to repeat my question: why aren't you using the existing graphics stack?

ryanrs
Jul 12, 2011

I am. I'm just writing an app to paint a jpeg on the console. This is how you do it.

e: Or do you mean why am I not running X Windows, etc. This board is meant to be more of an appliance. It'll probably be plugged into a TV. So there's no need for a desktop (also it only has 512 MB of RAM).

ryanrs fucked around with this message at 05:26 on May 18, 2024

pseudorandom name
May 6, 2007

No, how you do it is a fullscreen app on X or Wayland (without the desktop) or directly on the device using EGL. You shouldn't be interacting with KMS or libdrm at all.

ryanrs
Jul 12, 2011

Never heard of it. Most of the code I saw was using fbdev, with scattered warnings that it was deprecated and to use KMS/DRM instead.

e: If opengl es works well on an rpi without X, then that is definitely something I will play with in a future project, tho probably not for this one.

ryanrs fucked around with this message at 06:58 on May 18, 2024

ryanrs
Jul 12, 2011

OK, here is another Linux question, maybe someone knows the answer.

What is the right way to put an attached HDMI display to sleep? For example, maybe I'll only wake the display if motion is detected.

I see mention of DPMS, but I don't know if that's still the right way. Or maybe there's a DRM api for turning the crtc or encoder on and off?

FAT32 SHAMER
Aug 16, 2012



afaik that’s the million dollar question isn’t it?

ryanrs
Jul 12, 2011

looool if i have to use setterm to do it

(I hope setterm is not the right answer)

Adbot
ADBOT LOVES YOU

ryanrs
Jul 12, 2011

2.5 years ago, someone asked the same question and received no answer, so he answered it himself.

Stack Overflow: DRM/KMS disable connector and crtc

If you pass a bunch of zeros and null pointers to the CRTC, it shuts off the HDMI port. This makes sense because the CRTC is what generates the video timing signals such as vsync. Turning off these clocks is traditionally how CRTs were told to sleep. I am not surprised HDMI works similarly.

drmModeSetCrtc(fd_drm, crtc_id, 0, 0, 0, 0, 0, 0);

I'm not sure if it's the null frame buffer or the null connection list that is telling it to shut off. But it works great on a Raspberyy Pi Zero 2 W and this old Dell LCD with DVI inputs.


e: another way, possibly better: https://github.com/tomba/kmsxx/blob/master/utils/kmsblank.cpp

ryanrs fucked around with this message at 21:05 on May 18, 2024

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply