Skip to content

Add "portable" PlayOS flavour#338

Merged
knuton merged 7 commits into
dividat:mainfrom
yfyf:laptop-edition
May 8, 2026
Merged

Add "portable" PlayOS flavour#338
knuton merged 7 commits into
dividat:mainfrom
yfyf:laptop-edition

Conversation

@yfyf
Copy link
Copy Markdown
Collaborator

@yfyf yfyf commented Apr 23, 2026

Meant to be installed on laptops, used for Flex device demos via distributors.

Main current issue is sound. The fixes applied here seem to make sound on my laptop (tested via live ISO) work, however users do not have any way control the sound volume, since the media keys are not mapped to anything.

TODOs:

  • Add+test volume media key support
  • Maybe reduce update download limit to 1MB/s or so? To minimize interference in the scenario where download starts during a demo. Requires making it configurable in controller.

@yfyf
Copy link
Copy Markdown
Collaborator Author

yfyf commented Apr 23, 2026

@knuton @dividat-jgu could you please build a live ISO of this, using:

QUICK_BUILD=1 nix-build --arg buildVm false --arg buildInstaller false --arg buildBundle false --arg buildLive true --arg buildDisk false --arg applicationPath ./flavors/portable.nix

and check on some laptop if audio works "out of the box" when you boot and start using Play?

EDIT: added experimental media key bindings, would be good to also check if volume up/down works.

@dividat-jgu
Copy link
Copy Markdown
Contributor

Having a look this afternoon.

@dividat-jgu
Copy link
Copy Markdown
Contributor

Working well!

  • ☑️ I have sound from the laptop
  • ☑️ If I plug headphones, I get sounds on the headphones
  • ☑️ If I unplug headphones, I get sounds back from the laptop
  • ☑️ The pre-selected volume looks good

But:

  • ❎ If I plugged an HDMI screen which can play sound, the sound keeps being played from the laptop. What’s the current target? Would it be an idea to use HDMI over the laptop if available with the external screen?

Also, related but not concerning audio, external screens are mirrored, which looks sensible. But as an optimization, we could disable the laptop screen when closing the lid. Or disable the laptop screen when plugging an external screen. I’m guessing that this would reduce the computation need to display the screen, and let it available for other things.

@yfyf
Copy link
Copy Markdown
Collaborator Author

yfyf commented Apr 24, 2026

Working well!

Thank you for testing!

❎ If I plugged an HDMI screen which can play sound, the sound keeps being played from the laptop. What’s the current target? Would it be an idea to use HDMI over the laptop if available with the external screen?

Yes, in general this would be nice. However, at the moment the intention is to only use this with a laptop for Play/Flex demo purposes, without an external monitor, so it is not an immediate problem. I have no idea how to make pulseaudio auto-switch to an HDMI profile reliably - it cannot get it to work on my personal Debian setup and it also doesn't work on PlayOS. Online sources have confusing info, e.g. some sources say it should work out of the box with module-switch-on-connect, while this one provides a complex solution with udev rules 🤷

I also don't have a monitor with audio output at hand I could test with.

We can probably find a solution, but I propose to delay this until the portable hardware configuration matures, since this is very hard to test without targeting specific hardware. There are plans to use a lightweight portable monitor in the future.

Also, related but not concerning audio, external screens are mirrored, which looks sensible. But as an optimization, we could disable the laptop screen when closing the lid. Or disable the laptop screen when plugging an external screen. I’m guessing that this would reduce the computation need to display the screen, and let it available for other things.

Yes, but same as above, this is not an immediate use case, so I think it's best to avoid any optimizations. It's also not clear this is always desired - e.g. presenter might interact/observe from a different point. I doubt a mirrored extra screen adds much extra load, since all the rendering is already done (especially assuming identical resolutions) for the primary screen.

@yfyf
Copy link
Copy Markdown
Collaborator Author

yfyf commented Apr 24, 2026

Audio + media controls seem to work on a Lenovo V15 G5, tested by jvhr

@yfyf yfyf changed the title WIP: PoC of "portable" PlayOS flavour Add "portable" PlayOS flavour Apr 27, 2026
@yfyf yfyf requested a review from knuton April 27, 2026 11:32
@yfyf yfyf marked this pull request as ready for review April 27, 2026 11:32
@yfyf yfyf added the reviewable Ready for initial or iterative review label Apr 27, 2026
@yfyf
Copy link
Copy Markdown
Collaborator Author

yfyf commented Apr 27, 2026

@knuton I propose we actually merge this into main, so that we don't need to dig through branches if we need to update this. I could also add a CI workflow that builds the portable flavor as a test.

Alternatively, I can create separate PRs for the non-config changes, but keep the flavors/ existing only in a branch. However, the non-config changes will look a bit strange when there's no actual usage in the source tree.

Copy link
Copy Markdown
Member

@knuton knuton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, can you lightly clean up the commit history, as we're targeting main?

I propose we actually merge this into main, so that we don't need to dig through branches if we need to update this. I could also add a CI workflow that builds the portable flavor as a test.

Seems reasonable, I would definitely add CI job then, so it doesn't silently break.

Comment thread flavors/portable.nix
@knuton knuton added changes suggested Asking for changes before next round of reviewing and removed reviewable Ready for initial or iterative review labels Apr 30, 2026
yfyf added 7 commits May 7, 2026 12:05
Attempting to enable it will produce an error, not attempting to somehow
work around it, since this can only happen in non-standard configurations.
Short-term the plan is to use this flavor with generic laptop devices
for "demo" purposes".

Long-term this might become a more permanent variation of the standard
configuration that is optimized for a different operational context
from the usual PlayOS PC installations, which is characterized by:

- non-persistent internet connection
- power-on only during use
- frequent network re-setup
- frequent display changes
- varied input devices

and other aspects yet to be discovered.
@yfyf yfyf force-pushed the laptop-edition branch from 129ad8e to 7a4cda9 Compare May 7, 2026 09:16
@yfyf
Copy link
Copy Markdown
Collaborator Author

yfyf commented May 7, 2026

This looks good, can you lightly clean up the commit history, as we're targeting main?

Done, re-ordered the commits, squashed into self-contained chunks.

I propose we actually merge this into main, so that we don't need to dig through branches if we need to update this. I could also add a CI workflow that builds the portable flavor as a test.

Seems reasonable, I would definitely add CI job then, so it doesn't silently break.

Added in 7a4cda9

@yfyf yfyf added reviewable Ready for initial or iterative review and removed changes suggested Asking for changes before next round of reviewing labels May 7, 2026
@knuton knuton merged commit a0c685b into dividat:main May 8, 2026
31 checks passed
@knuton knuton removed the reviewable Ready for initial or iterative review label May 8, 2026
@yfyf yfyf deleted the laptop-edition branch May 8, 2026 10:58
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

Successfully merging this pull request may close these issues.

3 participants